| 1 | package App::SmokeBrew::PerlVersion; | ||||||||||
| 2 | 9 | $App::SmokeBrew::PerlVersion::VERSION = '1.06'; | |||||||||
| 3 | #ABSTRACT: Moose role for perl versions | ||||||||||
| 4 | |||||||||||
| 5 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 9 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 9 | ▶ | use Perl::Version; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 9 | ▶ | use Module::CoreList; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 9 | ▶ | use App::SmokeBrew::Types qw[PerlVersion]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 9 | has 'version' => ( | |||||||||
| 14 | is => 'ro', | ||||||||||
| 15 | isa => 'PerlVersion', | ||||||||||
| 16 | required => 1, | ||||||||||
| 17 | coerce => 1, | ||||||||||
| 18 | ); | ||||||||||
| 19 | |||||||||||
| 20 | 3 | ▶ | sub perl_version { | ||||||||
|
Subroutine
perl_version: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 21 | 3 | my $self = shift; | |||||||||
| 22 | 3 | ( my $numify = $self->version->numify ) =~ s/_//g; | |||||||||
| 23 | 3 | ▶ | my $pv = 'perl'.( $numify < 5.006 ? $self->version->numify : $self->version->normal ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 3 | $pv =~ s/perlv/perl-/g; | |||||||||
| 25 | 3 | return $pv; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub is_dev_release { | ||||||||
|
Subroutine
is_dev_release: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 29 | 0 | my $self = shift; | |||||||||
| 30 | 0 | ▶ | return 0 unless $self->version->numify >= 5.006; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | 0 | return $self->version->version % 2; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 1 | ▶ | sub can_quadmath { | ||||||||
|
Subroutine
can_quadmath: called CC=2 SCAR=8.1
Pod
documented
| |||||||||||
| 35 | 1 | my $self = shift; | |||||||||
| 36 | 1 | ▶ | return 0 unless $self->version->numify >= 5.021004; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 0 | return 1; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 0 | ▶ | sub can_jobs { | ||||||||
|
Subroutine
can_jobs: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 41 | 0 | my $self = shift; | |||||||||
| 42 | 0 | ▶ | return 0 unless $self->version->numify >= 5.019004; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | 0 | return 1; | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 9 | ▶ | no Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 47 | |||||||||||
| 48 | 9 | qq[Smokin']; | |||||||||
| 49 | |||||||||||
| 50 | __END__ | ||||||||||