Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: quarantining required files

by theguvnor (Chaplain)
on Jan 25, 2004 at 15:04 UTC ( #323974=note: print w/replies, xml ) Need Help??


in reply to quarantining required files

What's so bad about main::registerplugin()? Personally I think you should just "go with it". It is cleaner than far by the convoluted chain of calls that you've created here with this wrap.pm.

[Jon]

Replies are listed 'Best First'.
Re: Re: quarantining required files
by lilphil (Scribe) on Jan 25, 2004 at 17:41 UTC
    Yes, i agree its cleaner - and wouldnt have used the wrap in the real situation. It was an attempt at seeing if it would be done, and then used as a way to explain what I was trying to do here.

    Ive discovered Safe is a very pretty module and ended up with something as simple as:
    my $cpt = new Safe; $cpt->share_from('main',[ '&registerplugin' ]); $cpt->rdo('filename');
    and you can still call code from inside the cpt when it passes code refs through registerplugin.
    not sure if I should be deleting the cpt, as its in a foreach reading in files. but as the foreach creates a codeblock i think perl would clean up for me

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2020-04-05 02:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (33 votes). Check out past polls.

    Notices?