Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 about the Monastery: (5)
As of 2016-06-25 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.