The bulk of your problems, I believe, lie in the apparent lack of any sub declaration in scope (at the time that Exporter does its work) - if there are subs declared in the module, they won't have been parsed until after the BEGIN block has run i.e. your use of Exporter in the BEGIN block is far too early in the compilation cyclepackage SomePkg; use warnings; use strict; use Exporter; our @ISA = qw/Exporter/; our @EXPORT = qw/&GeneratorConfig &Generate &GetWidthFromType &GetWidt +hFromFormat/; sub GeneratorConfig { ... } sub Generate() { ... } sub GetWidthFromType { ... } sub GetWidthFromFormat { ... } 1;
Note that the using strictures might have pointed you in right direction a little earlier.
Note also that it is extremely unadvisable to export everything by default (via @EXPORT), it is far more preferable to export on demand (using @EXPORT_OK).
As an aside, I've recently been asked about a similar situation in some extremely legacy code - the workaround (given that there are over 100 warnings if strictures are enabled) was to change use to require.
Update:
In the light of ikegamis salient qualification, I thought I ought to further qualify my comment ...it's not normal..., here, by normal, I was alluding to the module template generated by h2xs.
In reply to Re: Perl complains of redefining undefined module export
by Bloodnok
in thread Perl complains of redefining undefined module export
by WienIsset
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |