| 1 | 6 | ▶ | use 5.008; # utf8 | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | package Git::Wrapper::Plus::Support::RangeSet; | ||||||||||
| 7 | 6 | $Git::Wrapper::Plus::Support::RangeSet::VERSION = '0.004010'; | |||||||||
| 8 | # ABSTRACT: A set of ranges of supported things | ||||||||||
| 9 | |||||||||||
| 10 | 6 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |||||||||
| 11 | |||||||||||
| 12 | 6 | ▶ | use Moo qw( has ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | 6 | has 'items' => ( is => ro =>, lazy => 1, builder => 1 ); | |||||||||
| 21 | |||||||||||
| 22 | sub _build_items { | ||||||||||
| 23 | 118 | ▶ | return []; | ||||||||
|
Subroutine
_build_items: called CC=1 SCAR=0.0
| |||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | |||||||||||
| 27 | |||||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | |||||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | sub add_range_object { | ||||||||||
| 35 | 118 | ▶ | my ( $self, $range_object ) = @_; | ||||||||
|
Subroutine
add_range_object: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 36 | 118 | push @{ $self->items }, $range_object; | |||||||||
| 37 | 118 | return $self; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | |||||||||||
| 41 | |||||||||||
| 42 | |||||||||||
| 43 | |||||||||||
| 44 | |||||||||||
| 45 | |||||||||||
| 46 | |||||||||||
| 47 | |||||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | |||||||||||
| 51 | |||||||||||
| 52 | |||||||||||
| 53 | sub add_range { | ||||||||||
| 54 | 118 | ▶ | my ( $self, @args ) = @_; | ||||||||
|
Subroutine
add_range: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 55 | 118 | my $config; | |||||||||
| 56 | 118 | ▶ | if ( 1 == @args ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | 118 | $config = $args[0]; | |||||||||
| 58 | } | ||||||||||
| 59 | else { | ||||||||||
| 60 | 0 | $config = {@args}; | |||||||||
| 61 | } | ||||||||||
| 62 | 118 | require Git::Wrapper::Plus::Support::Range; | |||||||||
| 63 | 118 | return $self->add_range_object( Git::Wrapper::Plus::Support::Range->new($config) ); | |||||||||
| 64 | } | ||||||||||
| 65 | |||||||||||
| 66 | |||||||||||
| 67 | |||||||||||
| 68 | |||||||||||
| 69 | |||||||||||
| 70 | |||||||||||
| 71 | |||||||||||
| 72 | |||||||||||
| 73 | |||||||||||
| 74 | |||||||||||
| 75 | sub supports_version { | ||||||||||
| 76 | 35 | ▶ | my ( $self, $version_object ) = @_; | ||||||||
|
Subroutine
supports_version: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 77 | 35 | for my $item ( @{ $self->items } ) { | |||||||||
| 78 | 35 | my $cmp = $item->supports_version($version_object); | |||||||||
| 79 | 35 | ▶ | return $cmp if defined $cmp; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | } | ||||||||||
| 81 | 1 | return; | |||||||||
| 82 | } | ||||||||||
| 83 | |||||||||||
| 84 | 6 | ▶ | no Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 85 | 6 | 1; | |||||||||
| 86 | |||||||||||
| 87 | __END__ | ||||||||||