Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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: (10)
As of 2014-09-16 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (51 votes), past polls