in reply to Re: Can't import constants in multiple namespaces
in thread Can't import constants in multiple namespaces
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can't import constants in multiple namespaces
by xdg (Monsignor) on Mar 28, 2006 at 12:26 UTC |