in reply to source filters in eval
For the sake of clarity, I would name it something entirely different from CORE::eval. But using '::' to indicate the version found in the current package is preferable to '&' so that you avoid '@_' being passed unmodified from the calling context to the scope of the subroutine. In general, '&' should only preface subroutine calls in very specific and peculiar circumstances.
That said, I'm wondering if you're planning to use this for some kind of code vetting, rather than the simple substitution in your example code? If so, then take a look at Safe and Opcode.
Update: ihb is correct.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: source filters in eval
by ihb (Deacon) on Feb 25, 2003 at 10:56 UTC | |
|
Re: source filters in eval
by asdfgroup (Beadle) on Feb 25, 2003 at 11:11 UTC | |
by steves (Curate) on Feb 25, 2003 at 13:10 UTC | |
by powerman (Friar) on Feb 25, 2003 at 18:17 UTC |