On 20 Jan 2010, at 01:55, Pavel O. Karoukin wrote:
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?

Yes it is just you :)

However nothing is stopping you writing:

around subrequest => sub {
    my ($orig, $self, @args) = @_;
    my $p = ref($args[-1]) eq 'HASH' ? pop(@args) : $c->req->params;
    $self->$orig(@args, $p);
};

Or something similar to add the params if you don't specify them manually..

You could even do something a little smarter with Catalyst::Utils::merge_hashes, I'll leave that as an exercise for the reader :)

Cheers
t0m


_______________________________________________
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/

Reply via email to