>>>>> "Philip" == gwynp <[EMAIL PROTECTED]> writes:
Philip> On 13-Jul-2001 Fletch wrote:
>> If $freezer contains a package name then:
>>
>>
>> eval qq{require $freezer; $freezer->import()};
>>
>>
>> should be sufficient, and will let perl manage any necessary
>> path mangling. From perldoc -f require . . .
>>
>>
>> If EXPR is a bareword, the require assumes a ".pm" extension
>> and replaces "::" with "/" in the filename for you, to make it
>> easy to load standard modules. This form of loading of modules
>> does not risk altering your namespace.
Philip> I'm aware of this. However, POE::Filter::Reference
Philip> doesn't do it this way and I wonder why... Amoungst other
Philip> things, this is less safe. I don't see any other reason,
Philip> though.
I see your point. Checking against /^[A-Za-z0-9_:]+$/ might
probably make it pretty safe, though. Of course if someone's got
access to direcgtories in @INC, requiring "${freezer}.pm" isn't that
much safer.
--
Fletch | "If you find my answers frightening, __`'/|
[EMAIL PROTECTED] | Vincent, you should cease askin' \ o.O'
770 933-0600 x211(w) | scary questions." -- Jules =(___)=
| U