| 1 | # Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. | ||||||||||||||||||||||||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||||||||||||||||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||||||||||||||||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.03. | ||||||||||||||||||||||||||||||||
| 5 | # This code is part of distribution Mail-Message. Meta-POD processed with | ||||||||||||||||||||||||||||||||
| 6 | # OODoc into POD and HTML manual-pages. See README.md | ||||||||||||||||||||||||||||||||
| 7 | # Copyright Mark Overmeer. Licensed under the same terms as Perl itself. | ||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||
| 9 | package Mail::Message::Field::Attribute; | ||||||||||||||||||||||||||||||||
| 10 | 23 | ▶ | use vars '$VERSION'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 11 | 23 | $VERSION = '3.012'; | |||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||
| 13 | 23 | ▶ | use base 'Mail::Reporter'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||
| 15 | 23 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 16 | 23 | ▶ | use warnings; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||
| 18 | 23 | ▶ | use Encode (); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 19 | 23 | ▶ | use Carp; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||
| 22 | 23 | ▶ | use Carp 'cluck'; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 23 | use overload | ||||||||||||||||||||||||||||||||
| 24 | 302 | ▶ | '""' => sub {shift->value} | ||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 25 | 176 | ▶ | , cmp => sub { my ($self, $other) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=15.4
| |||||||||||||||||||||||||||||||||
| 26 | 176 | ▶ | UNIVERSAL::isa($other, 'Mail::Message::Field') | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
lc($_[0])->name cmp lc $_[1]->name or $_[0]->value cmp $_[1]->value
MC/DC0%0/2
lc($_[0])->name cmp lc $_[1]->name or $_[0]->value cmp $_[1]->value
lc($_[0])->name cmp lc $_[1]->name
$_[0]->value cmp $_[1]->value
Truth table0%0/3
A or B
A= lc($_[0])->name cmp lc $_[1]->nameB= $_[0]->value cmp $_[1]->value
| |||||||||||||||||||||||||||||||||
| 27 | ? (lc($_[0])->name cmp lc($_[1]->name) || $_[0]->value cmp $_[1]->value) | ||||||||||||||||||||||||||||||||
| 28 | : $_[0]->value cmp $_[1] | ||||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||||
| 30 | 23 | ▶ | , fallback => 1; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||
| 34 | sub new($$@) | ||||||||||||||||||||||||||||||||
| 35 | 125 | ▶ | { my ($class, $attr) = (shift, shift); | ||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 36 | 125 | ▶ | my $value = @_ % 2 == 1 ? shift : undef; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 37 | 125 | $class->SUPER::new(attr => $attr, value => $value, @_); | |||||||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||
| 40 | sub init($$) | ||||||||||||||||||||||||||||||||
| 41 | 125 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
init: called CC=8 SCAR=20.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 42 | 125 | $self->SUPER::init($args); | |||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||
| 44 | 125 | my ($attr, $value, $cont) = @$args{ qw/attr value use_continuations/ }; | |||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||
| 46 | 125 | ▶ | my $name = ($attr =~ m/^(.*?)(?:\*\d+)?\*?\s*\=\s*/ ? $1 : $attr); | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 47 | 125 | ▶ | $self->log(WARNING => "Illegal character in parameter name '$name'.") | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 48 | if $name !~ m/^[!#-'*+\-.0-9A-Z^-~]+$/; | ||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||
| 50 | 125 | $self->{MMFF_name} = $name; | |||||||||||||||||||||||||||||||
| 51 | 125 | ▶ | $self->{MMFF_usecont} = defined $cont ? $cont : 1; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 52 | 125 | ▶ | $self->{MMFF_charset} = $args->{charset} if defined $args->{charset}; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 53 | 125 | ▶ | $self->{MMFF_language} = $args->{language} if defined $args->{language}; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||
| 55 | 125 | ▶ | $self->value(defined $value ? "$value" : ''); # enforce stringification | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 56 | 125 | ▶ | $self->addComponent($attr) if $attr ne $name; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||
| 58 | 125 | $self; | |||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||
| 61 | #------------------------------------------ | ||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||
| 64 | 74 | ▶ | sub name() { shift->{MMFF_name} } | ||||||||||||||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||
| 67 | sub value(;$) | ||||||||||||||||||||||||||||||||
| 68 | 641 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||
|
Subroutine
value: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 69 | 641 | ▶ | if(@_) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 70 | 133 | { delete $self->{MMFF_cont}; | |||||||||||||||||||||||||||||||
| 71 | 133 | return $self->{MMFF_value} = shift; | |||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||
| 73 | 508 | ▶ | exists $self->{MMFF_value} ? $self->{MMFF_value} : $self->decode; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||
| 77 | sub addComponent($) | ||||||||||||||||||||||||||||||||
| 78 | 86 | ▶ | { my ($self, $component) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
addComponent: called CC=6 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||
| 79 | 86 | delete $self->{MMFF_value}; | |||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||
| 81 | 86 | my ($name, $value) = split /\=/, $component, 2; | |||||||||||||||||||||||||||||||
| 82 | 86 | ▶ | if( substr($name, -1) eq '*' && $value =~ m/^([^']*)\'([^']*)\'/ ) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
substr($name, -1) eq "*" and $value =~ /^([^']*)\'([^']*)\'/
MC/DC100%2/2
substr($name, -1) eq "*" and $value =~ /^([^']*)\'([^']*)\'/
substr($name, -1) eq "*"
$value =~ /^([^']*)\'([^']*)\'/
Truth table100%3/3
A and B
A= substr($name, -1) eq "*"B= $value =~ /^([^']*)\'([^']*)\'/
| |||||||||||||||||||||||||||||||||
| 83 | 6 | ▶ | { $self->{MMFF_charset} = length $1 ? $1 : undef; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 84 | 6 | ▶ | $self->{MMFF_language} = length $2 ? $2 : undef; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||
| 87 | 86 | ▶ | if( $name =~ m/\*([0-9]+)\*?$/ ) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 88 | 8 | { $self->{MMFF_cont}[$1] = $component } | |||||||||||||||||||||||||||||||
| 89 | 78 | else { $self->{MMFF_cont} = [ $component ] } | |||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||
| 91 | 86 | $component; | |||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||
| 95 | 7 | ▶ | sub charset() { shift->{MMFF_charset} } | ||||||||||||||||||||||||||||||
|
Subroutine
charset: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||
| 98 | 7 | ▶ | sub language() { shift->{MMFF_language} } | ||||||||||||||||||||||||||||||
|
Subroutine
language: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||
| 101 | sub string() | ||||||||||||||||||||||||||||||||
| 102 | 63 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||
|
Subroutine
string: called CC=4 SCAR=14.0
Pod
documented
| |||||||||||||||||||||||||||||||||
| 103 | 63 | ▶ | my $cont = $self->{MMFF_cont} || $self->encode; | ||||||||||||||||||||||||||||||
|
Condition66%2/3
$self->{'MMFF_cont'} || $self->encode
MC/DC0%0/2
$self->{'MMFF_cont'} || $self->encode
$self->{'MMFF_cont'}
$self->encode
Truth table66%2/3
A || B
A= $self->{'MMFF_cont'}B= $self->encode
| |||||||||||||||||||||||||||||||||
| 104 | 63 | ▶ | return @$cont if wantarray; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 105 | 9 | ▶ | return [] unless @$cont; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||
| 107 | 9 | local $" = "; "; | |||||||||||||||||||||||||||||||
| 108 | 9 | "; @$cont"; | |||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||
| 111 | #------------------------------------------ | ||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||
| 114 | sub encode() | ||||||||||||||||||||||||||||||||
| 115 | 48 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||
|
Subroutine
encode: called CC=14 SCAR=26.5
Pod
documented
| |||||||||||||||||||||||||||||||||
| 116 | 48 | my $value = $self->{MMFF_value}; | |||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||
| 118 | 48 | my @lines; | |||||||||||||||||||||||||||||||
| 119 | 48 | my ($pre, $encoded); | |||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||
| 121 | 48 | ▶ | my $charset = $self->{MMFF_charset} || ''; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{'MMFF_charset'} || ''
MC/DC100%1/1
$self->{'MMFF_charset'} || ''
$self->{'MMFF_charset'}
Truth table100%2/2
A
A= $self->{'MMFF_charset'}
| |||||||||||||||||||||||||||||||||
| 122 | 48 | ▶ | my $lang = $self->{MMFF_language} || ''; | ||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->{'MMFF_language'} || ''
MC/DC100%1/1
$self->{'MMFF_language'} || ''
$self->{'MMFF_language'}
Truth table100%2/2
A
A= $self->{'MMFF_language'}
| |||||||||||||||||||||||||||||||||
| 123 | 48 | my $name = $self->{MMFF_name}; | |||||||||||||||||||||||||||||||
| 124 | 48 | my $cont = $self->{MMFF_usecont}; | |||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||
| 126 | 48 | ▶ | if($charset || $lang) | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition66%2/3
$charset or $lang
MC/DC50%1/2
$charset or $lang
$charset
$lang
Truth table66%2/3
A or B
A= $charsetB= $lang
| |||||||||||||||||||||||||||||||||
| 127 | 6 | { $pre = "$name*0*=$charset'$lang'"; | |||||||||||||||||||||||||||||||
| 128 | 6 | $value = Encode::encode($charset, $value, 0); | |||||||||||||||||||||||||||||||
| 129 | 6 | $encoded = 1; | |||||||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||||||
| 131 | elsif(grep m/[^\x20-\x7E]/, $value) | ||||||||||||||||||||||||||||||||
| 132 | 0 | { $pre = "$name*0*=''"; | |||||||||||||||||||||||||||||||
| 133 | 0 | $encoded = 1; | |||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||
| 135 | else | ||||||||||||||||||||||||||||||||
| 136 | 42 | { $pre = "$name*0="; | |||||||||||||||||||||||||||||||
| 137 | 42 | $value =~ s/"/\\"/g; | |||||||||||||||||||||||||||||||
| 138 | 42 | $encoded = 0; | |||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||
| 141 | 48 | ▶ | if($encoded) | ||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||
| 142 | { # Use encoding | ||||||||||||||||||||||||||||||||
| 143 | 6 | my @c = split //, $value; | |||||||||||||||||||||||||||||||
| 144 | 6 | ▶ | while(@c) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 145 | 169 | { my $c = shift @c; | |||||||||||||||||||||||||||||||
| 146 | 169 | ▶ | $c = '%'. sprintf "%02X", ord $c | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 147 | unless $c =~ m/[a-zA-Z0-9]/; | ||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||
| 149 | 169 | ▶ | if($cont && length($pre) + length($c)> 76) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$cont and length($pre) + length($c) > 76
MC/DC100%2/2
$cont and length($pre) + length($c) > 76
$cont
length($pre) + length($c) > 76
Truth table100%3/3
A and B
A= $contB= length($pre) + length($c) > 76
| |||||||||||||||||||||||||||||||||
| 150 | 2 | { push @lines, $pre; | |||||||||||||||||||||||||||||||
| 151 | 2 | $pre = $name . '*' . @lines . '*=' . $c; | |||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||
| 153 | 167 | else { $pre .= $c } | |||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||
| 155 | 6 | push @lines, $pre; | |||||||||||||||||||||||||||||||
| 156 | } | ||||||||||||||||||||||||||||||||
| 157 | elsif($cont) | ||||||||||||||||||||||||||||||||
| 158 | { # Simple string, but with continuations | ||||||||||||||||||||||||||||||||
| 159 | 42 | while(1) | |||||||||||||||||||||||||||||||
| 160 | 43 | { push @lines, $pre.'"'. substr($value, 0, 75-length($pre), '') .'"'; | |||||||||||||||||||||||||||||||
| 161 | 43 | ▶ | last unless length $value; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 162 | 1 | $pre = $name . '*' . @lines . '='; | |||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||||||
| 166 | else | ||||||||||||||||||||||||||||||||
| 167 | { # Single string only | ||||||||||||||||||||||||||||||||
| 168 | 0 | push @lines, $pre . $value; | |||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||
| 171 | 48 | ▶ | $lines[0] =~ s/\*0// if @lines==1; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 172 | 48 | $self->{MMFF_cont} = \@lines; | |||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||||||
| 176 | sub decode() | ||||||||||||||||||||||||||||||||
| 177 | 85 | ▶ | { my $self = shift; | ||||||||||||||||||||||||||||||
|
Subroutine
decode: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||
| 178 | 85 | my $value = ''; | |||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||
| 180 | 85 | foreach my $cont ( @{$self->{MMFF_cont}} ) | |||||||||||||||||||||||||||||||
| 181 | 91 | ▶ | { unless(defined $cont) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 182 | 1 | { $value .= "[continuation missing]"; | |||||||||||||||||||||||||||||||
| 183 | 1 | next; | |||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||
| 186 | 90 | (my $name, local $_) = split /\=/, $cont, 2; | |||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||
| 188 | 90 | ▶ | if(substr($name, -1) eq '*') | ||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||
| 189 | 12 | { s/^[^']*\'[^']*\'//; | |||||||||||||||||||||||||||||||
| 190 | 12 | s/\%([a-fA-F0-9]{2})/chr hex $1/ge; | |||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||
| 192 | 1 | elsif( s/^\"(.*)\"$/$1/ ) { s/\\\"/"/g } | |||||||||||||||||||||||||||||||
| 193 | 2 | elsif( s/^\'(.*)\'$/$1/ ) { s/\\\'/'/g } | |||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||
| 195 | 90 | $value .= $_; | |||||||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||
| 198 | 85 | my $charset = $self->{MMFF_charset}; | |||||||||||||||||||||||||||||||
| 199 | 85 | ▶ | $value = Encode::decode($charset, $value, 0) if $charset; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||
| 201 | 85 | $self->{MMFF_value} = $value; | |||||||||||||||||||||||||||||||
| 202 | } | ||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||
| 204 | #------------------------------------------ | ||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||
| 207 | sub mergeComponent($) | ||||||||||||||||||||||||||||||||
| 208 | 1 | ▶ | { my ($self, $comp) = @_; | ||||||||||||||||||||||||||||||
|
Subroutine
mergeComponent: called CC=4 SCAR=14.3
Pod
documented
| |||||||||||||||||||||||||||||||||
| 209 | my $cont = $self->{MMFF_cont} | ||||||||||||||||||||||||||||||||
| 210 | 1 | ▶ | or croak "ERROR: Too late to merge: value already changed."; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||
| 212 | defined $_ && $self->addComponent($_) | ||||||||||||||||||||||||||||||||
| 213 | 1 | ▶ | foreach @{$comp->{MMFF_cont}}; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||
| 215 | 1 | $self; | |||||||||||||||||||||||||||||||
| 216 | } | ||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||
| 218 | 23 | 1; | |||||||||||||||||||||||||||||||