« blib/lib/Mail/AuthenticationResults/Header/Comment.pm
↑ Summary
blib/lib/Mail/AuthenticationResults/Header/Version.pm »
| 1 | package Mail::AuthenticationResults::Header::Base; | ||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Base class for modelling parts of the Authentication Results Header | ||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||
| 4 | 29 | require 5.008; | |||||||||||||||||||||||||||||||
| 5 | 29 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 6 | 29 | ▶ | use warnings; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 7 | 29 | our $VERSION = '2.20230112'; # VERSION | |||||||||||||||||||||||||||||||
| 8 | 29 | ▶ | use Scalar::Util qw{ weaken refaddr }; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 9 | 29 | ▶ | use JSON; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 10 | 29 | ▶ | use Carp; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 11 | 29 | ▶ | use Clone qw{ clone }; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||
| 13 | 29 | ▶ | use Mail::AuthenticationResults::Header::Group; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 14 | 29 | ▶ | use Mail::AuthenticationResults::FoldableHeader; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||
| 17 | 254 | ▶ | sub _HAS_KEY{ return 0; } | ||||||||||||||||||||||||||||||
|
Subroutine
_HAS_KEY: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 18 | 34 | ▶ | sub _HAS_VALUE{ return 0; } | ||||||||||||||||||||||||||||||
|
Subroutine
_HAS_VALUE: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 19 | 277 | ▶ | sub _HAS_CHILDREN{ return 0; } | ||||||||||||||||||||||||||||||
|
Subroutine
_HAS_CHILDREN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 20 | sub _ALLOWED_CHILDREN{ # uncoverable subroutine | ||||||||||||||||||||||||||||||||
| 21 | # does not run in Base as HAS_CHILDREN returns 0 | ||||||||||||||||||||||||||||||||
| 22 | 0 | ▶ | return 0; # uncoverable statement | ||||||||||||||||||||||||||||||
|
Subroutine
_ALLOWED_CHILDREN: not called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||
| 26 | sub new { | ||||||||||||||||||||||||||||||||
| 27 | 1905 | ▶ | my ( $class ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 28 | 1905 | my $self = {}; | |||||||||||||||||||||||||||||||
| 29 | 1905 | bless $self, $class; | |||||||||||||||||||||||||||||||
| 30 | 1905 | return $self; | |||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||
| 34 | sub set_key { | ||||||||||||||||||||||||||||||||
| 35 | 383 | ▶ | my ( $self, $key ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
set_key: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||
| 36 | 383 | ▶ | croak 'Does not have key' if ! $self->_HAS_KEY(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 37 | 379 | ▶ | croak 'Key cannot be undefined' if ! defined $key; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 38 | 377 | ▶ | croak 'Key cannot be empty' if $key eq q{}; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 39 | 375 | ▶ | croak 'Invalid characters in key' if $key =~ /"/; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 40 | 373 | ▶ | croak 'Invalid characters in key' if $key =~ /\n/; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 41 | 371 | ▶ | croak 'Invalid characters in key' if $key =~ /\r/; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 42 | 369 | $self->{ 'key' } = $key; | |||||||||||||||||||||||||||||||
| 43 | 369 | return $self; | |||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||
| 47 | sub key { | ||||||||||||||||||||||||||||||||
| 48 | 1186 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
key: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 49 | 1186 | ▶ | croak 'Does not have key' if ! $self->_HAS_KEY(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 50 | 1180 | ▶ | return q{} if ! defined $self->{ 'key' }; #5.8 | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 51 | 1176 | return $self->{ 'key' }; | |||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||
| 55 | sub safe_set_value { | ||||||||||||||||||||||||||||||||
| 56 | 35 | ▶ | my ( $self, $value ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
safe_set_value: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||
| 58 | 35 | ▶ | $value = q{} if ! defined $value; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||
| 60 | 35 | $value =~ s/\t/ /g; | |||||||||||||||||||||||||||||||
| 61 | 35 | $value =~ s/\n/ /g; | |||||||||||||||||||||||||||||||
| 62 | 35 | $value =~ s/\r/ /g; | |||||||||||||||||||||||||||||||
| 63 | 35 | $value =~ s/\(/ /g; | |||||||||||||||||||||||||||||||
| 64 | 35 | $value =~ s/\)/ /g; | |||||||||||||||||||||||||||||||
| 65 | 35 | $value =~ s/\\/ /g; | |||||||||||||||||||||||||||||||
| 66 | 35 | $value =~ s/"/ /g; | |||||||||||||||||||||||||||||||
| 67 | 35 | $value =~ s/;/ /g; | |||||||||||||||||||||||||||||||
| 68 | 35 | $value =~ s/^\s+//; | |||||||||||||||||||||||||||||||
| 69 | 35 | $value =~ s/\s+$//; | |||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||
| 71 | #$value =~ s/ /_/g; | ||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||
| 73 | 35 | $self->set_value( $value ); | |||||||||||||||||||||||||||||||
| 74 | 35 | return $self; | |||||||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||
| 78 | sub set_value { | ||||||||||||||||||||||||||||||||
| 79 | 378 | ▶ | my ( $self, $value ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
set_value: called CC=6 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 80 | 378 | ▶ | croak 'Does not have value' if ! $self->_HAS_VALUE(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 81 | 374 | ▶ | croak 'Value cannot be undefined' if ! defined $value; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 82 | #croak 'Value cannot be empty' if $value eq q{}; | ||||||||||||||||||||||||||||||||
| 83 | 371 | ▶ | croak 'Invalid characters in value' if $value =~ /"/; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 84 | 368 | ▶ | croak 'Invalid characters in value' if $value =~ /\n/; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 85 | 365 | ▶ | croak 'Invalid characters in value' if $value =~ /\r/; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 86 | 362 | $self->{ 'value' } = $value; | |||||||||||||||||||||||||||||||
| 87 | 362 | return $self; | |||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||
| 91 | sub value { | ||||||||||||||||||||||||||||||||
| 92 | 1510 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
value: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 93 | 1510 | ▶ | croak 'Does not have value' if ! $self->_HAS_VALUE(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 94 | 1509 | ▶ | return q{} if ! defined $self->{ 'value' }; # 5.8 | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 95 | 1455 | return $self->{ 'value' }; | |||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||
| 99 | sub stringify { | ||||||||||||||||||||||||||||||||
| 100 | 499 | ▶ | my ( $self, $value ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
stringify: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 101 | 499 | my $string = $value; | |||||||||||||||||||||||||||||||
| 102 | 499 | ▶ | $string = q{} if ! defined $string; #5.8; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||
| 104 | 499 | ▶ | if ( $string =~ /[\s\t \(\);=]/ ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 105 | 34 | $string = '"' . $string . '"'; | |||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||
| 108 | 499 | return $string; | |||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||
| 112 | sub children { | ||||||||||||||||||||||||||||||||
| 113 | 3202 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
children: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 114 | 3202 | ▶ | croak 'Does not have children' if ! $self->_HAS_CHILDREN(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 115 | 3200 | ▶ | return [] if ! defined $self->{ 'children' }; #5.8 | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 116 | 1257 | return $self->{ 'children' }; | |||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||
| 120 | sub orphan { | ||||||||||||||||||||||||||||||||
| 121 | 19 | ▶ | my ( $self, $parent ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
orphan: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 122 | 19 | ▶ | croak 'Child does not have a parent' if ! exists $self->{ 'parent' }; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 123 | 11 | delete $self->{ 'parent' }; | |||||||||||||||||||||||||||||||
| 124 | 11 | return; | |||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||
| 128 | sub copy_children_from { | ||||||||||||||||||||||||||||||||
| 129 | 1 | ▶ | my ( $self, $object ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
copy_children_from: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 130 | 1 | for my $original_entry (@{$object->children()}) { | |||||||||||||||||||||||||||||||
| 131 | 1 | my $entry = clone $original_entry; | |||||||||||||||||||||||||||||||
| 132 | 1 | ▶ | $entry->orphan if exists $entry->{ 'parent' };; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 133 | 1 | $self->add_child( $entry ); | |||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||
| 138 | sub add_parent { | ||||||||||||||||||||||||||||||||
| 139 | 748 | ▶ | my ( $self, $parent ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
add_parent: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 140 | 748 | ▶ | return if ( ref $parent eq 'Mail::AuthenticationResults::Header::Group' ); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 141 | 384 | ▶ | croak 'Child already has a parent' if exists $self->{ 'parent' }; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 142 | 380 | ▶ | croak 'Cannot add parent' if ! $parent->_ALLOWED_CHILDREN( $self ); # uncoverable branch true | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 143 | # Does not run as test is also done in add_child before add_parent is called. | ||||||||||||||||||||||||||||||||
| 144 | 380 | $self->{ 'parent' } = $parent; | |||||||||||||||||||||||||||||||
| 145 | 380 | weaken $self->{ 'parent' }; | |||||||||||||||||||||||||||||||
| 146 | 380 | return; | |||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||
| 150 | sub parent { | ||||||||||||||||||||||||||||||||
| 151 | 732 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
parent: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 152 | 732 | return $self->{ 'parent' }; | |||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||
| 156 | sub remove_child { | ||||||||||||||||||||||||||||||||
| 157 | 16 | ▶ | my ( $self, $child ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
remove_child: called CC=8 SCAR=20.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 158 | 16 | ▶ | croak 'Does not have children' if ! $self->_HAS_CHILDREN(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 159 | 16 | ▶ | croak 'Cannot add child' if ! $self->_ALLOWED_CHILDREN( $child ); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 160 | 16 | ▶ | croak 'Cannot add a class as its own parent' if refaddr $self == refaddr $child; # uncoverable branch true | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 161 | # Does not run as there are no ALLOWED_CHILDREN results which permit this | ||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||
| 163 | 16 | my @children; | |||||||||||||||||||||||||||||||
| 164 | 16 | my $child_removed = 0; | |||||||||||||||||||||||||||||||
| 165 | 16 | foreach my $mychild ( @{ $self->{ 'children' } } ) { | |||||||||||||||||||||||||||||||
| 166 | 39 | ▶ | if ( refaddr $child == refaddr $mychild ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 167 | 16 | ▶ | if ( ref $self ne 'Mail::AuthenticationResults::Header::Group' ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 168 | 10 | $child->orphan(); | |||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||
| 170 | 16 | $child_removed = 1; | |||||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||||||
| 172 | else { | ||||||||||||||||||||||||||||||||
| 173 | 23 | push @children, $mychild; | |||||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||||||
| 175 | } | ||||||||||||||||||||||||||||||||
| 176 | 16 | my $children = $self->{ 'children' }; | |||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||
| 178 | 16 | ▶ | croak 'Not a child of this class' if ! $child_removed; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||
| 180 | 16 | $self->{ 'children' } = \@children; | |||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||
| 182 | 16 | return $self; | |||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||
| 186 | sub add_child { | ||||||||||||||||||||||||||||||||
| 187 | 822 | ▶ | my ( $self, $child ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
add_child: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 188 | 822 | ▶ | croak 'Does not have children' if ! $self->_HAS_CHILDREN(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 189 | 793 | ▶ | croak 'Cannot add child' if ! $self->_ALLOWED_CHILDREN( $child ); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 190 | 768 | ▶ | croak 'Cannot add a class as its own parent' if refaddr $self == refaddr $child; # uncoverable branch true | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 191 | # Does not run as there are no ALLOWED_CHILDREN results which permit this | ||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||
| 193 | 768 | $child->add_parent( $self ); | |||||||||||||||||||||||||||||||
| 194 | 764 | push @{ $self->{ 'children' } }, $child; | |||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||
| 196 | 764 | return $child; | |||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||
| 200 | sub ancestor { | ||||||||||||||||||||||||||||||||
| 201 | 260 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
ancestor: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||
| 203 | 260 | my $depth = 0; | |||||||||||||||||||||||||||||||
| 204 | 260 | my $ancestor = $self->parent(); | |||||||||||||||||||||||||||||||
| 205 | 260 | my $eldest = $self; | |||||||||||||||||||||||||||||||
| 206 | 260 | ▶ | while ( defined $ancestor ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 207 | 463 | $eldest = $ancestor; | |||||||||||||||||||||||||||||||
| 208 | 463 | $ancestor = $ancestor->parent(); | |||||||||||||||||||||||||||||||
| 209 | 463 | $depth++; | |||||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||
| 212 | 260 | return ( $eldest, $depth ); | |||||||||||||||||||||||||||||||
| 213 | } | ||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||
| 216 | sub as_string_prefix { | ||||||||||||||||||||||||||||||||
| 217 | 260 | ▶ | my ( $self, $header ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
as_string_prefix: called CC=6 SCAR=18.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||
| 219 | 260 | my ( $eldest, $depth ) = $self->ancestor(); | |||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||
| 221 | 260 | my $indents = 1; | |||||||||||||||||||||||||||||||
| 222 | 260 | ▶ | if ( $eldest->can( 'indent_by' ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 223 | 260 | $indents = $eldest->indent_by(); | |||||||||||||||||||||||||||||||
| 224 | } | ||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||
| 226 | 260 | my $eol = "\n"; | |||||||||||||||||||||||||||||||
| 227 | 260 | ▶ | if ( $eldest->can( 'eol' ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 228 | 260 | $eol = $eldest->eol(); | |||||||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||||||
| 231 | 260 | my $indent = ' '; | |||||||||||||||||||||||||||||||
| 232 | 260 | my $added = 0; | |||||||||||||||||||||||||||||||
| 233 | 260 | ▶ | if ( $eldest->can( 'indent_on' ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 234 | 260 | ▶ | if ( $eldest->indent_on( ref $self ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 235 | 89 | $header->space( $eol ); | |||||||||||||||||||||||||||||||
| 236 | 89 | $header->space( ' ' x ( $indents * $depth ) ); | |||||||||||||||||||||||||||||||
| 237 | 89 | $added = 1; | |||||||||||||||||||||||||||||||
| 238 | } | ||||||||||||||||||||||||||||||||
| 239 | } | ||||||||||||||||||||||||||||||||
| 240 | 260 | ▶ | $header->space( ' ' ) if ! $added; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||
| 242 | 260 | return $indent; | |||||||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||
| 245 | sub _as_hashref { | ||||||||||||||||||||||||||||||||
| 246 | 46 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
_as_hashref: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||
| 248 | 46 | my $type = lc ref $self; | |||||||||||||||||||||||||||||||
| 249 | 46 | $type =~ s/^(.*::)//; | |||||||||||||||||||||||||||||||
| 250 | 46 | my $hashref = { 'type' => $type }; | |||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||
| 252 | 46 | ▶ | $hashref->{'key'} = $self->key() if $self->_HAS_KEY(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 253 | 46 | ▶ | $hashref->{'value'} = $self->value() if $self->_HAS_VALUE(); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 254 | 46 | ▶ | if ( $self->_HAS_CHILDREN() ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 255 | 34 | my @children = map { $_->_as_hashref() } @{ $self->children() }; | |||||||||||||||||||||||||||||||
| 256 | 34 | $hashref->{'children'} = \@children; | |||||||||||||||||||||||||||||||
| 257 | } | ||||||||||||||||||||||||||||||||
| 258 | 46 | return $hashref; | |||||||||||||||||||||||||||||||
| 259 | } | ||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||
| 262 | sub as_json { | ||||||||||||||||||||||||||||||||
| 263 | 2 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
as_json: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 264 | 2 | my $J = JSON->new(); | |||||||||||||||||||||||||||||||
| 265 | 2 | $J->canonical(); | |||||||||||||||||||||||||||||||
| 266 | 2 | return $J->encode( $self->_as_hashref() ); | |||||||||||||||||||||||||||||||
| 267 | } | ||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||
| 270 | sub as_string { | ||||||||||||||||||||||||||||||||
| 271 | 74 | ▶ | my ( $self ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 272 | 74 | my $header = Mail::AuthenticationResults::FoldableHeader->new(); | |||||||||||||||||||||||||||||||
| 273 | 74 | $self->build_string( $header ); | |||||||||||||||||||||||||||||||
| 274 | 74 | return $header->as_string(); | |||||||||||||||||||||||||||||||
| 275 | } | ||||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||
| 278 | sub build_string { | ||||||||||||||||||||||||||||||||
| 279 | 237 | ▶ | my ( $self, $header ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
build_string: called CC=8 SCAR=20.8
Pod
documented
| |||||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||||
| 281 | 237 | ▶ | if ( ! $self->key() ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 282 | 2 | return; | |||||||||||||||||||||||||||||||
| 283 | } | ||||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||||
| 285 | 235 | $header->string( $self->stringify( $self->key() ) ); | |||||||||||||||||||||||||||||||
| 286 | 235 | ▶ | if ( $self->value() ) { | ||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||
| 287 | 214 | $header->assignment( '=' ); | |||||||||||||||||||||||||||||||
| 288 | 214 | $header->string( $self->stringify( $self->value() ) ); | |||||||||||||||||||||||||||||||
| 289 | } | ||||||||||||||||||||||||||||||||
| 290 | elsif ( $self->value() eq '0' ) { | ||||||||||||||||||||||||||||||||
| 291 | 2 | $header->assignment( '=' ); | |||||||||||||||||||||||||||||||
| 292 | 2 | $header->string( '0' ); | |||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||
| 294 | elsif ( $self->value() eq q{} ) { | ||||||||||||||||||||||||||||||||
| 295 | # special case none here | ||||||||||||||||||||||||||||||||
| 296 | 19 | ▶ | if ( $self->key() ne 'none' ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 297 | 17 | $header->assignment( '=' ); | |||||||||||||||||||||||||||||||
| 298 | 17 | $header->string( '""' ); | |||||||||||||||||||||||||||||||
| 299 | } | ||||||||||||||||||||||||||||||||
| 300 | } | ||||||||||||||||||||||||||||||||
| 301 | 235 | ▶ | if ( $self->_HAS_CHILDREN() ) { # uncoverable branch false | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 302 | # There are no classes which run this code without having children | ||||||||||||||||||||||||||||||||
| 303 | 235 | foreach my $child ( @{$self->children()} ) { | |||||||||||||||||||||||||||||||
| 304 | 181 | $child->as_string_prefix( $header ); | |||||||||||||||||||||||||||||||
| 305 | 181 | $child->build_string( $header ); | |||||||||||||||||||||||||||||||
| 306 | } | ||||||||||||||||||||||||||||||||
| 307 | } | ||||||||||||||||||||||||||||||||
| 308 | 235 | return; | |||||||||||||||||||||||||||||||
| 309 | } | ||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||
| 312 | sub search { | ||||||||||||||||||||||||||||||||
| 313 | 1238 | ▶ | my ( $self, $search ) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
search: called CC=38 SCAR=36.6
Pod
documented
| |||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||
| 315 | 1238 | my $group = Mail::AuthenticationResults::Header::Group->new(); | |||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||
| 317 | 1238 | my $match = 1; | |||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||
| 319 | 1238 | ▶ | if ( exists( $search->{ 'key' } ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 320 | 792 | ▶ | if ( $self->_HAS_KEY() ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 321 | 574 | ▶ | if ( ref $search->{ 'key' } eq 'Regexp' && $self->key() =~ m/$search->{'key'}/ ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
ref $search->{"key"} eq "Regexp" and $self->key =~ /$search->{"key"}/
MC/DC100%2/2
ref $search->{"key"} eq "Regexp" and $self->key =~ /$search->{"key"}/
ref $search->{"key"} eq "Regexp"
$self->key =~ /$search->{"key"}/
Truth table100%3/3
A and B
A= ref $search->{"key"} eq "Regexp"B= $self->key =~ /$search->{"key"}/
| |||||||||||||||||||||||||||||||||
| 322 | 1 | ▶ | $match = $match && 1; # uncoverable statement | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$match && 1
MC/DC0%0/1
$match && 1
$match
Truth table50%1/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 323 | # $match is always 1 at this point, left this way for consistency | ||||||||||||||||||||||||||||||||
| 324 | } | ||||||||||||||||||||||||||||||||
| 325 | elsif ( lc $search->{ 'key' } eq lc $self->key() ) { | ||||||||||||||||||||||||||||||||
| 326 | 84 | ▶ | $match = $match && 1; # uncoverable statement | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$match && 1
MC/DC0%0/1
$match && 1
$match
Truth table50%1/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 327 | # $match is always 1 at this point, left this way for consistency | ||||||||||||||||||||||||||||||||
| 328 | } | ||||||||||||||||||||||||||||||||
| 329 | else { | ||||||||||||||||||||||||||||||||
| 330 | 489 | $match = 0; | |||||||||||||||||||||||||||||||
| 331 | } | ||||||||||||||||||||||||||||||||
| 332 | } | ||||||||||||||||||||||||||||||||
| 333 | else { | ||||||||||||||||||||||||||||||||
| 334 | 218 | $match = 0; | |||||||||||||||||||||||||||||||
| 335 | } | ||||||||||||||||||||||||||||||||
| 336 | } | ||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||
| 338 | 1238 | ▶ | if ( exists( $search->{ 'value' } ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 339 | 694 | ▶ | $search->{ 'value' } = '' if ! defined $search->{ 'value' }; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 340 | 694 | ▶ | if ( $self->_HAS_VALUE() ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 341 | 675 | ▶ | if ( ref $search->{ 'value' } eq 'Regexp' && $self->value() =~ m/$search->{'value'}/ ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
ref $search->{"value"} eq "Regexp" and $self->value =~ /$search->{"value"}/
MC/DC100%2/2
ref $search->{"value"} eq "Regexp" and $self->value =~ /$search->{"value"}/
ref $search->{"value"} eq "Regexp"
$self->value =~ /$search->{"value"}/
Truth table100%3/3
A and B
A= ref $search->{"value"} eq "Regexp"B= $self->value =~ /$search->{"value"}/
| |||||||||||||||||||||||||||||||||
| 342 | 1 | ▶ | $match = $match && 1; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$match && 1
MC/DC0%0/1
$match && 1
$match
Truth table50%1/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 343 | } | ||||||||||||||||||||||||||||||||
| 344 | elsif ( lc $search->{ 'value' } eq lc $self->value() ) { | ||||||||||||||||||||||||||||||||
| 345 | 156 | ▶ | $match = $match && 1; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$match && 1
MC/DC100%1/1
$match && 1
$match
Truth table100%2/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 346 | } | ||||||||||||||||||||||||||||||||
| 347 | else { | ||||||||||||||||||||||||||||||||
| 348 | 518 | $match = 0; | |||||||||||||||||||||||||||||||
| 349 | } | ||||||||||||||||||||||||||||||||
| 350 | } | ||||||||||||||||||||||||||||||||
| 351 | else { | ||||||||||||||||||||||||||||||||
| 352 | 19 | $match = 0; # uncoverable statement | |||||||||||||||||||||||||||||||
| 353 | # There are no code paths with the current classes which end up here | ||||||||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||||||
| 355 | } | ||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||
| 357 | 1238 | ▶ | if ( exists( $search->{ 'authserv_id' } ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 358 | 87 | ▶ | if ( $self->_HAS_VALUE() ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 359 | 82 | ▶ | if ( lc ref $self eq 'mail::authenticationresults::header' ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 360 | 16 | ▶ | my $authserv_id = eval{ $self->value()->value() } || q{}; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
eval {
do {
$self->value->value
}
} || ''
MC/DC0%0/1
eval {
do {
$self->value->value
}
} || ''
eval {
do {
$self->value->value
}
}
Truth table50%1/2
A
A= eval {
do {
$self->value->value
}
}
| |||||||||||||||||||||||||||||||||
| 361 | 16 | ▶ | if ( ref $search->{ 'authserv_id' } eq 'Regexp' && $authserv_id =~ m/$search->{'authserv_id'}/ ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
ref $search->{"authserv_id"} eq "Regexp" and $authserv_id =~ /$search->{"authserv_id"}/
MC/DC100%2/2
ref $search->{"authserv_id"} eq "Regexp" and $authserv_id =~ /$search->{"authserv_id"}/
ref $search->{"authserv_id"} eq "Regexp"
$authserv_id =~ /$search->{"authserv_id"}/
Truth table100%3/3
A and B
A= ref $search->{"authserv_id"} eq "Regexp"B= $authserv_id =~ /$search->{"authserv_id"}/
| |||||||||||||||||||||||||||||||||
| 362 | 2 | ▶ | $match = $match && 1; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$match && 1
MC/DC0%0/1
$match && 1
$match
Truth table50%1/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 363 | } | ||||||||||||||||||||||||||||||||
| 364 | elsif ( lc $search->{ 'authserv_id' } eq lc $authserv_id ) { | ||||||||||||||||||||||||||||||||
| 365 | 3 | ▶ | $match = $match && 1; | ||||||||||||||||||||||||||||||
|
Condition50%1/2
$match && 1
MC/DC0%0/1
$match && 1
$match
Truth table50%1/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 366 | } | ||||||||||||||||||||||||||||||||
| 367 | else { | ||||||||||||||||||||||||||||||||
| 368 | 11 | $match = 0; | |||||||||||||||||||||||||||||||
| 369 | } | ||||||||||||||||||||||||||||||||
| 370 | } | ||||||||||||||||||||||||||||||||
| 371 | else { | ||||||||||||||||||||||||||||||||
| 372 | 66 | $match = 0; | |||||||||||||||||||||||||||||||
| 373 | } | ||||||||||||||||||||||||||||||||
| 374 | } | ||||||||||||||||||||||||||||||||
| 375 | else { | ||||||||||||||||||||||||||||||||
| 376 | 5 | $match = 0; # uncoverable statement | |||||||||||||||||||||||||||||||
| 377 | # There are no code paths with the current classes which end up here | ||||||||||||||||||||||||||||||||
| 378 | } | ||||||||||||||||||||||||||||||||
| 379 | } | ||||||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||||||
| 381 | 1238 | ▶ | if ( exists( $search->{ 'isa' } ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 382 | 412 | ▶ | if ( lc ref $self eq 'mail::authenticationresults::header::' . lc $search->{ 'isa' } ) { | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||
| 383 | 119 | ▶ | $match = $match && 1; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$match && 1
MC/DC100%1/1
$match && 1
$match
Truth table100%2/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 384 | } | ||||||||||||||||||||||||||||||||
| 385 | ▶ | elsif ( lc ref $self eq 'mail::authenticationresults::header' && lc $search->{ 'isa' } eq 'header' ) { | |||||||||||||||||||||||||||||||
|
Condition100%3/3
lc ref $self eq "mail::authenticationresults::header" and lc $search->{"isa"} eq "header"
MC/DC100%2/2
lc ref $self eq "mail::authenticationresults::header" and lc $search->{"isa"} eq "header"
lc ref $self eq "mail::authenticationresults::header"
lc $search->{"isa"} eq "header"
Truth table100%3/3
A and B
A= lc ref $self eq "mail::authenticationresults::header"B= lc $search->{"isa"} eq "header"
| |||||||||||||||||||||||||||||||||
| 386 | 5 | ▶ | $match = $match && 1; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$match && 1
MC/DC100%1/1
$match && 1
$match
Truth table100%2/2
A
A= $match
| |||||||||||||||||||||||||||||||||
| 387 | } | ||||||||||||||||||||||||||||||||
| 388 | else { | ||||||||||||||||||||||||||||||||
| 389 | 288 | $match = 0; | |||||||||||||||||||||||||||||||
| 390 | } | ||||||||||||||||||||||||||||||||
| 391 | } | ||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||
| 393 | 1238 | ▶ | if ( exists( $search->{ 'has' } ) ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 394 | 33 | foreach my $query ( @{ $search->{ 'has' } } ) { | |||||||||||||||||||||||||||||||
| 395 | 38 | ▶ | $match = 0 if ( scalar @{ $self->search( $query )->children() } == 0 ); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 396 | } | ||||||||||||||||||||||||||||||||
| 397 | } | ||||||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||||||
| 399 | 1238 | ▶ | if ( $match ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 400 | 170 | $group->add_child( $self ); | |||||||||||||||||||||||||||||||
| 401 | } | ||||||||||||||||||||||||||||||||
| 402 | |||||||||||||||||||||||||||||||||
| 403 | 1238 | ▶ | if ( $self->_HAS_CHILDREN() ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 404 | 1004 | foreach my $child ( @{$self->children()} ) { | |||||||||||||||||||||||||||||||
| 405 | 1088 | my $childfound = $child->search( $search ); | |||||||||||||||||||||||||||||||
| 406 | 1088 | ▶ | if ( scalar @{ $childfound->children() } ) { | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 407 | 199 | $group->add_child( $childfound ); | |||||||||||||||||||||||||||||||
| 408 | } | ||||||||||||||||||||||||||||||||
| 409 | } | ||||||||||||||||||||||||||||||||
| 410 | } | ||||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||
| 412 | 1238 | return $group; | |||||||||||||||||||||||||||||||
| 413 | } | ||||||||||||||||||||||||||||||||
| 414 | |||||||||||||||||||||||||||||||||
| 415 | 29 | 1; | |||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||
| 417 | __END__ | ||||||||||||||||||||||||||||||||