Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: import doesn't work at runtime?

by Perlbotics (Archbishop)
on Nov 11, 2011 at 22:09 UTC ( [id://937678]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e 'use strict; use warnings; require MyModule; MyModule->import(
    +qw(frobnicate munge));  frobnicate; munge; '
    Bareword "frobnicate" not allowed while "strict subs" in use at -e lin
    +e 1.
    Bareword "munge" not allowed while "strict subs" in use at -e line 1.
    Execution of -e aborted due to compilation errors.
    
  2. or download this
    perl -e 'use strict; use warnings; require MyModule; MyModule->import(
    +qw(frobnicate munge));  frobnicate(); munge(); '
    frobnicated!
    munged!
    
  3. or download this
    perl -e 'use strict; use warnings; require MyModule; MyModule->import(
    +qw(frobnicate munge));  MyModule->frobnicate; MyModule->munge; '
    frobnicated!
    munged!
    

Log In?
Username:
Password:

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

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

    No recent polls found