Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: How can I import a function and set a parameter at the same time?

by jacques (Priest)
on Apr 12, 2009 at 18:55 UTC ( #757119=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How can I import a function and set a parameter at the same time?
in thread How can I import a function and set a parameter at the same time?

You are on the right track. I want it to work like fatalsToBrowser which also captures compilation errors. Unfortunately, that subroutine doesn't accept arguments (you are not suppose to call it yourself), but I want the same convenience to turn it on or off with a single comment. For example:
# On use CGI::Carp qw(fatalsToBrowser); # Off # use CGI::Carp qw(fatalsToBrowser);
I think the solution lies in creating my own custom import sub. I realized this right after posting. Thanks everyone for the thoughts!!
  • Comment on Re^3: How can I import a function and set a parameter at the same time?
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2016-07-28 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (251 votes). Check out past polls.