| File | /usr/lib/perl5/vendor_perl/5.10.1/Catalyst/DispatchType.pm |
| Statements Executed | 141 |
| Statement Execution Time | 1.65ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 130 | 1 | 1 | 1.46ms | 1.46ms | Catalyst::DispatchType::_is_low_precedence |
| 1 | 1 | 1 | 161µs | 13.9ms | Catalyst::DispatchType::BEGIN@3 |
| 1 | 1 | 1 | 43µs | 510µs | Catalyst::DispatchType::BEGIN@5 |
| 2 | 1 | 1 | 12µs | 12µs | Catalyst::DispatchType::list |
| 0 | 0 | 0 | 0s | 0s | Catalyst::DispatchType::expand_action |
| 0 | 0 | 0 | 0s | 0s | Catalyst::DispatchType::match |
| 0 | 0 | 0 | 0s | 0s | Catalyst::DispatchType::register |
| 0 | 0 | 0 | 0s | 0s | Catalyst::DispatchType::uri_for_action |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Catalyst::DispatchType; | ||||
| 2 | |||||
| 3 | 3 | 322µs | 2 | 27.6ms | # spent 13.9ms (161µs+13.7) within Catalyst::DispatchType::BEGIN@3 which was called
# once (161µs+13.7ms) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 3 # spent 13.9ms making 1 call to Catalyst::DispatchType::BEGIN@3
# spent 13.7ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:389] |
| 4 | 1 | 10µs | 1 | 32.8ms | with 'MooseX::Emulate::Class::Accessor::Fast'; # spent 32.8ms making 1 call to Moose::with |
| 5 | 3 | 384µs | 2 | 977µs | # spent 510µs (43+467) within Catalyst::DispatchType::BEGIN@5 which was called
# once (43µs+467µs) by Class::MOP::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Class/MOP.pm:103] at line 5 # spent 510µs making 1 call to Catalyst::DispatchType::BEGIN@5
# spent 467µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:478] |
| 6 | |||||
| 7 | =head1 NAME | ||||
| 8 | |||||
| 9 | Catalyst::DispatchType - DispatchType Base Class | ||||
| 10 | |||||
| 11 | =head1 SYNOPSIS | ||||
| 12 | |||||
| 13 | See L<Catalyst>. | ||||
| 14 | |||||
| 15 | =head1 DESCRIPTION | ||||
| 16 | |||||
| 17 | This is an abstract base class for Dispatch Types. | ||||
| 18 | |||||
| 19 | From a code perspective, dispatch types are used to find which actions | ||||
| 20 | to call for a given request URL. Website authors will typically work | ||||
| 21 | with them via subroutine names attributes; a description of dispatch | ||||
| 22 | at the attribute/URL level is given in L<Catalyst::Manual::Intro>. | ||||
| 23 | |||||
| 24 | =head1 METHODS | ||||
| 25 | |||||
| 26 | =head2 $self->list($c) | ||||
| 27 | |||||
| 28 | abstract method, to be implemented by dispatchtypes. Called to display | ||||
| 29 | info in debug log. | ||||
| 30 | |||||
| 31 | =cut | ||||
| 32 | |||||
| 33 | 2 | 23µs | # spent 12µs within Catalyst::DispatchType::list which was called 2 times, avg 6µs/call:
# 2 times (12µs+0s) by Catalyst::Dispatcher::_display_action_tables at line 650 of Catalyst/Dispatcher.pm, avg 6µs/call | ||
| 34 | |||||
| 35 | =head2 $self->match( $c, $path ) | ||||
| 36 | |||||
| 37 | abstract method, to be implemented by dispatchtypes. Returns true if the | ||||
| 38 | dispatch type matches the given path | ||||
| 39 | |||||
| 40 | =cut | ||||
| 41 | |||||
| 42 | sub match { die "Abstract method!" } | ||||
| 43 | |||||
| 44 | =head2 $self->register( $c, $action ) | ||||
| 45 | |||||
| 46 | abstract method, to be implemented by dispatchtypes. Takes a | ||||
| 47 | context object and a L<Catalyst::Action> object. | ||||
| 48 | |||||
| 49 | Should return true if it registers something, or false otherwise. | ||||
| 50 | |||||
| 51 | =cut | ||||
| 52 | |||||
| 53 | sub register { } | ||||
| 54 | |||||
| 55 | =head2 $self->uri_for_action( $action, \@captures ) | ||||
| 56 | |||||
| 57 | abstract method, to be implemented by dispatchtypes. Takes a | ||||
| 58 | L<Catalyst::Action> object and an arrayref of captures, and should | ||||
| 59 | return either a URI part which if placed in $c->req->path would cause | ||||
| 60 | $self->match to match this action and set $c->req->captures to the supplied | ||||
| 61 | arrayref, or undef if unable to do so. | ||||
| 62 | |||||
| 63 | =cut | ||||
| 64 | |||||
| 65 | sub uri_for_action { } | ||||
| 66 | |||||
| 67 | =head2 $self->expand_action | ||||
| 68 | |||||
| 69 | Default fallback, returns nothing. See L<Catalyst::Dispatcher> for more info | ||||
| 70 | about expand_action. | ||||
| 71 | |||||
| 72 | =cut | ||||
| 73 | |||||
| 74 | sub expand_action { } | ||||
| 75 | |||||
| 76 | 130 | 865µs | # spent 1.46ms within Catalyst::DispatchType::_is_low_precedence which was called 130 times, avg 11µs/call:
# 130 times (1.46ms+0s) by Catalyst::Dispatcher::register at line 531 of Catalyst/Dispatcher.pm, avg 11µs/call | ||
| 77 | |||||
| 78 | =head1 AUTHORS | ||||
| 79 | |||||
| 80 | Catalyst Contributors, see Catalyst.pm | ||||
| 81 | |||||
| 82 | =head1 COPYRIGHT | ||||
| 83 | |||||
| 84 | This library is free software. You can redistribute it and/or modify it under | ||||
| 85 | the same terms as Perl itself. | ||||
| 86 | |||||
| 87 | =cut | ||||
| 88 | |||||
| 89 | 1 | 18µs | 2 | 9.34ms | __PACKAGE__->meta->make_immutable; # spent 9.29ms making 1 call to Class::MOP::Class::make_immutable
# spent 48µs making 1 call to Catalyst::DispatchType::meta |
| 90 | |||||
| 91 | 1 | 31µs | 1; |