You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Boex,Matthew W." <Ma...@cna.com> on 2002/05/31 19:42:47 UTC

mod_perl error

can i ignore this error?  the script seems to work fine...

Subroutine print_get_num redefined at /var/www/perl/cancel.cgi line 19.
Subroutine print_gonna_del redefined at /var/www/perl/cancel.cgi line 27.
Subroutine print_do_nothing redefined at /var/www/perl/cancel.cgi line 74.
Subroutine print_do_del redefined at /var/www/fosbow/cancel.cgi line 83.
Subroutine error_handler redefined at /var/www/fosbow/cancel.cgi line 156.

matt


Re: mod_perl error

Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 19:42 31.05.2002, Boex,Matthew W. wrote:

>can i ignore this error?  the script seems to work fine...
>
>Subroutine print_get_num redefined at /var/www/perl/cancel.cgi line 19.
>Subroutine print_gonna_del redefined at /var/www/perl/cancel.cgi line 27.
>Subroutine print_do_nothing redefined at /var/www/perl/cancel.cgi line 74.
>Subroutine print_do_del redefined at /var/www/fosbow/cancel.cgi line 83.
>Subroutine error_handler redefined at /var/www/fosbow/cancel.cgi line 156.

It depends. These errors are related to the following pitfall (I think): 
http://perl.apache.org/release/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs
You should read through that and find out how you can make your errors 
disappear and make your code more mod_perl friendly.


-- 
Per Einar Ellefsen
per.einar@skynet.be



RE: mod_perl error

Posted by Kyle Oppenheim <ky...@tellme.com>.
I assume you are running your scripts under Apache::Registry.
Apache::Registry checks the modification time of your script on every
request and will recompile (via eval) it if it has changed.  However,
nothing removes the old symbols from the previous compilation, so Perl
generates a warning.  For scripts, this warning is usually harmless.  You
can turn it off with the warnings pragma (Perl >= 5.6.0):

  no warnings qw(redefine);

--
Kyle Oppenheim
Tellme Networks, Inc.
http://www.tellme.com


> -----Original Message-----
> From: Boex,Matthew W. [mailto:Matthew.Boex@cna.com]
> Sent: Friday, May 31, 2002 10:43 AM
> To: modperl@perl.apache.org
> Subject: mod_perl error
>
>
>
> can i ignore this error?  the script seems to work fine...
>
> Subroutine print_get_num redefined at /var/www/perl/cancel.cgi line 19.
> Subroutine print_gonna_del redefined at /var/www/perl/cancel.cgi line 27.
> Subroutine print_do_nothing redefined at /var/www/perl/cancel.cgi line 74.
> Subroutine print_do_del redefined at /var/www/fosbow/cancel.cgi line 83.
> Subroutine error_handler redefined at /var/www/fosbow/cancel.cgi line 156.
>
> matt
>
>