develooper Front page | perl.perl5.porters | Postings from March 2009

Displaying implicit $_ usage with B::Deparse

Thread Next
From:
Gabor Szabo
Date:
March 1, 2009 04:34
Subject:
Displaying implicit $_ usage with B::Deparse
Message ID:
d8a74af10903010434m71ab9aa8pdc5e5440d5e36653@mail.gmail.com
Taken the following code using B::Deparse can insert the missing @_
and @ARGV after the shift.

my $filename = shift;
sub foo {
   my $x = shift;
}


On the other hand in the following examples it did not insert the implicitly
used $_:

if ($line = /something/) {
}

foreach (@arr) {
   if (/abc/) {
      print;
   }
}


Would it be possible to add that as an optional feature of B::Deparse?


Gabor

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About