Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Use variable as a module during runtime.

by tobyink (Abbot)
on Oct 21, 2012 at 08:16 UTC ( #1000182=note: print w/ replies, xml ) Need Help??


in reply to Use variable as a module during runtime.

my $string = <<'STRING'; package Foo; sub new { bless [] => shift } sub foo { print "foo!\n" } STRING eval $string; my $foo = Foo->new; $foo->foo;
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: Use variable as a module during runtime.
Download Code
Replies are listed 'Best First'.
Re^2: Use variable as a module during runtime.
by yoda54 (Monk) on Oct 22, 2012 at 23:42 UTC
    Thanks!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2015-07-28 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls