| 1 | package File::KDBX::IO; | ||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: Base IO class for KDBX-related streams | ||||||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||||||
| 4 | 18 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 5 | 18 | ▶ | use strict; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||
| 7 | 18 | ▶ | use Devel::GlobalDestruction; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 8 | 18 | ▶ | use File::KDBX::Constants qw(:bool); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 9 | 18 | ▶ | use File::KDBX::Util qw(:class :empty); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 10 | 18 | ▶ | use List::Util qw(sum0); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 11 | 18 | ▶ | use Ref::Util qw(is_blessed_ref is_ref is_scalarref); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 12 | 18 | ▶ | use Symbol qw(gensym); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 13 | 18 | ▶ | use namespace::clean; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||
| 15 | 18 | extends 'IO::Handle'; | |||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||
| 17 | 18 | our $VERSION = '0.904'; # VERSION | |||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub _croak { require Carp; goto &Carp::croak } | ||||||||||||||||||||||||||||||||
|
Subroutine
_croak: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||
| 21 | my %ATTRS = ( | ||||||||||||||||||||||||||||||||||
| 22 | _append_output => 0, | ||||||||||||||||||||||||||||||||||
| 23 | 56 | ▶ | _buffer_in => sub { [] }, | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 24 | 17 | ▶ | _buffer_out => sub { [] }, | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 25 | 18 | _error => undef, | |||||||||||||||||||||||||||||||||
| 26 | _fh => undef, | ||||||||||||||||||||||||||||||||||
| 27 | _mode => '', | ||||||||||||||||||||||||||||||||||
| 28 | ); | ||||||||||||||||||||||||||||||||||
| 29 | 18 | ▶ | while (my ($attr, $default) = each %ATTRS) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 30 | 18 | ▶ | no strict 'refs'; ## no critic (ProhibitNoStrict) | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 31 | *$attr = sub { | ||||||||||||||||||||||||||||||||||
| 32 | 2590 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||
| 33 | 2590 | ▶ | *$self->{$attr} = shift if @_; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 34 | 2590 | ▶ | *$self->{$attr} //= (ref $default eq 'CODE') ? $default->($self) : $default; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
*$self->{$attr} //= ref $default eq "CODE" ? &$default($self) : $default
MC/DC100%2/2
*$self->{$attr} //= ref $default eq "CODE" ? &$default($self) : $default
*$self->{$attr}
ref $default eq "CODE" ? &$default($self) : $default
Truth table100%3/3
A //= B
A= *$self->{$attr}B= ref $default eq "CODE" ? &$default($self) : $default
| |||||||||||||||||||||||||||||||||||
| 35 | 108 | }; | |||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||
| 38 | sub new { | ||||||||||||||||||||||||||||||||||
| 39 | 94 | ▶ | my $class = shift || (caller)[0]; | ||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=16.4
Pod
documented
Condition33%1/3
shift() || (caller)[0]
MC/DC0%0/2
shift() || (caller)[0]
shift()
(caller)[0]
Truth table33%1/3
A || B
A= shift()B= (caller)[0]
| |||||||||||||||||||||||||||||||||||
| 40 | 94 | ▶ | my $self = bless gensym, ref($class) || $class; | ||||||||||||||||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||||||||||
| 41 | 94 | ▶ | tie *$self, $self if 5.005 <= $]; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 42 | 94 | return $self; | |||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||
| 45 | sub DESTROY { | ||||||||||||||||||||||||||||||||||
| 46 | 94 | ▶ | return if in_global_destruction; | ||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=2 SCAR=7.0
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 47 | 94 | local ($., $@, $!, $^E, $?); | |||||||||||||||||||||||||||||||||
| 48 | 94 | my $self = shift; | |||||||||||||||||||||||||||||||||
| 49 | 94 | $self->close; | |||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||
| 52 | sub close { | ||||||||||||||||||||||||||||||||||
| 53 | 147 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
close: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 54 | 147 | ▶ | my $fh = $self->_fh // return TRUE; | ||||||||||||||||||||||||||||||||
|
Condition100%2/2
$self->_fh // (return 1)
MC/DC100%1/1
$self->_fh // (return 1)
$self->_fh
Truth table100%2/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 55 | 94 | $self->_POPPED($fh); | |||||||||||||||||||||||||||||||||
| 56 | 94 | $self->_fh(undef); | |||||||||||||||||||||||||||||||||
| 57 | 94 | return $fh->close; | |||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||
| 59 | sub eof { | ||||||||||||||||||||||||||||||||||
| 60 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
eof: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 61 | 0 | ▶ | return FALSE if @{$self->_buffer_in}; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 62 | 0 | ▶ | my $fh = $self->_fh // return TRUE; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return 1)
MC/DC0%0/1
$self->_fh // (return 1)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 63 | 0 | local *$self->{_error} = *$self->{_error}; | |||||||||||||||||||||||||||||||||
| 64 | 0 | ▶ | my $char = $self->getc || return TRUE; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->getc || (return 1)
MC/DC0%0/1
$self->getc || (return 1)
$self->getc
Truth table0%0/2
A
A= $self->getc
| |||||||||||||||||||||||||||||||||||
| 65 | 0 | $self->ungetc($char); | |||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||
| 67 | 321 | ▶ | sub read { shift->sysread(@_) } | ||||||||||||||||||||||||||||||||
|
Subroutine
read: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 68 | sub print { | ||||||||||||||||||||||||||||||||||
| 69 | 86 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
print: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 70 | 86 | for my $buf (@_) { | |||||||||||||||||||||||||||||||||
| 71 | 86 | ▶ | return FALSE if !$self->write($buf, length($buf)); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||
| 73 | 86 | return TRUE; | |||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||
| 75 | 0 | ▶ | sub printf { shift->print(sprintf(@_)) } | ||||||||||||||||||||||||||||||||
|
Subroutine
printf: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 76 | 0 | ▶ | sub say { shift->print(@_, "\n") } | ||||||||||||||||||||||||||||||||
|
Subroutine
say: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 77 | 0 | ▶ | sub getc { my $c; (shift->read($c, 1) // 0) == 1 ? $c : undef } | ||||||||||||||||||||||||||||||||
|
Subroutine
getc: not called CC=3 SCAR=24.8
Pod
undocumented
Branch: 1 branch
Condition0%0/2
(shift())->read($c, 1) // 0
MC/DC0%0/1
(shift())->read($c, 1) // 0
(shift())->read($c, 1)
Truth table0%0/2
A
A= (shift())->read($c, 1)
| |||||||||||||||||||||||||||||||||||
| 78 | sub sysread { | ||||||||||||||||||||||||||||||||||
| 79 | 321 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
sysread: called CC=23 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 80 | 321 | my ($out, $len, $offset) = @_; | |||||||||||||||||||||||||||||||||
| 81 | 321 | ▶ | $out = \$_[0] if !is_scalarref($out); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 82 | 321 | ▶ | $offset //= 0; | ||||||||||||||||||||||||||||||||
|
Condition50%1/2
$offset //= 0
MC/DC0%0/1
$offset //= 0
$offset
Truth table50%1/2
A
A= $offset
| |||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||
| 84 | 321 | ▶ | $self->_mode('r') if !$self->_mode; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||
| 86 | 321 | ▶ | my $fh = $self->_fh or return 0; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 87 | 321 | ▶ | return 0 if defined $len && $len == 0; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $len and $len == 0
MC/DC0%0/2
defined $len and $len == 0
defined $len
$len == 0
Truth table66%2/3
A and B
A= defined $lenB= $len == 0
| |||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||
| 89 | 321 | my $append = $self->_append_output; | |||||||||||||||||||||||||||||||||
| 90 | 321 | ▶ | if (!$append) { | ||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||
| 91 | 255 | ▶ | if (!$offset) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 92 | 255 | $$out = ''; | |||||||||||||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||||||||||||||
| 94 | else { | ||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | if (length($$out) < $offset) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 96 | 0 | $$out .= "\0" x ($offset - length($$out)); | |||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||
| 98 | else { | ||||||||||||||||||||||||||||||||||
| 99 | 0 | substr($$out, $offset) = ''; | |||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||
| 102 | } | ||||||||||||||||||||||||||||||||||
| 103 | elsif (!defined $$out) { | ||||||||||||||||||||||||||||||||||
| 104 | 11 | $$out = ''; | |||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||
| 107 | 321 | ▶ | $len ||= 0; | ||||||||||||||||||||||||||||||||
|
Condition100%2/2
$len ||= 0
MC/DC100%1/1
$len ||= 0
$len
Truth table100%2/2
A
A= $len
| |||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||
| 109 | 321 | my $buffer = $self->_buffer_in; | |||||||||||||||||||||||||||||||||
| 110 | 321 | my $buffer_len = $self->_buffer_in_length; | |||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||
| 112 | 321 | ▶ | if (!$len && !$offset) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$len or $offset
MC/DC50%1/2
$len or $offset
$len
$offset
Truth table66%2/3
A or B
A= $lenB= $offset
| |||||||||||||||||||||||||||||||||||
| 113 | 66 | ▶ | if (@$buffer) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 114 | 0 | my $blen = length($buffer->[0]); | |||||||||||||||||||||||||||||||||
| 115 | 0 | ▶ | if ($append) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 116 | 0 | $$out .= shift @$buffer; | |||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||
| 118 | else { | ||||||||||||||||||||||||||||||||||
| 119 | 0 | $$out = shift @$buffer; | |||||||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||||||
| 121 | 0 | return $blen; | |||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||
| 123 | else { | ||||||||||||||||||||||||||||||||||
| 124 | 66 | ▶ | my $fill = $self->_FILL($fh) or return 0; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 125 | 55 | ▶ | if ($append) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 126 | 55 | $$out .= $fill; | |||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||
| 128 | else { | ||||||||||||||||||||||||||||||||||
| 129 | 0 | $$out = $fill; | |||||||||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||||||||
| 131 | 55 | return length($fill); | |||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||
| 135 | 255 | ▶ | while ($buffer_len < $len) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 136 | 160 | my $fill = $self->_FILL($fh); | |||||||||||||||||||||||||||||||||
| 137 | 160 | ▶ | last if empty $fill; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 138 | 52 | $self->_buffer_in_add($fill); | |||||||||||||||||||||||||||||||||
| 139 | 52 | $buffer_len += length($fill); | |||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||
| 142 | 255 | my $read_len = 0; | |||||||||||||||||||||||||||||||||
| 143 | 255 | ▶ | while ($read_len < $len && @$buffer) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$read_len < $len and @$buffer
MC/DC100%2/2
$read_len < $len and @$buffer
$read_len < $len
@$buffer
Truth table100%3/3
A and B
A= $read_len < $lenB= @$buffer
| |||||||||||||||||||||||||||||||||||
| 144 | 182 | my $wanted = $len - $read_len; | |||||||||||||||||||||||||||||||||
| 145 | 182 | my $read = shift @$buffer; | |||||||||||||||||||||||||||||||||
| 146 | 182 | ▶ | if ($wanted < length($read)) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 147 | 133 | $$out .= substr($read, 0, $wanted, ''); | |||||||||||||||||||||||||||||||||
| 148 | 133 | unshift @$buffer, $read; | |||||||||||||||||||||||||||||||||
| 149 | 133 | $read_len += $wanted; | |||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||
| 151 | else { | ||||||||||||||||||||||||||||||||||
| 152 | 49 | $$out .= $read; | |||||||||||||||||||||||||||||||||
| 153 | 49 | $read_len += length($read); | |||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||
| 157 | 255 | return $read_len; | |||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||
| 159 | sub syswrite { | ||||||||||||||||||||||||||||||||||
| 160 | 116 | ▶ | my ($self, $buf, $len, $offset) = @_; | ||||||||||||||||||||||||||||||||
|
Subroutine
syswrite: called CC=4 SCAR=14.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 161 | 116 | ▶ | $len //= length($buf); | ||||||||||||||||||||||||||||||||
|
Condition33%1/3
$len //= length $buf
MC/DC0%0/2
$len //= length $buf
$len
length $buf
Truth table33%1/3
A //= B
A= $lenB= length $buf
| |||||||||||||||||||||||||||||||||||
| 162 | 116 | ▶ | $offset //= 0; | ||||||||||||||||||||||||||||||||
|
Condition50%1/2
$offset //= 0
MC/DC0%0/1
$offset //= 0
$offset
Truth table50%1/2
A
A= $offset
| |||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||
| 164 | 116 | ▶ | $self->_mode('w') if !$self->_mode; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||
| 166 | 116 | return $self->_WRITE(substr($buf, $offset, $len), $self->_fh); | |||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||
| 169 | sub autoflush { | ||||||||||||||||||||||||||||||||||
| 170 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
autoflush: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | my $fh = $self->_fh // return FALSE; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return !!0)
MC/DC0%0/1
$self->_fh // (return !!0)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 172 | 0 | return $fh->autoflush(@_); | |||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||
| 175 | sub opened { | ||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
opened: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 177 | 0 | ▶ | my $fh = $self->_fh // return FALSE; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return !!0)
MC/DC0%0/1
$self->_fh // (return !!0)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 178 | 0 | return TRUE; | |||||||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||||||||
| 180 | sub getline { | ||||||||||||||||||||||||||||||||||
| 181 | 11 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
getline: called CC=7 SCAR=29.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||
| 183 | 11 | ▶ | if (!defined $/) { # SLURP | ||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||
| 184 | 11 | local *$self->{_append_output} = 1; | |||||||||||||||||||||||||||||||||
| 185 | 11 | my $data; | |||||||||||||||||||||||||||||||||
| 186 | 11 | ▶ | 1 while 0 < $self->read($data); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 187 | 11 | return $data; | |||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||
| 189 | 0 | ▶ | elsif (is_scalarref($/) && ${$/} =~ /^\d+$/ && 0 < ${$/}) { | ||||||||||||||||||||||||||||||||
|
Condition0%0/6
Ref::Util::XS::is_scalarref($/) and ${$/;} =~ /^\d+$/ and 0 < ${$/;}
Ref::Util::XS::is_scalarref($/) and ${$/;} =~ /^\d+$/
MC/DC0%0/3
Ref::Util::XS::is_scalarref($/) and ${$/;} =~ /^\d+$/ and 0 < ${$/;}
Ref::Util::XS::is_scalarref($/)
${$/;} =~ /^\d+$/
0 < ${$/;}
Truth table0%0/4
A and B and C
A= Ref::Util::XS::is_scalarref($/)B= ${$/;} =~ /^\d+$/C= 0 < ${$/;}
| |||||||||||||||||||||||||||||||||||
| 190 | # RECORD MODE | ||||||||||||||||||||||||||||||||||
| 191 | 0 | goto &_not_implemented; | |||||||||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||||||||
| 193 | elsif (length $/ == 0) { | ||||||||||||||||||||||||||||||||||
| 194 | # PARAGRAPH MODE | ||||||||||||||||||||||||||||||||||
| 195 | 0 | goto &_not_implemented; | |||||||||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||||||||
| 197 | else { | ||||||||||||||||||||||||||||||||||
| 198 | # LINE MODE | ||||||||||||||||||||||||||||||||||
| 199 | 0 | goto &_not_implemented; | |||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||
| 202 | sub getlines { | ||||||||||||||||||||||||||||||||||
| 203 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
getlines: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 204 | 0 | ▶ | wantarray or _croak 'Must call getlines in list context'; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 205 | 0 | my @lines; | |||||||||||||||||||||||||||||||||
| 206 | 0 | ▶ | while (defined (my $line = $self->getline)) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 207 | 0 | push @lines, $line; | |||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||
| 209 | 0 | return @lines; | |||||||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||||||||
| 211 | sub ungetc { | ||||||||||||||||||||||||||||||||||
| 212 | 0 | ▶ | my ($self, $ord) = @_; | ||||||||||||||||||||||||||||||||
|
Subroutine
ungetc: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 213 | 0 | unshift @{$self->_buffer_in}, chr($ord); | |||||||||||||||||||||||||||||||||
| 214 | 0 | return; | |||||||||||||||||||||||||||||||||
| 215 | } | ||||||||||||||||||||||||||||||||||
| 216 | sub write { | ||||||||||||||||||||||||||||||||||
| 217 | 116 | ▶ | my ($self, $buf, $len, $offset) = @_; | ||||||||||||||||||||||||||||||||
|
Subroutine
write: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 218 | 116 | return $self->syswrite($buf, $len, $offset) == $len; | |||||||||||||||||||||||||||||||||
| 219 | } | ||||||||||||||||||||||||||||||||||
| 220 | sub error { | ||||||||||||||||||||||||||||||||||
| 221 | 6 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
error: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 222 | 6 | return !!$self->_error; | |||||||||||||||||||||||||||||||||
| 223 | } | ||||||||||||||||||||||||||||||||||
| 224 | sub clearerr { | ||||||||||||||||||||||||||||||||||
| 225 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
clearerr: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 226 | 0 | ▶ | my $fh = $self->_fh // return -1; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return -1)
MC/DC0%0/1
$self->_fh // (return -1)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 227 | 0 | $self->_error(undef); | |||||||||||||||||||||||||||||||||
| 228 | 0 | return; | |||||||||||||||||||||||||||||||||
| 229 | } | ||||||||||||||||||||||||||||||||||
| 230 | sub sync { | ||||||||||||||||||||||||||||||||||
| 231 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
sync: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 232 | 0 | ▶ | my $fh = $self->_fh // return undef; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return undef)
MC/DC0%0/1
$self->_fh // (return undef)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 233 | 0 | return $fh->sync; | |||||||||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||||||||
| 235 | sub flush { | ||||||||||||||||||||||||||||||||||
| 236 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
flush: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 237 | 0 | ▶ | my $fh = $self->_fh // return undef; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return undef)
MC/DC0%0/1
$self->_fh // (return undef)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 238 | 0 | $self->_FLUSH($fh); | |||||||||||||||||||||||||||||||||
| 239 | 0 | return $fh->flush; | |||||||||||||||||||||||||||||||||
| 240 | } | ||||||||||||||||||||||||||||||||||
| 241 | sub printflush { | ||||||||||||||||||||||||||||||||||
| 242 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
printflush: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 243 | 0 | my $orig = $self->autoflush; | |||||||||||||||||||||||||||||||||
| 244 | 0 | my $r = $self->print(@_); | |||||||||||||||||||||||||||||||||
| 245 | 0 | $self->autoflush($orig); | |||||||||||||||||||||||||||||||||
| 246 | 0 | return $r; | |||||||||||||||||||||||||||||||||
| 247 | } | ||||||||||||||||||||||||||||||||||
| 248 | sub blocking { | ||||||||||||||||||||||||||||||||||
| 249 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
blocking: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 250 | 0 | ▶ | my $fh = $self->_fh // return TRUE; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
$self->_fh // (return 1)
MC/DC0%0/1
$self->_fh // (return 1)
$self->_fh
Truth table0%0/2
A
A= $self->_fh
| |||||||||||||||||||||||||||||||||||
| 251 | 0 | return $fh->blocking(@_); | |||||||||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||
| 254 | 0 | ▶ | sub format_write { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
format_write: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 255 | 0 | ▶ | sub new_from_fd { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
new_from_fd: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 256 | 0 | ▶ | sub fcntl { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
fcntl: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 257 | 0 | ▶ | sub fileno { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
fileno: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 258 | 0 | ▶ | sub ioctl { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
ioctl: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 259 | 0 | ▶ | sub stat { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
stat: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 260 | 0 | ▶ | sub truncate { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
truncate: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 261 | 0 | ▶ | sub format_page_number { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
format_page_number: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 262 | 0 | ▶ | sub format_lines_per_page { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
format_lines_per_page: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | sub format_lines_left { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
format_lines_left: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 264 | 0 | ▶ | sub format_name { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
format_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 265 | 0 | ▶ | sub format_top_name { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
format_top_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | sub input_line_number { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
input_line_number: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 267 | 0 | ▶ | sub fdopen { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
fdopen: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 268 | 0 | ▶ | sub untaint { goto &_not_implemented } | ||||||||||||||||||||||||||||||||
|
Subroutine
untaint: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||
| 270 | ############################################################################## | ||||||||||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||||||||
| 272 | 52 | ▶ | sub _buffer_in_add { push @{shift->_buffer_in}, @_ } | ||||||||||||||||||||||||||||||||
|
Subroutine
_buffer_in_add: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 273 | 321 | ▶ | sub _buffer_in_length { sum0 map { length($_) } @{shift->_buffer_in} } | ||||||||||||||||||||||||||||||||
|
Subroutine
_buffer_in_length: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||
| 275 | 78 | ▶ | sub _buffer_out_add { push @{shift->_buffer_out}, @_ } | ||||||||||||||||||||||||||||||||
|
Subroutine
_buffer_out_add: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 276 | 0 | ▶ | sub _buffer_out_length { sum0 map { length($_) } @{shift->_buffer_out} } | ||||||||||||||||||||||||||||||||
|
Subroutine
_buffer_out_length: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | sub _not_implemented { _croak 'Operation not supported' } | ||||||||||||||||||||||||||||||||
|
Subroutine
_not_implemented: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||
| 280 | ############################################################################## | ||||||||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||||||||
| 282 | sub TIEHANDLE { | ||||||||||||||||||||||||||||||||||
| 283 | 94 | ▶ | return $_[0] if is_blessed_ref($_[0]); | ||||||||||||||||||||||||||||||||
|
Subroutine
TIEHANDLE: called CC=2 SCAR=9.2
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 284 | 0 | die 'wat'; | |||||||||||||||||||||||||||||||||
| 285 | } | ||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||
| 287 | sub UNTIE { | ||||||||||||||||||||||||||||||||||
| 288 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||
|
Subroutine
UNTIE: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||
| 289 | } | ||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||
| 291 | sub READLINE { | ||||||||||||||||||||||||||||||||||
| 292 | 11 | ▶ | goto &getlines if wantarray; | ||||||||||||||||||||||||||||||||
|
Subroutine
READLINE: called CC=2 SCAR=7.2
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 293 | 11 | goto &getline; | |||||||||||||||||||||||||||||||||
| 294 | } | ||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||
| 296 | 35 | ▶ | sub binmode { 1 } | ||||||||||||||||||||||||||||||||
|
Subroutine
binmode: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||
| 298 | { | ||||||||||||||||||||||||||||||||||
| 299 | 18 | ▶ | no warnings 'once'; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 300 | |||||||||||||||||||||||||||||||||||
| 301 | 18 | *READ = \&read; | |||||||||||||||||||||||||||||||||
| 302 | # *READLINE = \&getline; | ||||||||||||||||||||||||||||||||||
| 303 | 18 | *GETC = \&getc; | |||||||||||||||||||||||||||||||||
| 304 | 18 | *FILENO = \&fileno; | |||||||||||||||||||||||||||||||||
| 305 | 18 | *PRINT = \&print; | |||||||||||||||||||||||||||||||||
| 306 | 18 | *PRINTF = \&printf; | |||||||||||||||||||||||||||||||||
| 307 | 18 | *WRITE = \&syswrite; | |||||||||||||||||||||||||||||||||
| 308 | # *SEEK = \&seek; | ||||||||||||||||||||||||||||||||||
| 309 | # *TELL = \&tell; | ||||||||||||||||||||||||||||||||||
| 310 | 18 | *EOF = \&eof; | |||||||||||||||||||||||||||||||||
| 311 | 18 | *CLOSE = \&close; | |||||||||||||||||||||||||||||||||
| 312 | 18 | *BINMODE = \&binmode; | |||||||||||||||||||||||||||||||||
| 313 | } | ||||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||||
| 315 | 0 | ▶ | sub _FILL { die 'Not implemented' } | ||||||||||||||||||||||||||||||||
|
Subroutine
_FILL: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||
| 317 | ############################################################################## | ||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||
| 319 | 18 | ▶ | if ($ENV{DEBUG_IO}) { | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 320 | 0 | my %debug = (level => 0); | |||||||||||||||||||||||||||||||||
| 321 | 0 | for my $method (qw{ | |||||||||||||||||||||||||||||||||
| 322 | new | ||||||||||||||||||||||||||||||||||
| 323 | new_from_fd | ||||||||||||||||||||||||||||||||||
| 324 | close | ||||||||||||||||||||||||||||||||||
| 325 | eof | ||||||||||||||||||||||||||||||||||
| 326 | fcntl | ||||||||||||||||||||||||||||||||||
| 327 | fileno | ||||||||||||||||||||||||||||||||||
| 328 | format_write | ||||||||||||||||||||||||||||||||||
| 329 | getc | ||||||||||||||||||||||||||||||||||
| 330 | ioctl | ||||||||||||||||||||||||||||||||||
| 331 | read | ||||||||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||||||||
| 333 | printf | ||||||||||||||||||||||||||||||||||
| 334 | say | ||||||||||||||||||||||||||||||||||
| 335 | stat | ||||||||||||||||||||||||||||||||||
| 336 | sysread | ||||||||||||||||||||||||||||||||||
| 337 | syswrite | ||||||||||||||||||||||||||||||||||
| 338 | truncate | ||||||||||||||||||||||||||||||||||
| 339 | |||||||||||||||||||||||||||||||||||
| 340 | autoflush | ||||||||||||||||||||||||||||||||||
| 341 | format_page_number | ||||||||||||||||||||||||||||||||||
| 342 | format_lines_per_page | ||||||||||||||||||||||||||||||||||
| 343 | format_lines_left | ||||||||||||||||||||||||||||||||||
| 344 | format_name | ||||||||||||||||||||||||||||||||||
| 345 | format_top_name | ||||||||||||||||||||||||||||||||||
| 346 | input_line_number | ||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||
| 348 | fdopen | ||||||||||||||||||||||||||||||||||
| 349 | opened | ||||||||||||||||||||||||||||||||||
| 350 | getline | ||||||||||||||||||||||||||||||||||
| 351 | getlines | ||||||||||||||||||||||||||||||||||
| 352 | ungetc | ||||||||||||||||||||||||||||||||||
| 353 | write | ||||||||||||||||||||||||||||||||||
| 354 | error | ||||||||||||||||||||||||||||||||||
| 355 | clearerr | ||||||||||||||||||||||||||||||||||
| 356 | sync | ||||||||||||||||||||||||||||||||||
| 357 | flush | ||||||||||||||||||||||||||||||||||
| 358 | printflush | ||||||||||||||||||||||||||||||||||
| 359 | blocking | ||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||
| 361 | untaint | ||||||||||||||||||||||||||||||||||
| 362 | }) { | ||||||||||||||||||||||||||||||||||
| 363 | 18 | ▶ | no strict 'refs'; ## no critic (ProhibitNoStrict) | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 364 | 18 | ▶ | no warnings 'redefine'; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 365 | 0 | my $orig = *$method{CODE}; | |||||||||||||||||||||||||||||||||
| 366 | *$method = sub { | ||||||||||||||||||||||||||||||||||
| 367 | 0 | ▶ | local $debug{level} = $debug{level} + 2; | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||
| 368 | 0 | my $indented_method = (' ' x $debug{level}) . $method; | |||||||||||||||||||||||||||||||||
| 369 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||
| 370 | print STDERR sprintf('%-20s -> %s (%s)', $indented_method, $self, | ||||||||||||||||||||||||||||||||||
| 371 | 0 | ▶ | join(', ', map { defined $_ ? substr($_, 0, 16) : 'undef' } @_)), "\n"; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 372 | 0 | ▶ | my $r = $orig->($self, @_) // 'undef'; | ||||||||||||||||||||||||||||||||
|
Condition0%0/2
&$orig($self, @_) // "undef"
MC/DC0%0/1
&$orig($self, @_) // "undef"
&$orig($self, @_)
Truth table0%0/2
A
A= &$orig($self, @_)
| |||||||||||||||||||||||||||||||||||
| 373 | 0 | print STDERR sprintf('%-20s <- %s [%s]', $indented_method, $self, $r), "\n"; | |||||||||||||||||||||||||||||||||
| 374 | 0 | return $r; | |||||||||||||||||||||||||||||||||
| 375 | 0 | }; | |||||||||||||||||||||||||||||||||
| 376 | } | ||||||||||||||||||||||||||||||||||
| 377 | } | ||||||||||||||||||||||||||||||||||
| 378 | |||||||||||||||||||||||||||||||||||
| 379 | 18 | 1; | |||||||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||||||||
| 381 | __END__ | ||||||||||||||||||||||||||||||||||