| 1 | 10 | ▶ | use utf8; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | 10 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 10 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 10 | ▶ | no warnings qw(uninitialized); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | #====================================================== | ||||||||||||||||||||||||||||
| 7 | package XML::Pastor::SimpleType; | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 10 | ▶ | use XML::LibXML; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 10 | ▶ | use XML::Pastor::Type; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 10 | ▶ | use Scalar::Util qw(reftype); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | 10 | ▶ | use XML::Pastor::Util qw(getAttributeHash getChildrenHashDOM); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 10 | our @ISA = qw(XML::Pastor::Type); | |||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | #---------------------------------------------- | ||||||||||||||||||||||||||||
| 22 | # xml_validate_value | ||||||||||||||||||||||||||||
| 23 | #---------------------------------------------- | ||||||||||||||||||||||||||||
| 24 | 0 | ▶ | sub xml_validate_value { | ||||||||||||||||||||||||||
|
Subroutine
xml_validate_value: not called CC=54 SCAR=80.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 25 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 26 | 0 | ▶ | my $path = shift || ''; | ||||||||||||||||||||||||||
|
Condition0%0/2
shift() || ''
MC/DC0%0/1
shift() || ''
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||||||||||||||||||
| 27 | 0 | my $type = $self->XmlSchemaType(); | |||||||||||||||||||||||||||
| 28 | 0 | my $value = $self->__value; | |||||||||||||||||||||||||||
| 29 | 0 | $value = $self->normalize_whitespace($value); | |||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 0 | ▶ | unless (defined $type) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 32 | 0 | ▶ | return ($self->xml_validate_further(@_) && $self->xml_validate_ancestors(@_)); | ||||||||||||||||||||||||||
|
Condition0%0/3
$self->xml_validate_further(@_) && $self->xml_validate_ancestors(@_)
MC/DC0%0/2
$self->xml_validate_further(@_) && $self->xml_validate_ancestors(@_)
$self->xml_validate_further(@_)
$self->xml_validate_ancestors(@_)
Truth table0%0/3
A && B
A= $self->xml_validate_further(@_)B= $self->xml_validate_ancestors(@_)
| |||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 0 | ▶ | if (defined(my $prop = $type->length)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 37 | 0 | foreach my $len (@$prop) { | |||||||||||||||||||||||||||
| 38 | 0 | ▶ | ($len == length($value)) or die "Pastor : Validate : $path : Length must be exactly '$len' for value '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 39 | } | ||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 0 | ▶ | if (defined(my $prop = $type->minLength)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 43 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 44 | 0 | foreach my $minLen (@$prop) { | |||||||||||||||||||||||||||
| 45 | 0 | ▶ | (length($value) >= $minLen) or die "Pastor : Validate : $path : Length must be minimum '$minLen' for value '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 0 | ▶ | if (defined(my $prop = $type->maxLength)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 50 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 51 | 0 | foreach my $maxLen (@$prop) { | |||||||||||||||||||||||||||
| 52 | 0 | ▶ | (length($value) <= $maxLen) or die "Pastor : Validate : $path : Length must be maximum '$maxLen' for value '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 0 | ▶ | if (defined(my $prop = $type->regex)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 57 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 58 | 0 | my $pass=0; | |||||||||||||||||||||||||||
| 59 | 0 | foreach my $regex (@$prop) { | |||||||||||||||||||||||||||
| 60 | 0 | ▶ | if ($value =~ /$regex/) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 61 | 0 | $pass =1; | |||||||||||||||||||||||||||
| 62 | 0 | last; | |||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||
| 65 | 0 | ▶ | $pass or die "Pastor : Validate : $path : Value does not match any of the given regexes. Value is '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | 0 | ▶ | if (defined(my $prop = $type->pattern)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 69 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 70 | 0 | my $pass=0; | |||||||||||||||||||||||||||
| 71 | 0 | foreach my $pattern (@$prop) { | |||||||||||||||||||||||||||
| 72 | 0 | ▶ | if ($value =~ /$pattern/) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 73 | 0 | $pass =1; | |||||||||||||||||||||||||||
| 74 | 0 | last; | |||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||
| 77 | 0 | ▶ | $pass or die "Pastor : Validate : $path : Value does not match any of the given patterns. Value is '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | 0 | ▶ | if (defined(my $enumeration = $type->enumeration)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 82 | 0 | ▶ | (exists $enumeration->{$value}) or die "Pastor : Validate : $path : Not in the permitted enumeration : value '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||
| 86 | 0 | ▶ | if (defined(my $prop = $type->minInclusive)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 87 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 88 | 0 | foreach my $min (@$prop) { | |||||||||||||||||||||||||||
| 89 | 0 | ▶ | ($value >= $min) or die "Pastor : Validate : $path : Value must be at least (minimum) '$min' : But value is '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||
| 93 | 0 | ▶ | if (defined(my $prop = $type->maxInclusive)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 94 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 95 | 0 | foreach my $max (@$prop) { | |||||||||||||||||||||||||||
| 96 | 0 | ▶ | ($value <= $max) or die "Pastor : Validate : $path : Value must be at most (maximum) '$max' : But value is '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | 0 | ▶ | if (defined(my $prop = $type->minExclusive)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 101 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 102 | 0 | foreach my $min (@$prop) { | |||||||||||||||||||||||||||
| 103 | 0 | ▶ | ($value > $min) or die "Pastor : Validate : $path : Value must be greater than '$min' : But value is '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | 0 | ▶ | if (defined(my $prop = $type->maxExclusive)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 108 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 109 | 0 | foreach my $max (@$prop) { | |||||||||||||||||||||||||||
| 110 | 0 | ▶ | ($value < $max) or die "Pastor : Validate : $path : Value must be less than '$max' : But value is '$value'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||
| 112 | } | ||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||
| 115 | # Digits part is shamelessly copied from XML::Validator::Schema by Sam Tregar | ||||||||||||||||||||||||||||
| 116 | 0 | ▶ | if (defined($type->totalDigits) || defined($type->fractionDigits)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $type->totalDigits or defined $type->fractionDigits
MC/DC0%0/2
defined $type->totalDigits or defined $type->fractionDigits
defined $type->totalDigits
defined $type->fractionDigits
Truth table0%0/3
A or B
A= defined $type->totalDigitsB= defined $type->fractionDigits
| |||||||||||||||||||||||||||||
| 117 | # strip leading and trailing zeros for numeric constraints | ||||||||||||||||||||||||||||
| 118 | 0 | my $digits = $value; | |||||||||||||||||||||||||||
| 119 | 0 | $digits =~ s/^([+-]?)0*(\d*\.?\d*?)0*$/$1$2/g; | |||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | 0 | ▶ | if (defined(my $prop=$type->totalDigits)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 122 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 123 | 0 | foreach my $tdigits (@$prop) { | |||||||||||||||||||||||||||
| 124 | 0 | ▶ | die "Pastor : Validate : $path : Value has more total digits than the allowed '$tdigits'" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 125 | if $digits =~ tr!0-9!! > $tdigits; | ||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | 0 | ▶ | if (defined(my $prop=$type->fractionDigits)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 130 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 131 | 0 | foreach my $fdigits (@$prop) { | |||||||||||||||||||||||||||
| 132 | 0 | ▶ | die "Pastor : Validate : $path : Value has more fraction digits than the allowed '$fdigits'" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 133 | if $digits =~ /\.\d{$fdigits}\d/; | ||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||
| 135 | } | ||||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||
| 139 | 0 | return 1; | |||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 145 | # By default, this just returns TRUE. But it could be overriden by descendants (like 'date'). | ||||||||||||||||||||||||||||
| 146 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 147 | 0 | ▶ | sub xml_validate_further { | ||||||||||||||||||||||||||
|
Subroutine
xml_validate_further: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 148 | 0 | return 1; | |||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||
| 152 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 153 | # Validate the ancestors. Base classes need to be validated. | ||||||||||||||||||||||||||||
| 154 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 155 | 0 | ▶ | sub xml_validate_ancestors { | ||||||||||||||||||||||||||
|
Subroutine
xml_validate_ancestors: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 156 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 157 | 0 | my $value = $self->__value; | |||||||||||||||||||||||||||
| 158 | 0 | my @ancestors = $self->get_ancestors(); | |||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||
| 160 | 0 | foreach my $class (@ancestors) { | |||||||||||||||||||||||||||
| 161 | 0 | ▶ | next unless (UNIVERSAL::can($class, 'new') && UNIVERSAL::can($class, 'xml_validate')); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
UNIVERSAL::can($class, "new") and UNIVERSAL::can($class, "xml_validate")
MC/DC0%0/2
UNIVERSAL::can($class, "new") and UNIVERSAL::can($class, "xml_validate")
UNIVERSAL::can($class, "new")
UNIVERSAL::can($class, "xml_validate")
Truth table0%0/3
A and B
A= UNIVERSAL::can($class, "new")B= UNIVERSAL::can($class, "xml_validate")
| |||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||
| 163 | 0 | my $obj=$class->new(__value => $value); | |||||||||||||||||||||||||||
| 164 | 0 | ▶ | return 0 unless $obj->xml_validate(@_); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||
| 167 | 0 | return 1; | |||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 172 | # Normalize white space. | ||||||||||||||||||||||||||||
| 173 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 174 | 0 | ▶ | sub normalize_whitespace { | ||||||||||||||||||||||||||
|
Subroutine
normalize_whitespace: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 175 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 176 | 0 | my $value = shift; | |||||||||||||||||||||||||||
| 177 | 0 | my $type = $self->XmlSchemaType(); | |||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | 0 | ▶ | if (defined($type) and defined(my $prop = $type->whiteSpace)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $type and defined(my $prop = $type->whiteSpace)
MC/DC0%0/2
defined $type and defined(my $prop = $type->whiteSpace)
defined $type
defined(my $prop = $type->whiteSpace)
Truth table0%0/3
A and B
A= defined $typeB= defined(my $prop = $type->whiteSpace)
| |||||||||||||||||||||||||||||
| 180 | 0 | ▶ | $prop = (reftype($prop) eq 'ARRAY') ? $prop : [$prop]; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 181 | 0 | foreach my $ws (@$prop) { | |||||||||||||||||||||||||||
| 182 | 0 | ▶ | if ($ws =~ /^replace$/i) { | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 183 | 0 | $value =~ s![\t\n\r]! !g; | |||||||||||||||||||||||||||
| 184 | } elsif ($ws =~ /^collapse$/i) { | ||||||||||||||||||||||||||||
| 185 | 0 | $value =~ s!\s+! !g; | |||||||||||||||||||||||||||
| 186 | 0 | $value =~ s!^\s!!g; | |||||||||||||||||||||||||||
| 187 | 0 | $value =~ s!\s$!!g; | |||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||
| 189 | 0 | return $value; # only the first one gets treated! | |||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||
| 191 | }else { | ||||||||||||||||||||||||||||
| 192 | 0 | my @ancestors = $self->get_ancestors(); | |||||||||||||||||||||||||||
| 193 | 0 | foreach my $class(@ancestors) { | |||||||||||||||||||||||||||
| 194 | 0 | ▶ | next unless UNIVERSAL::can($class, 'normalize_whitespace') && UNIVERSAL::can($class, 'new'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
UNIVERSAL::can($class, "normalize_whitespace") and UNIVERSAL::can($class, "new")
MC/DC0%0/2
UNIVERSAL::can($class, "normalize_whitespace") and UNIVERSAL::can($class, "new")
UNIVERSAL::can($class, "normalize_whitespace")
UNIVERSAL::can($class, "new")
Truth table0%0/3
A and B
A= UNIVERSAL::can($class, "normalize_whitespace")B= UNIVERSAL::can($class, "new")
| |||||||||||||||||||||||||||||
| 195 | 0 | my $object = $class->new(__value=>$value); | |||||||||||||||||||||||||||
| 196 | 0 | my $nvalue = $object->normalize_whitespace($value); | |||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | 0 | ▶ | return $nvalue if ($nvalue ne $value); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||
| 202 | 0 | return $value; | |||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | 10 | 1; | |||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | __END__ | ||||||||||||||||||||||||||||