Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 contemplating the Monastery: (8)
As of 2018-09-24 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (195 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!