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