I'd be very interested in learning from which perl docs you copied this from - it's not normal to do all the exporting in the BEGIN block, the more usual form is along the lines of...
package 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;
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 cycle

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.

A user level that continues to overstate my experience :-))

In reply to Re: Perl complains of redefining undefined module export by Bloodnok
in thread Perl complains of redefining undefined module export by WienIsset

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.