Why does a module compile by itself but fail when used from elsewhere?
Posted
by chrisribe
on Stack Overflow
See other posts from Stack Overflow
or by chrisribe
Published on 2010-02-04T18:42:23Z
Indexed on
2010/06/08
15:52 UTC
Read the original article
Hit count: 425
perl
|perl-module
I have a Perl module that appears to compile fine by itself, but is causing other programs to fail compilation when it is included:
me@host:~/code $ perl -c -Imodules modules/Rebat/Store.pm
modules/Rebat/Store.pm syntax OK
me@host:~/code $ perl -c -Imodules bin/rebat-report-status
Attempt to reload Rebat/Store.pm aborted
Compilation failed in require at bin/rebat-report-status line 4.
BEGIN failed--compilation aborted at bin/rebat-report-status line 4.
The first few lines of rebat-report-status
are
...
3 use Rebat;
4 use Rebat::Store;
5 use strict;
...
© Stack Overflow or respective owner