| 1 | 7 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 2 | 7 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | |||||||||||||||
| 4 | package Maven::Xml::Common::BaseProfile; | ||||||||||||||
| 5 | 7 | $Maven::Xml::Common::BaseProfile::VERSION = '1.12'; | |||||||||||||
| 6 | # ABSTRACT: Maven BaseProfile element | ||||||||||||||
| 7 | # PODNAME: Maven::Xml::Common::BaseProfile | ||||||||||||||
| 8 | |||||||||||||||
| 9 | 7 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 10 | 7 | __PACKAGE__->follow_best_practice; | |||||||||||||
| 11 | 7 | __PACKAGE__->mk_ro_accessors( | |||||||||||||
| 12 | qw( | ||||||||||||||
| 13 | activation | ||||||||||||||
| 14 | id | ||||||||||||||
| 15 | pluginRepositories | ||||||||||||||
| 16 | properties | ||||||||||||||
| 17 | repositories | ||||||||||||||
| 18 | ) | ||||||||||||||
| 19 | ); | ||||||||||||||
| 20 | |||||||||||||||
| 21 | sub _add_value { | ||||||||||||||
| 22 | 107 | ▶ | my ( $self, $name, $value ) = @_; | ||||||||||||
|
Subroutine
_add_value: called CC=6 SCAR=17.9
| |||||||||||||||
| 23 | |||||||||||||||
| 24 | 107 | ▶ | return if ( $name eq 'profile' ); | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 25 | 107 | ▶ | return if ( $name eq 'repositories' ); | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 26 | 91 | ▶ | return if ( $name eq 'pluginRepositories' ); | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 27 | |||||||||||||||
| 28 | 77 | ▶ | if ( $name eq 'repository' ) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 29 | 15 | push( @{ $self->{repositories} }, $value ); | |||||||||||||
| 30 | } | ||||||||||||||
| 31 | elsif ( $name eq 'pluginRepository' ) { | ||||||||||||||
| 32 | 13 | push( @{ $self->{pluginRepositories} }, $value ); | |||||||||||||
| 33 | } | ||||||||||||||
| 34 | else { | ||||||||||||||
| 35 | 49 | $self->Maven::Xml::XmlNodeParser::_add_value( $name, $value ); | |||||||||||||
| 36 | } | ||||||||||||||
| 37 | } | ||||||||||||||
| 38 | |||||||||||||||
| 39 | sub _get_parser { | ||||||||||||||
| 40 | 92 | ▶ | my ( $self, $name ) = @_; | ||||||||||||
|
Subroutine
_get_parser: called CC=5 SCAR=16.2
| |||||||||||||||
| 41 | 92 | ▶ | if ( $name eq 'activation' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 42 | 16 | return Maven::Xml::Common::BaseProfile::Activation->new(); | |||||||||||||
| 43 | } | ||||||||||||||
| 44 | 76 | ▶ | if ( $name eq 'properties' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 45 | 0 | return Maven::Xml::Common::Properties->new(); | |||||||||||||
| 46 | } | ||||||||||||||
| 47 | 76 | ▶ | if ( $name eq 'repository' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 48 | 15 | return Maven::Xml::Common::Repository->new(); | |||||||||||||
| 49 | } | ||||||||||||||
| 50 | 61 | ▶ | if ( $name eq 'pluginRepository' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 51 | 13 | return Maven::Xml::Common::Repository->new(); | |||||||||||||
| 52 | } | ||||||||||||||
| 53 | 48 | return $self; | |||||||||||||
| 54 | } | ||||||||||||||
| 55 | |||||||||||||||
| 56 | package Maven::Xml::Common::BaseProfile::Activation; | ||||||||||||||
| 57 | 7 | $Maven::Xml::Common::BaseProfile::Activation::VERSION = '1.12'; | |||||||||||||
| 58 | 7 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 59 | 7 | __PACKAGE__->follow_best_practice; | |||||||||||||
| 60 | 7 | __PACKAGE__->mk_ro_accessors( | |||||||||||||
| 61 | qw( | ||||||||||||||
| 62 | activeByDefault | ||||||||||||||
| 63 | file | ||||||||||||||
| 64 | jdk | ||||||||||||||
| 65 | os | ||||||||||||||
| 66 | property | ||||||||||||||
| 67 | ) | ||||||||||||||
| 68 | ); | ||||||||||||||
| 69 | |||||||||||||||
| 70 | sub _get_parser { | ||||||||||||||
| 71 | 44 | ▶ | my ( $self, $name ) = @_; | ||||||||||||
|
Subroutine
_get_parser: called CC=4 SCAR=13.9
| |||||||||||||||
| 72 | 44 | ▶ | if ( $name eq 'os' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 73 | 13 | return Maven::Xml::Common::BaseProfile::Activation::Os->new(); | |||||||||||||
| 74 | } | ||||||||||||||
| 75 | 31 | ▶ | if ( $name eq 'property' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 76 | 13 | return Maven::Xml::Common::BaseProfile::Activation::Property->new(); | |||||||||||||
| 77 | } | ||||||||||||||
| 78 | 18 | ▶ | if ( $name eq 'file' ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 79 | 13 | return Maven::Xml::Common::BaseProfile::Activation::File->new(); | |||||||||||||
| 80 | } | ||||||||||||||
| 81 | 5 | return $self; | |||||||||||||
| 82 | } | ||||||||||||||
| 83 | |||||||||||||||
| 84 | package Maven::Xml::Common::BaseProfile::Activation::Os; | ||||||||||||||
| 85 | 7 | $Maven::Xml::Common::BaseProfile::Activation::Os::VERSION = '1.12'; | |||||||||||||
| 86 | 7 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 87 | 7 | __PACKAGE__->follow_best_practice; | |||||||||||||
| 88 | 7 | __PACKAGE__->mk_ro_accessors( | |||||||||||||
| 89 | qw( | ||||||||||||||
| 90 | arch | ||||||||||||||
| 91 | name | ||||||||||||||
| 92 | family | ||||||||||||||
| 93 | version | ||||||||||||||
| 94 | ) | ||||||||||||||
| 95 | ); | ||||||||||||||
| 96 | |||||||||||||||
| 97 | package Maven::Xml::Common::BaseProfile::Activation::Property; | ||||||||||||||
| 98 | 7 | $Maven::Xml::Common::BaseProfile::Activation::Property::VERSION = '1.12'; | |||||||||||||
| 99 | 7 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 100 | 7 | __PACKAGE__->follow_best_practice; | |||||||||||||
| 101 | 7 | __PACKAGE__->mk_ro_accessors( | |||||||||||||
| 102 | qw( | ||||||||||||||
| 103 | name | ||||||||||||||
| 104 | value | ||||||||||||||
| 105 | ) | ||||||||||||||
| 106 | ); | ||||||||||||||
| 107 | |||||||||||||||
| 108 | package Maven::Xml::Common::BaseProfile::Activation::File; | ||||||||||||||
| 109 | 7 | $Maven::Xml::Common::BaseProfile::Activation::File::VERSION = '1.12'; | |||||||||||||
| 110 | 7 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 111 | 7 | __PACKAGE__->follow_best_practice; | |||||||||||||
| 112 | 7 | __PACKAGE__->mk_ro_accessors( | |||||||||||||
| 113 | qw( | ||||||||||||||
| 114 | exists | ||||||||||||||
| 115 | missing | ||||||||||||||
| 116 | ) | ||||||||||||||
| 117 | ); | ||||||||||||||
| 118 | |||||||||||||||
| 119 | 7 | 1; | |||||||||||||
| 120 | |||||||||||||||
| 121 | __END__ | ||||||||||||||