| 1 | package Tapper::MCP::Control; | ||||||||||
| 2 | 27 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||
| 3 | 27 | $Tapper::MCP::Control::VERSION = '5.0.9'; | |||||||||
| 4 | 27 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 27 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 27 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 27 | ▶ | use Tapper::Config; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 27 | ▶ | use Tapper::Model qw/model/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 27 | extends 'Tapper::MCP'; | |||||||||
| 12 | |||||||||||
| 13 | 27 | has testrun => (is => 'ro', | |||||||||
| 14 | isa => 'Tapper::Schema::TestrunDB::Result::Testrun', | ||||||||||
| 15 | ); | ||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | 36 | ▶ | around BUILDARGS => sub { | ||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||
| 20 | 36 | my $orig = shift; | |||||||||
| 21 | 36 | my $class = shift; | |||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | 36 | my $args; | |||||||||
| 25 | 36 | ▶ | if ( @_ == 1) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 36 | ▶ | if (not ref $_[0] eq 'HASH' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 31 | $args->{testrun} = $_[0]; | |||||||||
| 28 | } else { | ||||||||||
| 29 | 5 | $args = shift; | |||||||||
| 30 | } | ||||||||||
| 31 | 36 | ▶ | if (not ref $args->{testrun}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 26 | $args->{testrun} = model->resultset('Testrun')->find($args->{testrun}); | |||||||||
| 33 | } | ||||||||||
| 34 | 36 | return $args; | |||||||||
| 35 | } | ||||||||||
| 36 | 27 | }; | |||||||||
| 37 | |||||||||||
| 38 | 27 | 1; | |||||||||
| 39 | |||||||||||
| 40 | __END__ | ||||||||||