in reply to Re^3: eval "require $class" seems wrong
in thread eval "require $class" seems wrong
The second paragraph summarizes nicely the whole thread, but I cannot agree with the best practice you are suggesting which is don't use it IIUC.
eval-require is a common idiom for conditional loading of modules and there is a need for that. From a language perspective a special "use" would be better like 'use any LIST' as the intent would be much clearer. Still you don't want "use base/use parent" wars^Wdiscussions for something simply expressed in an idiomatic but inelegant way. In the end I think low-level things like these should be made core pragmas and (possibly) written in C, thriving for a minimalistic implementation.
cheers --stephan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: eval "require $class" seems wrong
by ikegami (Patriarch) on Aug 22, 2007 at 20:12 UTC | |
by rvosa (Curate) on Aug 22, 2007 at 22:40 UTC | |
by sgt (Deacon) on Aug 23, 2007 at 09:20 UTC |