| 1 | package App::Midgen::Role::AttributesX; | ||
| 2 | |||
| 3 | 2 | ▶ | use Types::Standard qw( InstanceOf ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use MetaCPAN::Client; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use Perl::PrereqScanner; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | # Load time and dependencies negate execution time | ||
| 9 | # use namespace::clean -except => 'meta'; | ||
| 10 | |||
| 11 | 2 | our $VERSION = '0.34'; | |
| 12 | 2 | $VERSION = eval $VERSION; ## no critic | |
| 13 | |||
| 14 | 2 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | ####### | ||
| 17 | # some encapsulated -> attributes | ||
| 18 | ####### | ||
| 19 | |||
| 20 | 2 | has 'mcpan' => ( | |
| 21 | is => 'ro', | ||
| 22 | isa => InstanceOf [ 'MetaCPAN::Client', ], | ||
| 23 | lazy => 1, | ||
| 24 | builder => '_build_mcpan', | ||
| 25 | handles => [qw( distribution module )], | ||
| 26 | ); | ||
| 27 | |||
| 28 | 0 | ▶ | sub _build_mcpan { |
|
Subroutine
_build_mcpan: not called CC=1 SCAR=6.9
| |||
| 29 | 0 | my $self = shift; | |
| 30 | 0 | return MetaCPAN::Client->new(); | |
| 31 | } | ||
| 32 | |||
| 33 | 2 | has 'scanner' => ( | |
| 34 | is => 'ro', | ||
| 35 | isa => InstanceOf [ 'Perl::PrereqScanner', ], | ||
| 36 | lazy => 1, | ||
| 37 | builder => '_build_scanner', | ||
| 38 | handles => [qw( scan_ppi_document )], | ||
| 39 | ); | ||
| 40 | |||
| 41 | 0 | ▶ | sub _build_scanner { |
|
Subroutine
_build_scanner: not called CC=1 SCAR=6.9
| |||
| 42 | 0 | my $self = shift; | |
| 43 | 0 | return Perl::PrereqScanner->new(); | |
| 44 | } | ||
| 45 | |||
| 46 | 2 | ▶ | no Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 47 | |||
| 48 | 2 | 1; | |
| 49 | |||
| 50 | __END__ | ||