Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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

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 musing on the Monastery: (10)
As of 2016-06-28 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (364 votes). Check out past polls.