Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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?
[erix]: This sad, embarrassing wreck of a man

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-07-17 21:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (378 votes). Check out past polls.

    Notices?