Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Assignment and use statement in the same BEGIN block

by Discipulus (Canon)
on Jan 31, 2019 at 08:03 UTC ( [id://1229190]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # script.pl
    use Foo;
    ...
      1.Execute my $foo = Foo->new();
      2.Execute $foo->do();
    
  2. or download this
      print         "10. Ordinary code runs at runtime.\n";
      END { print   "16.   So this is the end of the tale.\n" }
    ...
      UNITCHECK { print " 3. UNITCHECK blocks run LIFO after each file is 
    +compiled.\n"  }
      INIT { print  " 9.   You'll see the difference right away.\n" }
      print         "13.   It only _looks_ like it should be confusing.\n"
    +;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-23 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found