H
Henry Law
I have some code of which this is the relevant part:
package NFB::Utilities::Common;
# ...
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'}}, qw(
db_connect get_file_gm_info
# etc ... ('all' is defined but I've snipped it)
) );
# ... other subs
sub db_connect {
# ...etc
}
sub get_file_gm_info {
# 'db_connect' is actually in this module. The call
# is left over from when the sub was developed in-line.
use NFB::Utilities::Common qw(db_connect);
}
I'm trying the code newly-installed on a Fedora Core 6 system running
Perl 5.8.8 and it fails to compile, complaining that (in the above
example) "db_connect" is not exported by the NFB::Utilities::Common
module". It's clear that it is exported. Commenting out the offending
lines, where the module uses subroutines from itself, fixes the problem.
That's OK: I can easily find and remove the offending lines. But the
code runs clean on an FC5 machine also running perl 5.8.8, and on my
Windows machine running ActiveState 5.8.8, so I'm worried that I'm
chasing a secondary error, actually caused by something else.
Does anyone have any insight on this? Seen it yourselves, perhaps?
package NFB::Utilities::Common;
# ...
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'}}, qw(
db_connect get_file_gm_info
# etc ... ('all' is defined but I've snipped it)
) );
# ... other subs
sub db_connect {
# ...etc
}
sub get_file_gm_info {
# 'db_connect' is actually in this module. The call
# is left over from when the sub was developed in-line.
use NFB::Utilities::Common qw(db_connect);
}
I'm trying the code newly-installed on a Fedora Core 6 system running
Perl 5.8.8 and it fails to compile, complaining that (in the above
example) "db_connect" is not exported by the NFB::Utilities::Common
module". It's clear that it is exported. Commenting out the offending
lines, where the module uses subroutines from itself, fixes the problem.
That's OK: I can easily find and remove the offending lines. But the
code runs clean on an FC5 machine also running perl 5.8.8, and on my
Windows machine running ActiveState 5.8.8, so I'm worried that I'm
chasing a secondary error, actually caused by something else.
Does anyone have any insight on this? Seen it yourselves, perhaps?