« lib/Reaction/InterfaceModel/Collection/DBIC/Role/Where.pm
↑ Summary
lib/Reaction/UI/ViewPort/Field/Array.pm »
| 1 | package Reaction::UI::ViewPort::Action::Link; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use Reaction::Class; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | extends 'Reaction::UI::ViewPort'; | |||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use namespace::clean -except => [ qw(meta) ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use MooseX::Types::URI qw/Uri/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use MooseX::Types::Moose qw/Object CodeRef/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | has uri => ( is => 'rw', isa => Uri, lazy_build => 1); | |||||||||
| 11 | 1 | has label => (is => 'rw', required => 1); | |||||||||
| 12 | |||||||||||
| 13 | 1 | has target => (isa => Object, is => 'rw', required => 1); | |||||||||
| 14 | 1 | has action => (isa => CodeRef, is => 'rw', required => 1); | |||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub BUILD { | ||||||||
|
Subroutine
BUILD: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 17 | 0 | my $self = shift; | |||||||||
| 18 | 0 | ▶ | $self->label( $self->label->($self->target) ) if ref $self->label eq 'CODE'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | sub _build_uri { | ||||||||
|
Subroutine
_build_uri: not called CC=1 SCAR=6.9
| |||||||||||
| 22 | 0 | my $self = shift; | |||||||||
| 23 | 0 | my $c = $self->ctx; | |||||||||
| 24 | 0 | my ($c_name, $a_name, @rest) = @{ $self->action->($self->target, $c) }; | |||||||||
| 25 | 0 | $c->uri_for($c->controller($c_name)->action_for($a_name),@rest); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 29 | |||||||||||
| 30 | 1 | 1; | |||||||||