Why does a module compile by itself but fail when used from elsewhere?
- by chrisribe
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;
...