Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: eval('__PACKAGE__') is always main?!!!

by hossman (Prior)
on Dec 23, 2004 at 20:14 UTC ( #417202=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    hal:~> cat test.pl
    package foo ;
    ...
    main
    hal:~> perl -le 'package foo ;print eval('__PACKAGE__');'
    foo
    
  2. or download this
    package foo ;print eval(__PACKAGE__);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://417202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-08-26 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (366 votes). Check out past polls.