P
Poker Man
Hello,
I have run into a weird sticky situation which I hope is something is
so blaringly obvious that I can resolve this quickly.
I put all my re-used subroutines into two PM modules :
MYoutput.pm
MYdatabase.pm
In each module I use
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw( ..list every function here..)
Actually everything has been great. I write many different Perl
scripts and each one has the lines "use MYoutput & use
MYdatabase".
As well, the MYdatabase module has in it, "use MYoutput" so that any
errors get reported properly through the output functions that I wrote.
I thought I was doing everything correctly until just recently.
Within the MYoutput module I decided to call some database related
functions and therefore added "use MYdatabase" to the top of that
module, and that's where things fell apart.
The output module was unable to find the newly included function unless
I prefaced it with "&MYdatabase::" and even then it acted funny.
So I am wondering, cannot two PM's use each other? Or is that some
sort of Perl Paradox?
I guess I could put all my subroutines in just one PM module, but
figured I should try here first.
Thanks
I have run into a weird sticky situation which I hope is something is
so blaringly obvious that I can resolve this quickly.
I put all my re-used subroutines into two PM modules :
MYoutput.pm
MYdatabase.pm
In each module I use
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw( ..list every function here..)
Actually everything has been great. I write many different Perl
scripts and each one has the lines "use MYoutput & use
MYdatabase".
As well, the MYdatabase module has in it, "use MYoutput" so that any
errors get reported properly through the output functions that I wrote.
I thought I was doing everything correctly until just recently.
Within the MYoutput module I decided to call some database related
functions and therefore added "use MYdatabase" to the top of that
module, and that's where things fell apart.
The output module was unable to find the newly included function unless
I prefaced it with "&MYdatabase::" and even then it acted funny.
So I am wondering, cannot two PM's use each other? Or is that some
sort of Perl Paradox?
I guess I could put all my subroutines in just one PM module, but
figured I should try here first.
Thanks