leocharre has asked for the wisdom of the Perl Monks concerning the following question:
I'm working with CGI::Application
If I have a cgiapp MyModule using 10 plugins, and each in turn has a
package Plugin; use CGI::Application; # or use base 'CGI::Application'; # or require CGI::Application;
In addition of course to MyModule using cgiapp as base.. How much is this a slowdown? I do understand that making a require call, this is a runtime action that simply does a hash lookup- no problem.. but what about 'use' and 'use base' at compile time.. if there are multiple calls (for the same package, from different packages)?
If I have 10 calls to require code at runtime, I understand this is fine. If I have 10 calls to 'use' in various modules (same namespace definition).. how much of a hit is that for the interpreter?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Do multiple calls to 'use X' abuse the compiler?
by friedo (Prior) on Feb 29, 2008 at 17:01 UTC | |
|
Re: Do multiple calls to 'use X' abuse the compiler?
by ikegami (Patriarch) on Feb 29, 2008 at 16:59 UTC | |
by diotalevi (Canon) on Mar 02, 2008 at 02:18 UTC | |
by ikegami (Patriarch) on Mar 02, 2008 at 03:17 UTC | |
by diotalevi (Canon) on May 01, 2008 at 15:42 UTC | |
|
Re: Do multiple calls to 'use X' abuse the compiler?
by chromatic (Archbishop) on Feb 29, 2008 at 18:39 UTC | |
|
Re: Do multiple calls to 'use X' abuse the compiler?
by Herkum (Parson) on Feb 29, 2008 at 17:19 UTC | |
|
Re: Do multiple calls to 'use X' abuse the compiler?
by locked_user sundialsvc4 (Abbot) on Feb 29, 2008 at 17:13 UTC |