|Perl: the Markov chain saw|
Re^2: How to export a package sitting lower in a module?by HelenCr (Monk)
|on Apr 22, 2013 at 15:26 UTC||Need Help??|
Corion and kennethk:
It works best if you put separate packages into separate files.
Sometimes (especially if you have an object-oriented project, with many little packages), it's not convenient to have each package in a speparate file.
So the solution is to add the export text (as Corion says) and then invoke import directly, i.e. pack_B->import.
Please note that this still doesn't work: the .pm module fails, complaining that the second @ISA is a bareword.