good chemistry is complicated,
and a little bit messy -LW
can't import using exporterby perl-diddler (Chaplain)
|on Mar 12, 2012 at 05:09 UTC||Need Help??|
perl-diddler has asked for the wisdom of the Perl Monks concerning the following question:
Below is, what I think is the pertinent code, -- I'm trying to divide an old prog into modules/packages.
It was all global vars all over the place, and trying to tighten up the interfaces is causing a few problems....
Like the following -- am trying to export the vars and necessary routines in EXPORT, and use Exporter...
But the import in the next package doesn't work.
Now I've tried it with a plain 'import Debug' (no qw), and with/without the following BEGIN -- why that doesn't work is beyond me.
Am beginning to think perl 5.14 is broken...
So many progs that worked under 5.12 won't work under 5.14... what a disaster!..
That's been happening at each of the last few releases
5.8->5.10 broke several (including this one, which was why I decided to rewrite it...but haven't ever gotten it working again...and am now up to 5.14...).
5.10->5.12 -- more progs broke, 5.12->5.14 -- more progs broke...
Seems like one can't upgrade perl and expect any stability these days ;-/.
Anyway, line with debug @ 119 is marked below...
For those that want complete code. I'll post it in a followup, but wanted to post the snippet that was most relevant (I thought), here so this post wouldn't be overwhelming...
I'm clueless when it comes to using Exporter except how documented in the perldoc -- and EXPORT isn't even documented anymore... (?!?)...
How am I supposed to export vars and subs out of 1 routine to another?
The above gives: </code> > cnvWav2Flac Variable "$Filename2Fields" is not imported at ./cnvWav2Flac line 119.