develooper Front page | perl.perl5.porters | Postings from April 2000

B::Deparse doesn't grok private subroutine variables

From:
Jeff Pinyan
Date:
April 20, 2000 06:07
Subject:
B::Deparse doesn't grok private subroutine variables
Message ID:
Pine.GSO.4.21.0004200904480.28375-100000@crusoe.crusoe.net
While being my crazy old self, and writing strtok() in Perl for the hell
of it, I came across this unhappiness in Deparse:

  {
    my $foo = 10;
    sub bar { print $foo }
  }

deparses to:

    sub bar {
        print $foo;
    }
    {
        my $foo = 10;
    }

This is most undesir[e]able.

-- 
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve             japhy@pobox.com
http://www.pobox.com/~japhy/                  http://pinyaj.stu.rpi.edu/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/




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