It must be late at night and I do not have enough coffee but why does this

 

$rapp->route("/timezone")->via('GET')->to("select#timezone");

$rapp->route("/timezone/:id")->via('GET')->to("select#timezone");

 

and this work


 my $key = "timezone";
 my $action = "timezone";
 my $controler = "select";
 
$rapp->route("/$key")->via('GET')->to("$controler#$action");

$rapp->route("/$key/:id")->via('GET')->to("$controler#$action");

 

but this does not

 

my $routes = {timesone=>{action =>'detail',
                                                       controller=>'profile',}),

 

 foreach my $key (keys(%{$routes})){
       my $route   =  $routes->{$key};
       
$rapp->route("/$key")->via('GET')->to($route->{controller}."#".$route->{action});
       
$rapp->route("/$key:id")->via('GET')->to($route->{controller}."#".$route->{action});
}
                                          

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to