$$var = shift @$ary;
};
my ($x,$y);
- my $next_before = sub { $next_something->(\@xs, \$x, 'before'); };
- my $next_after = sub { $next_something->(\@ys , \$y, 'after' ); };
+ my $next_x = sub { $next_something->(\@xs, \$x, 'before'); };
+ my $next_y = sub { $next_something->(\@ys, \$y, 'after' ); };
my $is_string = sub { $_[0]{T} =~ m/heredoc|string/; };
for (;;) {
last unless @xs or @ys;
- $next_before->();
- $next_after->();
+ $next_x->();
+ $next_y->();
next if $x->{E} eq $y->{E};
my $string_changed;
if ($y->{E} eq '__' or $y->{E} eq '_f') {
- $next_after->();
+ $next_y->();
die "__ on non-string $y->{P}\n" unless Sis_string->($y);
die "__ on was non-string $y->{P}\n" unless $is_string->($x);
if ($y->{Q} ne "'") {
$fmt = $';
if ($& eq '%%') { $exactly->('%'); next; }
elsif ($& ne '%s') { die "unhandled %-subst $&\n"; }
- $next_after->();
+ $next_y->();
die "expected comma, got $y->{P}\n" unless $y->{E} eq ',';
if ($xs =~ m{^\@}) {
- $next_after->();
+ $next_y->();
die "\@... => not string" unless $is_string->($y);
die "\@... => $y->{P}" if $y->{Q} ne '"';
$exactly->($y->{V});
if (!$bras and !@ys) {
last;
}
- $next_after->();
+ $next_y->();
if (!$bras and
(grep { $y->{E} eq $_ } qw( or xor and not ; : )
or $y->{T} eq 'ket'