Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Dynamic Class Loading, Compilation, & Speed

by shmem (Canon)
on Mar 07, 2010 at 19:40 UTC ( #827267=note: print w/ replies, xml ) Need Help??


in reply to Re: Dynamic Class Loading, Compilation, & Speed
in thread Dynamic Class Loading, Compilation, & Speed

Nitpick... to handle the equivalent of use Module qw(foo => 'bar'); -

# ...later... load_class("Some::Class", @load_args); sub load_class { my $class = shift; (my $file = "$class.pm") =~ s|::|/|g; unless( $INC{$file} ) { require $file; }# end unless(); $class->import(@_); }# end load_class()


Comment on Re^2: Dynamic Class Loading, Compilation, & Speed
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://827267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-09-17 10:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (71 votes), past polls