Thread (Message) | Date | Author |
Score |
Board |
Subroutine new() redefined
(#110309) |
2008-05-26 10:25 |
pktm
|
        |
Allgemeines zu Perl |
Subroutine dbx redefined at TreebankViewer.pm line 69.
Subroutine zeichne redefined at TreebankViewer.pm line 91.
Subroutine parse_tree_top_down redefined at TreebankViewer.pm line 159. |
|
Subroutine new() redefined
(#110211) |
2008-05-24 12:01 |
pq
|
        |
Allgemeines zu Perl |
subroutine redefined heisst, dass du im selben package zweimal die gleiche subroutine
erstellst. du hast die fehlermeldung und die zeile. |
|
Subroutine new() redefined
(#110197) |
2008-05-23 21:00 |
pktm
|
       |
Allgemeines zu Perl |
Jetzt kommt beim Programmstart
[quote]
Subroutine new redefined at /home/pktm/workspace/statmt/TreebankViewer.pm line 50.
[/quote]
Zeile 50 ist die Zeile, in der new() definiert ist.
Also... |
|
Subroutine X redefined at....
(#107777) |
2008-04-03 08:40 |
Froschpopo
|
       |
mod_perl und Apache |
… ändere, dann erhalte ich die Meldung:
[code]
Subroutine X redefined at srv/www/cgi-bin/script.pl
[/code]
Ich habe das Script schon völlig reduziert. |
|
Subroutine new() redefined
(#110233) |
2008-05-24 19:29 |
pktm
|
       |
Allgemeines zu Perl |
[quote="pq+2008-05-24 10:01:28--"]
subroutine redefined heisst, dass du im selben package zweimal die gleiche subroutine
erstellst. du hast die fehlermeldung und die zeile. |
|
Seltsame Warnung: Subroutine header redefined
(#65682) |
2006-05-05 20:17 |
esskar
|
       |
Allgemeines zu Perl |
… use strict;
use warnings;
sub header {
}
Subroutine header redefined at - line 5.
^Z
C:\Dokumente und Einstellungen\sak>perl
use CGI qw//;
use strict;
use warnings;
sub header {
}
^Z… |
|
Seltsame Warnung: Subroutine header redefined
(#65680) |
2006-05-05 20:01 |
GwenDragon
|
       |
Allgemeines zu Perl |
… use, dann gibt es folgende Meldung:
Error.pm: Subroutine header redefined at x:/wwwroot/users/test/web/cgi-bin/lib/Cgi/Error.pm line 72
Wie ist das zu umgehen?
No warnings und in einem Block?
Ich… |
|
Subroutine xyz redefined at... verhindern
(#179846) |
2015-02-23 20:03 |
Linuxer
|
      |
Allgemeines zu Perl |
[c]Subroutine ... redefined at ...[/c] ist eine Warning und nur deswegen sollte das Skript nicht sterben.
Man kann diese Warnung sauber abschalten, indem man ein [c]no warnings 'redefine'[/c] vor… |
|
CGI::XHTML_DTD redefined
(#131119) |
2010-01-24 01:12 |
Escape
|
      |
Allgemeines zu Perl |
… Log habe ich diesen Eintrag:
[quote]Constant subroutine CGI::XHTML_DTD redefined at /usr/lib/perl5/5.8.8/constant.pm line 103[/quote]
Kann mir jemand sagen wie ich das interpretieren soll/muß? |
|
CGI::XHTML_DTD redefined
(#131223) |
2010-01-25 19:45 |
Taulmarill
|
     |
Allgemeines zu Perl |
… -e'*TEST=sub(){1};*TEST=sub(){2}'
Constant subroutine main::TEST redefined at -e line 1.[/code]
Aber nur wenn die beiden subs unterschiedlichen Inhalt haben. |
|
Subroutine X redefined at....
(#107778) |
2008-04-03 10:25 |
renee
|
     |
mod_perl und Apache |
Benutzt Du Apache::Reload? Apache hat die Subroutinen der Module im Speicher und wenn die neu geladen werden, dann werden sie quasi "neu definiert" - auch wenn sie sich gar nicht verändert haben oder… |
|
Subroutine X redefined at....
(#107786) |
2008-04-03 11:51 |
Froschpopo
|
     |
mod_perl und Apache |
… mir irgendwie, dass er dann ein neues Script in eine bereits vorhandene und gefüllte Schachtel einpackt in der schon eine Liste mit den Subroutinen liegt auf der die ganzen Namen schon auftauchen. |
|
Subroutine xyz redefined at... verhindern
(#179830) |
2015-02-23 10:23 |
bianca
|
    |
Allgemeines zu Perl |
… jetzt dies hier versucht, klappt aber nicht, wirft [c]Undefined subroutine &main::testsub called at test.pl line 27.[/c]:[code=perl tabs=4]#!/usr/bin/perl
use strict;
use warnings;
my… |
|
Subroutine xyz redefined at... verhindern
(#179828) |
2015-02-23 08:29 |
bianca
|
    |
Allgemeines zu Perl |
…
}
return '1';[/code]
Wie kann ich jetzt die Meldung [quote]Undefined subroutine &main::testsub called at test.pl line 20.[/quote] abfangen und vor allen Dingen das Script nicht sterben lassen? |
|
Subroutine xyz redefined at... verhindern
(#179831) |
2015-02-23 11:55 |
Linuxer
|
    |
Allgemeines zu Perl |
… Dateien per [pod]perlfunc.require[/pod]() eingebunden, die nur Subroutinen bereitstellen.
Da stecken keine Objekte und/oder Methoden; jedenfalls habe ich das aus den Posts so nicht rausgelesen. |
|
Subroutine X redefined at....
(#107780) |
2008-04-03 10:34 |
Froschpopo
|
   |
mod_perl und Apache |
Mein Perlscript ist ein Hallo-Welt script das nur strict und warnings verwendet.
Von Apache::Reload war nicht die Rede.
Wenn ich SetHandler perl-script auskommentiere, dann klappts auch wieder… |
|
Subroutine X redefined at....
(#107783) |
2008-04-03 11:09 |
betterworld
|
   |
mod_perl und Apache |
[quote="Froschpopo+2008-04-03 06:40:43--"]Der Fehler kommt immer dann, wenn ich das Script zuvor geändert habe und dann auch immer sehr unregelmäßig.[/quote]
Wahrscheinlich einmal pro Apache-Prozess. |
|
Subroutine new() redefined
(#110198) |
2008-05-23 21:03 |
GwenDragon
|
   |
Allgemeines zu Perl |
Benutzt du im Shebang -w? |
|
Subroutine new() redefined
(#110199) |
2008-05-23 21:08 |
pktm
|
   |
Allgemeines zu Perl |
So, jetzt geht es.
-w aus der Befehlszeile von Perl rausgenommen (im Editor), Syntaxfehler beseitigt und schon klappt alles :) |
|
Subroutine new() redefined
(#110209) |
2008-05-24 11:29 |
pktm
|
   |
Allgemeines zu Perl |
Interessanterweise kann ich auch gar keinen Fehler in meinem Modul feststellen.
Der Code ist allerdings viel zu lang zum einstellen. Kann man hier eigentlich Textdateien hochladen?
Grüße, pktm |