| 1 | # ABSTRACT: Base class for all Actions | ||
| 2 | |||
| 3 | package Pinto::Action; | ||
| 4 | |||
| 5 | 82 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 82 | ▶ | use MooseX::StrictConstructor; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 82 | ▶ | use MooseX::Types::Moose qw(Str); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 82 | ▶ | use MooseX::MarkAsMethods ( autoclean => 1 ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 82 | ▶ | use Pinto::Result; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 82 | ▶ | use Pinto::Util qw(throw); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 82 | ▶ | use Pinto::Constants qw($PINTO_LOCK_TYPE_SHARED); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | #------------------------------------------------------------------------------ | ||
| 15 | |||
| 16 | 82 | our $VERSION = '0.14'; # VERSION | |
| 17 | |||
| 18 | #------------------------------------------------------------------------------ | ||
| 19 | |||
| 20 | 82 | with qw( Pinto::Role::Plated ); | |
| 21 | |||
| 22 | #------------------------------------------------------------------------------ | ||
| 23 | |||
| 24 | 82 | has repo => ( | |
| 25 | is => 'ro', | ||
| 26 | isa => 'Pinto::Repository', | ||
| 27 | required => 1, | ||
| 28 | ); | ||
| 29 | |||
| 30 | has result => ( | ||
| 31 | is => 'ro', | ||
| 32 | isa => 'Pinto::Result', | ||
| 33 | 122 | ▶ | default => sub { Pinto::Result->new }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 34 | 82 | init_arg => undef, | |
| 35 | lazy => 1, | ||
| 36 | ); | ||
| 37 | |||
| 38 | 82 | has lock_type => ( | |
| 39 | is => 'ro', | ||
| 40 | isa => Str, | ||
| 41 | default => $PINTO_LOCK_TYPE_SHARED, | ||
| 42 | init_arg => undef, | ||
| 43 | ); | ||
| 44 | |||
| 45 | #------------------------------------------------------------------------------ | ||
| 46 | |||
| 47 | 209 | ▶ | sub BUILD { } |
|
Subroutine
BUILD: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 48 | |||
| 49 | #------------------------------------------------------------------------------ | ||
| 50 | |||
| 51 | 0 | ▶ | sub execute { throw 'Abstract method' } |
|
Subroutine
execute: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 52 | |||
| 53 | #------------------------------------------------------------------------------ | ||
| 54 | |||
| 55 | 82 | __PACKAGE__->meta->make_immutable; | |
| 56 | |||
| 57 | #------------------------------------------------------------------------------ | ||
| 58 | 82 | 1; | |
| 59 | |||
| 60 | __END__ | ||