in reply to Re: 'package' and 'do'
in thread 'package' and 'do'
That makes sense, which would imply that the behaviour of __PACKAGE__ is correct, but surely the code would output Point 2: B 6 5 (ie $main::var incremented, not $B::var).
Also perldoc -f do, implies an equivalence to eval `cat stat.pl`, although it does then say that 'do FILENAME' cannot see lexicals in the enclosing scope. This is one reason why I was using do instead of eval. Is there some way to have this behaviour with eval so that I can get around the scoping of package, but still hide lexical variables?
--
integral
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: 'package' and 'do' (bug)
by tye (Sage) on Dec 07, 2003 at 07:25 UTC |