in reply to Re: quarantining required files
in thread quarantining required files

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