in reply to Re^2: Module not loading completely?
in thread Module not loading completely?
If you write it with differing upper-/lowercase, then Perl considers them to be different files. As such loading twig.pm and Twig.pm. This works due to the case insensitive filesystem. Since it is however the same file, and it is loaded twice, it will cause all the functions of the package to be redefined. If you 'use' or 'require' the Module with the proper case, then it is only loaded once, and the error will go away.# script.pl: use XML::twig; # wrong case, should be XML::Twig # some Module used by script.pl: use XML::Twig;
The filename of a Module should typically be the same as the package name (case sensitive!). Check that the package name matches the filename. Also check that the case of &Module::subroutine is correct. &module::subroutine is not the same as &Module::subroutine.Undefined subroutine &Module::subroutine called at /home/path/module. +pm line 128, <FILE> line 30.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Module not loading completely?
by ric00015 (Beadle) on Oct 30, 2013 at 15:35 UTC |