Hello,

----- Original Message ----- 
> I suggest using whichever match comes first in the dispatch list. That
> way it's easy to understand and control, no?
> 
> 
> Dave

I agree with Dave's point.

Things would be easier to code - and easier to understand from "users" point
of view.

But I'm a bit lost on the point on this - the only benefit I see compared to 
doing this by
just .htaccess/mod_rewrite (which you need to use anyway) - is that you can 
generate
the links [ such as: url_for( controller => 'Blog', rm => 'recent' ); ]


Anyway in the nature of true (lazy) programmers I'm also interested in a 
solution that would enable
you to work the magic without specifying the dispatch map. Say similar to 
AutoRunmode module ...

In a similar way as the Dispatch modules works (first part is module, second is 
runmode/method).
We could just stuff the rest of the params inside url as matching name value ...

==== Sample ==== 

    www.site.com/Module/Method/param_name/10 or 
www.site.com/Module/Method/param_name=10

    Would dispatch to Module (include some prefix if applicable), call it's 
Method sub, and set param_name to 10 ...

==== Sample ==== 

At present I use a combination of .htaccess and Dispatch module/plugin. And I 
send all url's that end in .perl to the
Dispatcher. I also have a function (in Page.pm called display) that I use to 
process templates that do not contain
any code behind them - but still need some processing to include header/footer 
or similar.

== In .htaccess file ==

    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.+)(\.perl)$ /index.pl/$1 [L]
    RewriteRule ^(.+)(\.dhtml)$ /index.pl/Page/display/?page=$1.dwt [L]

== In .htaccess file ==

Of course I build my url's by hand ...

Cheers,
Alex.

Reply via email to