[Catalyst] Advice needed on porting 5.7 plugin (monkeypatches
Cat::Request)
Tomas Doran
bobtfish at bobtfish.net
Fri Aug 21 16:26:51 GMT 2009
Pedro Melo wrote:
> * is it possible for a plugin, at setup time, to set the request_class()?
Yes.
before setup_finalize => sub { my $self = shift;
$self->request_class("New::Request::Class"); };
> * is there a better way?
Yes. Make a request class role, then use CatalystX::RoleApplicator
to apply it to the request class.
See Catalyst::Plugin::Browser for an example of it being used in a plugin.
Cheers
t0m
More information about the Catalyst
mailing list