Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: any way to fill calling namespace with a "use Module"?

by tobyink (Abbot)
on Feb 23, 2013 at 22:54 UTC ( #1020356=note: print w/ replies, xml ) Need Help??


in reply to Re^2: any way to fill calling namespace with a "use Module"?
in thread any way to fill calling namespace with a "use Module"?

my $class = "Subordinate" . $self->letter; Class::Load::load_class($class);

Class::Load is a dependency of Moose, so you're already using it.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re^3: any way to fill calling namespace with a "use Module"?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2015-04-27 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (507 votes), past polls