in reply to Re: eval "require $class" seems wrong
in thread eval "require $class" seems wrong
It looks like what UNIVERSAL::require does is: turn $class name (e.g. Some::Class) into a path (Some/Class.pm), then do eval qq{require $path}, which amounts to the same thing - a string eval - but hidden in a dependency. Okay, it checks %INC first to see if it's already been loaded, but that's about it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: eval "require $class" seems wrong (--!$@)
by tye (Sage) on Aug 22, 2007 at 19:05 UTC | |
by ikegami (Patriarch) on Aug 22, 2007 at 19:14 UTC | |
by tye (Sage) on Aug 22, 2007 at 19:23 UTC | |
Re^3: eval "require $class" seems wrong
by ikegami (Patriarch) on Aug 22, 2007 at 19:20 UTC | |
Re^3: eval "require $class" seems wrong
by lima1 (Curate) on Aug 22, 2007 at 18:22 UTC |
In Section
Seekers of Perl Wisdom