Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: import doesn't work at runtime?

by Perlbotics (Chancellor)
on Nov 11, 2011 at 22:09 UTC ( #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
Node Status?
node history
Node Type: note [id://937678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-12-15 16:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (70 votes). Check out past polls.

    Notices?