This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
B::Deparse for(1..100000)
authorGisle Aas <gisle@aas.no>
Fri, 10 Jul 1998 14:04:44 +0000 (16:04 +0200)
committerGurusamy Sarathy <gsar@cpan.org>
Sat, 11 Jul 1998 02:54:02 +0000 (02:54 +0000)
Message-ID: <m3n2ahx677.fsf@furu.g.aas.no>

p4raw-id: //depot/perl@1421

ext/B/B/Deparse.pm

index 91c08e7..d9b0cd9 100644 (file)
@@ -1513,7 +1513,14 @@ sub pp_leaveloop {
     } elsif ($enter->ppaddr eq "pp_enteriter") { # foreach
        my $ary = $enter->first->sibling; # first was pushmark
        my $var = $ary->sibling;
-       $ary = $self->deparse($ary, 1);
+       if ($enter->flags & OPf_STACKED) {
+           my $from = $ary->first->sibling;
+           my $to = $from->sibling;
+           $ary = join("", "(", $self->deparse($from,1), " .. ",
+                                 $self->deparse($to,1), ")");
+       } else {
+           $ary = $self->deparse($ary, 1);
+       }
        if (null $var) {
            if ($enter->flags & OPf_SPECIAL) { # thread special var
                $var = $self->pp_threadsv($enter, 1);