Perl: the Markov chain saw | |
PerlMonks |
Re^4: OO Conversion Query - Sharing Databy Anonymous Monk |
on Apr 13, 2013 at 02:17 UTC ( [id://1028474]=note: print w/replies, xml ) | Need Help?? |
So just to confirm, I make a variable called our $igaro in the root igaro.pm module, then bless the instantiated parent into it.
It does sound the way forward. If I'm right in saying the parent is never passed to the child (first parameter is a reference to the instantiation of that child) then I'd have to use a global variable. But if I use a global variable some of the lower pm modules will be always expecting the parent to be in a fixed variable name ($igaro), which seems a bad idea.
In Section
Seekers of Perl Wisdom
|
|