From d8b7e4d092f7c48c3caac6106de4837390fe6323 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 4 Feb 2010 15:44:11 +0100 Subject: [PATCH] =?utf8?q?Modul-=20und=20Funktionsnamen=20m=C3=BCssen=20mi?= =?utf8?q?t=20einem=20Buchstaben=20beginnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Dispatcher.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 76d49b5f8..3b64e48c3 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -206,18 +206,18 @@ sub _route_request { } sub _route_dispatcher_request { - my $action_re = '[a-z0-9_\-]+'; + my $name_re = qr{[a-z]\w*}; my ($script_name, $action); eval { - die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^$action_re$/); + die "Unroutable request -- inavlid module name.\n" if !$::form->{M} || ($::form->{M} !~ m/^${name_re}$/); $script_name = $::form->{M} . '.pl'; if ($::form->{A}) { $action = $::form->{A}; } else { - $action = first { m/^A_${action_re}$/ } keys %{ $::form }; + $action = first { m/^A_${name_re}$/ } keys %{ $::form }; die "Unroutable request -- inavlid action name.\n" if !$action; delete $::form->{$action}; -- 2.20.1