Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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?
[1nickt]: Corion I feel that way a lot when I look at the news...
[1nickt]: Brethren, I just noticed in the CPAN ticker Retry, which led me to Attempt, by Mark Fowler. Does anyone have experience with either of these utilities?
[Corion]: No. Back when I toyed with the idea, I found that writing the loop explicitly was usually less code than passing the configuration+ callback to the retrier...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2017-05-24 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?