Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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()

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://827267]
help
Chatterbox?
[haukex]: You can put it in SOPW, but use <readmore> tags
[haukex]: Also you might want to label it "code review"
[haukex]: Unless you have specific questions, in which case SSCCE's are much better
[cbeckley]: Excellent, thank you.
[cbeckley]: CUFP is more appropriate for stuff that's finished^h^h^h^h more advanced state of completeness?

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2017-03-24 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (304 votes). Check out past polls.