in reply to see perl output before run

If you're importing a function from another package with the same name as a function in the existing package, you may also see this error:
$ perl -w use strict; sub param {} use CGI qw( :standard ); Subroutine param redefined at /usr/lib/perl5/5.10.1/CGI.pm line 235.

Replies are listed 'Best First'.
kinda messy: re:see perl output before run
by Anonymous Monk on Mar 08, 2002 at 06:15 UTC
    Hi,

    I fixed it, but am not happy with my solution...I am still not *thinking* Perl !

    This is an example of the mess I created. The problem probably stems from the fact that I have a global structure that all modules reference and so my packages cross-call each other all of the time. The way I got out of it is to allow the main() to have all of the "use module" definitions and then in each package, I preface each function call with the name of the package. If I did a "use" in the package and it was also "used" in main() I would often get conflicts...

    package::A fn1() fn2(PackageB::FnA) fn3() package::B fnA(packageA::fn1) fnB() fnC()
    I am trying to isolate the variables with each individual package and provide method calls to set/get...maybe I just need to keep at it and then it will *feel* better to me...or maybe I am not using things right...