Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Dynamically Changing Packages w/out Eval

by Anonymous Monk
on Jun 14, 2009 at 11:48 UTC ( #771393=note: print w/replies, xml ) Need Help??


in reply to Dynamically Changing Packages w/out Eval

I think this
local *{$package}::__ANON__ = sub { ... };

Replies are listed 'Best First'.
Re^2: Dynamically Changing Packages w/out Eval
by Anonymous Monk on Jun 14, 2009 at 12:05 UTC
    Thats the wrong syntax
    local *{$package."::__ANON__"} = sub { ... };
    Much easier to use Sub::Install

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2023-03-20 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (59 votes). Check out past polls.

    Notices?