[jifty-devel] Dispatcher woes
Jesse Vincent
jesse at bestpractical.com
Tue Dec 2 11:24:43 EST 2008
On Tue 2.Dec'08 at 11:45:52 +0200, Mikko Lipasti wrote:
> Hello list,
>
>
> I'm having problems figuring out how to work with the Dispatcher.
>
> This is what I have in the Dispatcher:
>
>
> under [ 'blog', 'wiki' ] => [
> run {
> default model => "MyApp::Model::\u$1";
> },
> on 'search' => run {
> set op => 'search';
> },
> ];
I'm not sure I'd mix run and on like that.
What happens if you replace run with
on '*' => run {
}
>
> on '**' => show 'dump'; # prints out whats in %ARGS
>
>
> This is what I expect:
>
> /blog/search: model => 'MyApp::Model::Blog', op => 'search'
> /wiki/search: model => 'MyApp::Model::Wiki', op => 'search'
>
> However, what I get is dependant upon the order in which I visit the
> pages. Two pages, two possible orderings:
>
> 1. /blog/search first
> /blog/search: model => 'MyApp::Model::Blog', op => 'search'
> /wiki/search: model => 'MyApp::Model::Wiki'
>
> 2. /wiki/search first
> /wiki/search: model => 'MyApp::Model::Wiki', op => 'search'
> /blog/search: model => 'MyApp::Model::Blog'
>
> In both cases, the latter page loses the op arg, in fact the entire on
> 'search' run block is lost: it isn't triggered at all.
>
>
> What's going on?
>
>
> I'm using Jifty-0.80408.
>
>
> Best,
>
> Mikko
>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.jifty.org/pipermail/jifty-devel/attachments/20081202/db852019/attachment.pgp
More information about the jifty-devel
mailing list