On Jan 19, 2010, at 8:55 PM, Pavel O. Karoukin wrote:
> Hello,
>
> Started using Catalyst::Pluign::SubRequest but found one annoying issue - by
> default it doesn't duplicate $c->req->params.I.e. each time I need to request
> some block for page I have to use subinclude('path/to/action', {},
> c.reg.params) instead plain subinclude('path/to/action');
>
> Is it only me who think that SubRequest should include current request params
> by default and may be it was done this way by some intent I am missing?
It may not be only you but it's definitely not me There's no reason to assume
that the request parameters from your original request have anything to do with
your subrequest. Subrequest is an entirely independent dispatch - you're asking
for trouble by making general assumptions like that. In order to operate
safely, the code I've written that uses subrequest would need a way to clear
out those automatically passed parameters. It's far safer to expect the
programmer to pass them in in the cases where they are desired.
- john romkey
http://www.romkey.com/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/