Thread sub und prototype: called to early too check prototype (4 answers)
Opened by Gast at 2004-08-11 19:47

renee
 2004-08-11 20:45
#85704 #85704
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
das hier funktioniert:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#! c:\perl\bin\perl

use strict;
use warnings;

sub test($$$); # hier ist der Prototyp

test({name => 'dies'},'ist','ein');

sub test($$$){
my ($hashref,$d,$e) = @_;
print $hashref->{name};
}


Also schon vor dem Aufruf einen Prototypen der Methode anlegen!
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread sub und prototype: called to early too check prototype