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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://417202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found