[Catalyst] uri_for and Chained actions
Ash Berlin
ash_cpan at firemirror.com
Thu Oct 11 09:05:46 GMT 2007
Oleg Pronin wrote:
> If your project is heavy loaded then i think the best way is to write:
> <form action="/myapp/[%object.id%]/update">
> or (easy to change):
> <form action="[%object.update_url%]">
> in Object:
> sub update_url {'/myapp/'.shift->id.'/update}
>
> because Catalyst.uri_for() still takes to much CPU to call it a hundred
> times per page.
>
>
If you really think that is needed, then at least do it like the following:
action="[% base # or Catalyst.req.base %]/[% object.id %]/update"
So that your app rebases it self properly.
More information about the Catalyst
mailing list