Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Pod::Usage and Exporter error

by InfiniteLoop (Hermit)
on Sep 12, 2008 at 16:44 UTC ( [id://710950] : perlquestion . print w/replies, xml ) Need Help??

InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:

Greetings monks,
 Im working on a simple script, for an in-house project, which use Pod::Usage along with other proprietary modules. I have noticed that if "use Pod::Usage" is included, the script throws this error:
xxxxxx does not define $xxx::VERSION--version check failed at /usr/loc +al/lib/perl5/5.8.8/Exporter/Heavy.pm line 121
However the module does have $VERSION defined and the module imports without error, when Pod::Usage is not used. Any suggestions on fixing this is appreciated. Thanks.

Replies are listed 'Best First'.
Re: Pod::Usage and Exporter error
by Fletch (Bishop) on Sep 12, 2008 at 17:09 UTC

    Are you sure that it's declared as a package variable (i.e. using our $VERSION or use vars qw/ $VERSION / or the like) and not lexically (my $VERSION)?

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Thanks. It looks like that parent module doesn't have an $VERSION package variable. Declaring a package variable in the parent module solved this issue. Thanks for the help.