Thread Fehlermeldung bei use constant mit mod_perl *was:security (7 answers)
Opened by bieber at 2009-02-03 09:19

pq
 2009-02-03 16:46
#118624 #118624
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
oder noch ne variante wegen dem "Prototype mismatch": du hast icht zufällig auch noch
im selben skript bzw. package eine eigene subroutine namens SECURITY?
das solltest du tunlichst lassen, weil eine konstante, wie ich oben erwähnt habe, auch eine
subroutine ist.

edit: äh ja, das ist wohl das wahrscheinlichste:
Code: (dl )
1
2
3
4
5
6
7
$ perl -wle'

use constant SECURITY => 23;

sub SECURITY { print "something" }'
Prototype mismatch: sub main::SECURITY () vs none at -e line 5.
Constant subroutine SECURITY redefined at -e line 5.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Fehlermeldung bei use constant mit mod_perl *was:security