| 1 | package Magpie::Dispatcher::RequestParam; | ||||||||||||||||||||||||||||
| 2 | 8 | $Magpie::Dispatcher::RequestParam::VERSION = '1.141660'; | |||||||||||||||||||||||||||
| 3 | 8 | ▶ | use MooseX::Role::Parameterized; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | # ABSTRACT: Request Parameter Dispatcher | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 8 | parameter state_param => ( | |||||||||||||||||||||||||||
| 8 | is => 'ro', | ||||||||||||||||||||||||||||
| 9 | isa => 'Str', | ||||||||||||||||||||||||||||
| 10 | default => 'appstate', | ||||||||||||||||||||||||||||
| 11 | ); | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | role { | ||||||||||||||||||||||||||||
| 14 | 8 | ▶ | my $p = shift; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 8 | has 'state_param' => ( | |||||||||||||||||||||||||||
| 17 | is => 'ro', | ||||||||||||||||||||||||||||
| 18 | isa => 'Str', | ||||||||||||||||||||||||||||
| 19 | default => $p->state_param, | ||||||||||||||||||||||||||||
| 20 | ); | ||||||||||||||||||||||||||||
| 21 | 8 | }; | |||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | sub load_queue { | ||||||||||||||||||||||||||||
| 24 | 24 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
load_queue: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 25 | 24 | my @events = (); | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 24 | ▶ | if ($self->can('init')) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 28 | 18 | push @events, 'init'; | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 24 | my $state = $self->request->param( $self->state_param ); | |||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 24 | ▶ | if ($state and $self->can($state)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$state and $self->can($state)
MC/DC50%1/2
$state and $self->can($state)
$state
$self->can($state)
Truth table66%2/3
A and B
A= $stateB= $self->can($state)
| |||||||||||||||||||||||||||||
| 34 | 21 | push @events, $state; | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | else { | ||||||||||||||||||||||||||||
| 37 | 3 | ▶ | push(@events, 'default') if $self->can('default'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 24 | return @events; | |||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 8 | 1; | |||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | =pod | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | =head1 NAME | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | Magpie::Dispatcher::RequestParam - Request Parameter Dispatcher | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | =head1 VERSION | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | version 1.141660 | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | =head1 AUTHORS | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | =over 4 | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | =item * | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | Kip Hampton <kip.hampton@tamarou.com> | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | =item * | ||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | Chris Prather <chris.prather@tamarou.com> | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | =back | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | This software is copyright (c) 2011 by Tamarou, LLC. | ||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 75 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | =cut | ||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||
| 80 | __END__ | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||