| JSORB documentation | Contained in the JSORB distribution. |
JSORB::Dispatcher::Catalyst::WithInvocant - A Catalyst dispatcher for invocants
Very similar to JSORB::Dispatcher::Catalyst but handles the creation of object invocants for each request.
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Stevan Little <stevan.little@iinteractive.com>
Copyright 2008-2010 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| JSORB documentation | Contained in the JSORB distribution. |
package JSORB::Dispatcher::Catalyst::WithInvocant; use Moose; our $VERSION = '0.04'; our $AUTHORITY = 'cpan:STEVAN'; extends 'JSORB::Dispatcher::Path'; with 'JSORB::Dispatcher::Traits::WithInvocantFactory'; has 'constructor_arg_generators' => ( is => 'ro', isa => 'HashRef[CodeRef]', default => sub { {} }, ); sub prepare_handler_args { my ($self, $call, $c) = @_; my $procedure = $self->get_procedure_from_call($call); return unless defined $procedure; my $constructor_generator = $self->constructor_arg_generators->{ $procedure->class_name }; return unless defined $constructor_generator; return $constructor_generator->($c); } __PACKAGE__->meta->make_immutable; no Moose; 1; __END__