| 1 | package XML::Loy::Date::RFC3339; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 13 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 13 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | 13 | ▶ | use overload '""' => sub { shift->to_string }, fallback => 1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | 13 | our $VERSION = '0.03'; | |||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | 13 | require Time::Local; | |||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | # rfc3339 timestamp | ||||||||||||||||||||||||||||||||||||||||||
| 12 | 13 | my $RFC3339_RE = qr/^(\d{4}) # year | |||||||||||||||||||||||||||||||||||||||||
| 13 | (?:-(\d?\d) # year and month | ||||||||||||||||||||||||||||||||||||||||||
| 14 | (?:-(\d?\d) # complete date | ||||||||||||||||||||||||||||||||||||||||||
| 15 | (?:[^\d](\d?\d) # + hour and minutes | ||||||||||||||||||||||||||||||||||||||||||
| 16 | :(\d?\d) | ||||||||||||||||||||||||||||||||||||||||||
| 17 | (?::(\d?\d) # + hour, minutes and seconds | ||||||||||||||||||||||||||||||||||||||||||
| 18 | (?:\.\d*)? # + hour, minutes, seconds and a | ||||||||||||||||||||||||||||||||||||||||||
| 19 | )? # decimal fraction of a second | ||||||||||||||||||||||||||||||||||||||||||
| 20 | ([zZ]|[\-\+]\d?\d(?::?\d?\d)?) # Offset | ||||||||||||||||||||||||||||||||||||||||||
| 21 | )? | ||||||||||||||||||||||||||||||||||||||||||
| 22 | )? | ||||||||||||||||||||||||||||||||||||||||||
| 23 | )?$/x; | ||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | # Timestamp offset | ||||||||||||||||||||||||||||||||||||||||||
| 26 | 13 | my $OFFSET_RE = qr/^([-\+])(\d?\d)(?::(\d?\d))?$/; | |||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | # Constructor | ||||||||||||||||||||||||||||||||||||||||||
| 29 | 40 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | 40 | ▶ | my $self = bless {}, (ref $_[0] ? ref shift : shift); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | # Set granularity | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 40 | $self->granularity(0); | |||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | # Parse string | ||||||||||||||||||||||||||||||||||||||||||
| 36 | 40 | $self->parse(@_); | |||||||||||||||||||||||||||||||||||||||||
| 37 | 40 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 38 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||
| 41 | # Parse date value | ||||||||||||||||||||||||||||||||||||||||||
| 42 | 46 | ▶ | sub parse { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
parse: called CC=20 SCAR=31.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 43 | 46 | my ($self, $date) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | # No date defined | ||||||||||||||||||||||||||||||||||||||||||
| 46 | 46 | ▶ | return $self unless defined $date; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | # Epoch date | ||||||||||||||||||||||||||||||||||||||||||
| 49 | 45 | ▶ | if ($date =~ /^[\d_]+$/ && $date > 5000) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition100%3/3
$date =~ /^[\d_]+$/ and $date > 5000
MC/DC100%2/2
$date =~ /^[\d_]+$/ and $date > 5000
$date =~ /^[\d_]+$/
$date > 5000
Truth table100%3/3
A and B
A= $date =~ /^[\d_]+$/B= $date > 5000
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | 14 | $self->epoch($date); | |||||||||||||||||||||||||||||||||||||||||
| 51 | 14 | $self->granularity(0); | |||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||
| 54 | # String date | ||||||||||||||||||||||||||||||||||||||||||
| 55 | elsif (my ($year, $month, $mday, | ||||||||||||||||||||||||||||||||||||||||||
| 56 | $hour, $min, $sec, | ||||||||||||||||||||||||||||||||||||||||||
| 57 | $offset) = ($date =~ $RFC3339_RE)) { | ||||||||||||||||||||||||||||||||||||||||||
| 58 | 31 | my $epoch; | |||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | # Check for granularity | ||||||||||||||||||||||||||||||||||||||||||
| 61 | 31 | my $gran = 0; | |||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | # No seconds defined | ||||||||||||||||||||||||||||||||||||||||||
| 64 | 31 | ▶ | unless (defined $sec) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 65 | 6 | $gran = 1, $sec = 0; | |||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||
| 67 | # No hours defined | ||||||||||||||||||||||||||||||||||||||||||
| 68 | 6 | ▶ | unless (defined $hour) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | 5 | $gran++, $hour = $min = 0; | |||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | # No monthday defined | ||||||||||||||||||||||||||||||||||||||||||
| 72 | 5 | ▶ | unless (defined $mday) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | 3 | $gran++, $mday = 1; | |||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | # No month defined | ||||||||||||||||||||||||||||||||||||||||||
| 76 | 3 | ▶ | unless (defined $month) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 77 | 2 | $gran++, $month = 1; | |||||||||||||||||||||||||||||||||||||||||
| 78 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 79 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 80 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 81 | 6 | ▶ | $offset ||= 'Z'; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$offset ||= "Z"
MC/DC100%1/1
$offset ||= "Z"
$offset
Truth table100%2/2
A
A= $offset
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||
| 84 | # Begin counting with 0 | ||||||||||||||||||||||||||||||||||||||||||
| 85 | 31 | $month--; | |||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | # Set granularity | ||||||||||||||||||||||||||||||||||||||||||
| 88 | 31 | $self->granularity($gran); | |||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | 31 | eval { | |||||||||||||||||||||||||||||||||||||||||
| 91 | 31 | $epoch = Time::Local::timegm( | |||||||||||||||||||||||||||||||||||||||||
| 92 | $sec, $min, $hour, $mday, $month, $year | ||||||||||||||||||||||||||||||||||||||||||
| 93 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 94 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||
| 96 | 31 | ▶ | return if $@; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | # Calculate offsets | ||||||||||||||||||||||||||||||||||||||||||
| 99 | 31 | ▶ | if (uc $offset ne 'Z' && ( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
uc $offset ne "Z" and () = $offset =~ /$OFFSET_RE/
MC/DC50%1/2
uc $offset ne "Z" and () = $offset =~ /$OFFSET_RE/
uc $offset ne "Z"
() = $offset =~ /$OFFSET_RE/
Truth table66%2/3
A and B
A= uc $offset ne "Z"B= () = $offset =~ /$OFFSET_RE/
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | my ($os_dir, $os_hour, $os_min) = ($offset =~ $OFFSET_RE)) | ||||||||||||||||||||||||||||||||||||||||||
| 101 | ) { | ||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||
| 103 | # Negative offset | ||||||||||||||||||||||||||||||||||||||||||
| 104 | 3 | ▶ | if ($os_dir eq '-') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | 3 | ▶ | $epoch += ($os_hour * 60 * 60) if $os_hour; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 106 | 3 | ▶ | $epoch += ($os_min * 60) if $os_min; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||
| 109 | # Positive offset | ||||||||||||||||||||||||||||||||||||||||||
| 110 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | $epoch -= ($os_hour * 60 * 60) if $os_hour; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | ▶ | $epoch -= ($os_min * 60) if $os_min; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 113 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 114 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | # Positive epoch | ||||||||||||||||||||||||||||||||||||||||||
| 117 | 31 | ▶ | if ($epoch > 0) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 118 | 31 | ▶ | $self->epoch($epoch) and return $epoch; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 119 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | # No valid datetime | ||||||||||||||||||||||||||||||||||||||||||
| 123 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 125 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||
| 127 | 14 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 128 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | # return string | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 43 | ▶ | sub to_string { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
to_string: called CC=12 SCAR=27.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | 43 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 134 | 43 | ▶ | my $level = $_[0] // $self->granularity; | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$_[0] // $self->granularity
MC/DC0%0/2
$_[0] // $self->granularity
$_[0]
$self->granularity
Truth table66%2/3
A // B
A= $_[0]B= $self->granularity
| |||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | # Take the current time if no time given | ||||||||||||||||||||||||||||||||||||||||||
| 137 | 43 | ▶ | my $epoch = $self->epoch // time; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$self->epoch // time
MC/DC0%0/1
$self->epoch // time
$self->epoch
Truth table50%1/2
A
A= $self->epoch
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||||||||||||||||
| 139 | # Get gmtime | ||||||||||||||||||||||||||||||||||||||||||
| 140 | 43 | my ($sec, $min, $hour, $mday, $month, $year) = gmtime $epoch; | |||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | # Format | ||||||||||||||||||||||||||||||||||||||||||
| 143 | 43 | my $s = '%04d'; | |||||||||||||||||||||||||||||||||||||||||
| 144 | 43 | my @a = ($year + 1900); | |||||||||||||||||||||||||||||||||||||||||
| 145 | 43 | ▶ | $s .= '-%02d' and push(@a, $month + 1) if $level < 4; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$level < 4 && (($s .= '-%02d') && push(@a, $month + 1))
$s .= '-%02d' and push @a, $month + 1
MC/DC0%0/3
$level < 4 && (($s .= '-%02d') && push(@a, $month + 1))
$level < 4
$s .= '-%02d'
push @a, $month + 1
Truth table0%0/4
A && B and C
A= $level < 4B= $s .= '-%02d'C= push @a, $month + 1
| |||||||||||||||||||||||||||||||||||||||||||
| 146 | 43 | ▶ | $s .= '-%02d' and push(@a, $mday) if $level < 3; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$level < 3 && (($s .= '-%02d') && push(@a, $mday))
$s .= '-%02d' and push @a, $mday
MC/DC0%0/3
$level < 3 && (($s .= '-%02d') && push(@a, $mday))
$level < 3
$s .= '-%02d'
push @a, $mday
Truth table0%0/4
A && B and C
A= $level < 3B= $s .= '-%02d'C= push @a, $mday
| |||||||||||||||||||||||||||||||||||||||||||
| 147 | 43 | ▶ | $s .= 'T%02d:%02d' and push(@a, $hour, $min) if $level < 2; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$level < 2 && (($s .= 'T%02d:%02d') && push(@a, $hour, $min))
$s .= 'T%02d:%02d' and push @a, $hour, $min
MC/DC0%0/3
$level < 2 && (($s .= 'T%02d:%02d') && push(@a, $hour, $min))
$level < 2
$s .= 'T%02d:%02d'
push @a, $hour, $min
Truth table0%0/4
A && B and C
A= $level < 2B= $s .= 'T%02d:%02d'C= push @a, $hour, $min
| |||||||||||||||||||||||||||||||||||||||||||
| 148 | 43 | ▶ | $s .= ':%02d' and push(@a, $sec) if $level < 1; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
$level < 1 && (($s .= ':%02d') && push(@a, $sec))
$s .= ':%02d' and push @a, $sec
MC/DC0%0/3
$level < 1 && (($s .= ':%02d') && push(@a, $sec))
$level < 1
$s .= ':%02d'
push @a, $sec
Truth table0%0/4
A && B and C
A= $level < 1B= $s .= ':%02d'C= push @a, $sec
| |||||||||||||||||||||||||||||||||||||||||||
| 149 | 43 | ▶ | $s .= 'Z' if $level < 2; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||
| 151 | 43 | return sprintf($s, @a); | |||||||||||||||||||||||||||||||||||||||||
| 152 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | # Epoch datetime | ||||||||||||||||||||||||||||||||||||||||||
| 156 | 102 | ▶ | sub epoch { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
epoch: called CC=4 SCAR=15.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 157 | 102 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | # Get epoch | ||||||||||||||||||||||||||||||||||||||||||
| 160 | 102 | ▶ | return $self->{epoch} unless @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||
| 162 | # Set epoch if valid | ||||||||||||||||||||||||||||||||||||||||||
| 163 | 45 | ▶ | if ($_[0] && $_[0] =~ /^[_\d]+$/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$_[0] and $_[0] =~ /^[_\d]+$/
MC/DC0%0/2
$_[0] and $_[0] =~ /^[_\d]+$/
$_[0]
$_[0] =~ /^[_\d]+$/
Truth table33%1/3
A and B
A= $_[0]B= $_[0] =~ /^[_\d]+$/
| |||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | # Fine to set | ||||||||||||||||||||||||||||||||||||||||||
| 166 | 45 | $self->{epoch} = shift; | |||||||||||||||||||||||||||||||||||||||||
| 167 | 45 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 168 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||
| 170 | # Fail to set | ||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 172 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||||||||||
| 175 | # Granularity | ||||||||||||||||||||||||||||||||||||||||||
| 176 | 122 | ▶ | sub granularity { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
granularity: called CC=4 SCAR=14.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 177 | 122 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||||||||||||||||
| 179 | # Get granularity | ||||||||||||||||||||||||||||||||||||||||||
| 180 | 122 | ▶ | return $self->{granularity} unless @_; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | # Set granularity if valid | ||||||||||||||||||||||||||||||||||||||||||
| 183 | 85 | ▶ | if (defined $_[0] && grep { $_[0] == $_ } 0 .. 4) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_[0] and grep {$_[0] == $_;} 0..4
MC/DC0%0/2
defined $_[0] and grep {$_[0] == $_;} 0..4
defined $_[0]
grep {$_[0] == $_;} 0..4
Truth table33%1/3
A and B
A= defined $_[0]B= grep {$_[0] == $_;} 0..4
| |||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||
| 185 | # Fine to set | ||||||||||||||||||||||||||||||||||||||||||
| 186 | 85 | $self->{granularity} = shift; | |||||||||||||||||||||||||||||||||||||||||
| 187 | 85 | return 1; | |||||||||||||||||||||||||||||||||||||||||
| 188 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | # Fail to set | ||||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 192 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||||
| 195 | 13 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||
| 198 | __END__ | ||||||||||||||||||||||||||||||||||||||||||