Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Don't know how to make a module for this repeating code

by exilepanda (Pilgrim)
on Nov 27, 2012 at 05:24 UTC ( #1005793=note: print w/replies, xml ) Need Help??


in reply to Re^3: Don't know how to make a module for this repeating code
in thread Don't know how to make a module for this repeating code

umm... perhaps I can create something like this:
package ExtConstructor; sub new { return <<" CODE"; eval 'use parent "parent::classes"'; sub new { return bless $_[0]->SUPER::new(); } CODE } 1; package Interface::Module; use ExtConstructor; my $code = new ExtConstructor; eval $code; # so that the constructor code created on-the-fly 1; package main; use Interface::Module; my $obj = new Interface::Module;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005793]
help
Chatterbox?
talexb admires the shimmering pool after an enjoyable hour-long All Hands meeting spent listening with one ear and reading Perlmonks with the other .. ear.
[talexb]: Used all my votes during that meeting .. been a while since I've done that. Now, back to work. Good localtime, monks!
[Corion]: talexb: You enjoyed the All Hands meeting in the pool?!
[Corion]: I understand "surfing" in the pool ;)
[talexb]: Corion I admired the pool .. I wasn't .. soaking in it. ;)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-07-20 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (304 votes). Check out past polls.