@@ -189,8 +189,8 @@ has 'global_keys' => (
189189 isa => ' ArrayRef' ,
190190 default => sub { return [] },
191191 handles => {
192- all_global_keys => ' elements' ,
193- has_global_keys => ' count' ,
192+ all_global_keys => ' elements' ,
193+ has_global_keys => ' count' ,
194194 first_index_global_keys => ' first_index' ,
195195 },
196196);
@@ -608,6 +608,7 @@ sub in_template_process {
608608 $self -> local_attr-> sample($sample );
609609 $self -> sample($sample );
610610 my $text = $self -> eval_process();
611+
611612 # my $log = $self->write_file_log();
612613 # $text .= $log;
613614 push ( @{$texts }, $text ) if $self -> print_within_rule;
@@ -696,20 +697,17 @@ sub walk_indir_outdir_sample {
696697 my $attr = shift ;
697698 my $text = shift ;
698699
699- $DB::single = 2;
700700 my $use_iters = $self -> use_iterables;
701701 my $dummy_sample = $self -> dummy_sample;
702702
703- my @samples = @{$attr -> samples} if $attr -> has_samples;
703+ my @samples = @{ $attr -> samples } if $attr -> has_samples;
704704
705705 foreach my $sample ( $attr -> all_samples ) {
706706 my $new_text = $text ;
707707 $new_text =~ s / $dummy_sample/ $sample / g ;
708- $DB::single = 2;
709708
710709 if ($use_iters ) {
711- $self -> walk_indir_outdir_iters( $use_iters , $attr ,
712- $new_text );
710+ $self -> walk_indir_outdir_iters( $use_iters , $attr , $new_text );
713711 }
714712 else {
715713 $new_text = path($new_text )-> absolute if $attr -> coerce_abs_dir;
@@ -857,15 +855,18 @@ sub check_indir_outdir {
857855 my $self = shift ;
858856 my $attr = shift ;
859857
858+ $DB::single = 2;
860859 return unless $attr -> by_sample_outdir;
861860 return unless $self -> has_sample;
862861 return if $attr -> override_process;
863862
864863 # If indir/outdir is specified in the local config
865864 # then we don't evaluate it
865+ my %keys = ();
866+ map { $keys {$_ } = 1 } @{ $self -> local_rule_keys };
866867
867868 foreach my $dir ( ( ' indir' , ' outdir' ) ) {
868- if ( grep / $dir /, @{ $self -> local_rule_keys } ) {
869+ if ( exists $keys { $dir } ) {
869870 next ;
870871 }
871872
@@ -901,6 +902,7 @@ Outdir should be global_attr->outdir/rule_name
901902sub carry_directives {
902903 my $self = shift ;
903904
905+ $DB::single = 2;
904906 $self -> local_attr-> outdir(
905907 $self -> global_attr-> outdir . ' /' . $self -> rule_name );
906908
0 commit comments