Welcome to the Monastery | |
PerlMonks |
Re^5: loading modules using 'use'by wfsp (Abbot) |
on Jun 30, 2010 at 13:55 UTC ( [id://847339]=note: print w/replies, xml ) | Need Help?? |
...(script abc.pl uses A.pm and B.pm, while A.pm and B.pm have a circular inheritance among them)...That's "circular" as in "dog trying to catch its tail"? :-) In my experience if your faced with this it is often best to have another look at the algorithm. Identify what it is that A.pm needs from B.pm and what B.pm needs that is in A.pm. Put all that in C.pm. A.pm and B.pm then both "use" C.pm. The dog still hasn't caught its tail but it has had a chance to see the rabbit. :-)
In Section
Seekers of Perl Wisdom
|
|