Hi,

I'd like to take a given named route, and ask what the placeholders are 
that it expects.

I'm trying to do a relatively simple call of
$c->url_for( $route_name, \%url_params );

However, the keys for %url_params are coming out of database tables, and 
I've run into a case where the logic is breaking down when I create the 
key.  (it's trying to append '_identifier' to the column name when it 
shouldn't).

I'd like to be able to check if the key name that is created matches the 
placeholder name used by the route before calling out to url_for.

It looks like if I do
$foo=$c->app->routes->find($route_name)
that then I can see the placeholder underneath
$foo->pattern->tree

But I feel like I'm diving too deep into it.  Is there a better way?

Thanks in advance for any thoughts,
-Randall

-- 
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 https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to