Thread CGI::Application: Vorgehensweise (Frage am Rande) (16 answers)
Opened by pktm at 2004-05-18 12:22

ptk
 2004-05-18 16:53
#29243 #29243
User since
2003-11-28
3645 Artikel
ModeratorIn
[default_avatar]
[quote=Dieter,18.May.2004, 14:51]Wie wär's dann damit?
Code: (dl )
1
2
3
4
5
6
7
   my $event = {
'src' => \&sub_1(q|attrib_1|),
'file' => \&sub_2(q|attrib_2|),
'keyword' => \&sub_3(q|attrib_3|),
};

$event->{$param->{'Runmode'}->()};
[/quote]
Richtig geht es so:
Code: (dl )
1
2
3
4
5
   my $event = {
'src' => sub { sub_1(q|attrib_1|) },
'file' => sub { sub_2(q|attrib_2|) },
'keyword' => sub { sub_3(q|attrib_3|) },
};

View full thread CGI::Application: Vorgehensweise (Frage am Rande)