in reply to Re: Subroutine redefined
in thread Subroutine redefined
Perl won't run a module twice, but when running a .pm as a script, it doesn't count as module. In other words, your module is fine. It's how you run it that's broken.
Replace
perl -c TestVar.pm
with
perl -ce "use TestPm"
to fix the problem.
However, I think there's a design problem when two modules include each other.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Subroutine redefined
by Anonymous Monk on Aug 16, 2006 at 03:51 UTC | |
by ikegami (Patriarch) on Aug 16, 2006 at 04:01 UTC |