Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
go ahead... be a heretic
 
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 chanting in the Monastery: (11)
As of 2014-04-17 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (441 votes), past polls