Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Can't call sub within same package in BEGIN block

by Anonymous Monk
on Aug 14, 2014 at 08:07 UTC ( [id://1097393]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Local::TouchEnvFirst; ## import
    use Local::TouchEnvSecond  -optionFantastic;
    ...
    use Local::Madness -init => sub {
       warn "if you gotta run me, go ahead :)";
    };
    
  2. or download this
    sub TestMe;
    BEGIN { TestMe }
    ...
    $ perl testme
    Undefined subroutine &main::TestMe called at testme line 2.
    BEGIN failed--compilation aborted at testme line 2.
    

Log In?
Username:
Password:

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

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

    No recent polls found