use strict; use warnings; package MyMod::db; use MyMod; sub fred { print "hello" if (MYMOD_DEFAULT); } 1;
but now I get:
Constant subroutine MyMod::MYMOD_DEFAULT redefined at /usr/local/lib/perl5/5.8.7/constant.pm line 103. Bareword "MYMOD_DEFAULT" not allowed while "strict subs" in use at MyMod/db.pm line 6. Compilation failed in require at MyMod.pm line 12. BEGIN failed--compilation aborted at MyMod.pm line 12.
In reply to Re^2: Can't import constants in multiple namespaces
by mje
in thread Can't import constants in multiple namespaces
by mje
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |