File Coverage

blib/lib/Pinto/Action.pm
Criterion Covered Total %
statement 21 22 95.4
branch n/a
condition n/a
subroutine 8 9 88.8
pod 0 2 0.0
total 29 33 87.8


line stmt bran cond sub pod time code
1             # ABSTRACT: Base class for all Actions
2              
3             package Pinto::Action;
4              
5 51     51   30243 use Moose;
  51         126  
  51         393  
6 51     51   371967 use MooseX::StrictConstructor;
  51         125  
  51         474  
7 51     51   175364 use MooseX::Types::Moose qw(Str);
  51         129  
  51         532  
8 51     51   248115 use MooseX::MarkAsMethods ( autoclean => 1 );
  51         131  
  51         460  
9              
10 51     51   199052 use Pinto::Result;
  51         140  
  51         744  
11 51     51   1642 use Pinto::Util qw(throw);
  51         123  
  51         3647  
12 51     51   345 use Pinto::Constants qw($PINTO_LOCK_TYPE_SHARED);
  51         105  
  51         14878  
13              
14             #------------------------------------------------------------------------------
15              
16             our $VERSION = '0.13'; # VERSION
17              
18             #------------------------------------------------------------------------------
19              
20             with qw( Pinto::Role::Plated );
21              
22             #------------------------------------------------------------------------------
23              
24             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             default => sub { Pinto::Result->new },
34             init_arg => undef,
35             lazy => 1,
36             );
37              
38             has lock_type => (
39             is => 'ro',
40             isa => Str,
41             default => $PINTO_LOCK_TYPE_SHARED,
42             init_arg => undef,
43             );
44              
45             #------------------------------------------------------------------------------
46              
47       442 0   sub BUILD { }
48              
49             #------------------------------------------------------------------------------
50              
51 0     0 0   sub execute { throw 'Abstract method' }
52              
53             #------------------------------------------------------------------------------
54              
55             __PACKAGE__->meta->make_immutable;
56              
57             #------------------------------------------------------------------------------
58             1;
59              
60             __END__
61              
62             =pod
63              
64             =encoding UTF-8
65              
66             =for :stopwords Jeffrey Ryan Thalhammer
67              
68             =head1 NAME
69              
70             Pinto::Action - Base class for all Actions
71              
72             =head1 VERSION
73              
74             version 0.13
75              
76             =head1 AUTHOR
77              
78             Jeffrey Ryan Thalhammer <jeff@stratopan.com>
79              
80             =head1 COPYRIGHT AND LICENSE
81              
82             This software is copyright (c) 2015 by Jeffrey Ryan Thalhammer.
83              
84             This is free software; you can redistribute it and/or modify it under
85             the same terms as the Perl 5 programming language system itself.
86              
87             =cut