| 1 | package Data::Encrypted; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $VAR1); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | require Exporter; | |||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | require Crypt::RSA; | |||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | require Crypt::RSA::Key::Public::SSH; | |||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | require Crypt::RSA::Key::Private::SSH; | |||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | require Term::ReadPassword; | |||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | require File::HomeDir; | |||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | require Storable; | |||||||||||||||||||||||||||||||||||||||||
| 15 | 1 | require Fcntl; | |||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | $VERSION = '0.07'; | |||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | @ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | @EXPORT = qw(); | |||||||||||||||||||||||||||||||||||||||||
| 22 | 1 | @EXPORT_OK = qw(encrypted encrypt finish finished); | |||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | my $RESET = 0; | |||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | my ($FILE, $FH); | |||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | my ($PK, $SK, $PW); | |||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | 1 | ▶ | sub import { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
import: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 1 | @_ = _get_args(@_); | |||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | # let Exporter finish it's work: | ||||||||||||||||||||||||||||||||||||||||||
| 33 | 1 | Data::Encrypted->export_to_level(1, @_); | |||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||
| 36 | 1 | ▶ | sub _get_args { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_args: called CC=8 SCAR=31.9
| |||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | 1 | ▶ | for (my $i = 0 ; $i < @_ ; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 1 | ▶ | if ($_[$i] =~ m/-?reset/oi) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 6 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | $RESET = 1; | |||||||||||||||||||||||||||||||||||||||||
| 41 | 0 | splice(@_, $i--, 1); | |||||||||||||||||||||||||||||||||||||||||
| 42 | } elsif ($_[$i] =~ m/-?file/oi) { | ||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | $FILE = $_[$i+1]; | |||||||||||||||||||||||||||||||||||||||||
| 44 | 0 | splice(@_, $i--, 2); | |||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | _get_filehandle(); | |||||||||||||||||||||||||||||||||||||||||
| 46 | } elsif ($_[$i] =~ m/-?fh/oi) { | ||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | $FH = $_[$i+1]; | |||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | splice(@_, $i--, 2); | |||||||||||||||||||||||||||||||||||||||||
| 49 | } elsif ($_[$i] =~ m/-?pk/oi) { | ||||||||||||||||||||||||||||||||||||||||||
| 50 | 0 | $PK = $_[$i+1]; | |||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | splice(@_, $i--, 2); | |||||||||||||||||||||||||||||||||||||||||
| 52 | } elsif ($_[$i] =~ m/-?sk/oi) { | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | $SK = $_[$i+1]; | |||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | splice(@_, $i--, 2); | |||||||||||||||||||||||||||||||||||||||||
| 55 | } elsif ($_[$i] =~ m/-?pw/oi) { | ||||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | $PW = $_[$i+1]; | |||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | splice(@_, $i--, 2); | |||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||
| 61 | 1 | return @_; | |||||||||||||||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | my $class = shift; | |||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | ▶ | $class = ref $class || $class; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table0%0/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | my $self = bless {}, $class; | |||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | _get_args(@_); | |||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | ▶ | unless (defined $FH) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | _get_filehandle() | |||||||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | ▶ | $self->{_public} = ref $PK ? $PK : new Crypt::RSA::Key::Public::SSH | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
$PK || &File::HomeDir::home() . '/.ssh/identity.pub'
MC/DC0%0/1
$PK || &File::HomeDir::home() . '/.ssh/identity.pub'
$PK
Truth table0%0/2
A
A= $PK
| |||||||||||||||||||||||||||||||||||||||||||
| 77 | Filename => $PK || (File::HomeDir::home() . '/.ssh/identity.pub'); | ||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | ▶ | $self->{_private} = ref $SK ? $SK : new Crypt::RSA::Key::Private::SSH | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
$SK || &File::HomeDir::home() . '/.ssh/identity'
MC/DC0%0/1
$SK || &File::HomeDir::home() . '/.ssh/identity'
$SK
Truth table0%0/2
A
A= $SK
| |||||||||||||||||||||||||||||||||||||||||||
| 79 | (Filename => $SK || (File::HomeDir::home() . '/.ssh/identity'), | ||||||||||||||||||||||||||||||||||||||||||
| 80 | Password => $PW ); | ||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | $self->{_rsa} = new Crypt::RSA; | |||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | ▶ | sub _get_filehandle { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_filehandle: not called CC=6 SCAR=37.4
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | if ($FILE =~ m/^~([^\/]*)\//o) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | my $user = $1; | |||||||||||||||||||||||||||||||||||||||||
| 91 | 0 | my $path; | |||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | ▶ | if ($user) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | $path = File::HomeDir::home($user); | |||||||||||||||||||||||||||||||||||||||||
| 94 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | $path = File::HomeDir::home(); | |||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | ▶ | unless ($path) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | croak "No home directory for user: $user\n"; | |||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | $FILE =~ s/^~$user/$path/; | |||||||||||||||||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | ▶ | sysopen(FH, $FILE, Fcntl::O_RDWR() | Fcntl::O_CREAT() ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | or croak "Can't open $FILE: $!"; | ||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | ▶ | flock(FH, Fcntl::LOCK_EX()) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 106 | or croak "Can't flock file: $!"; | ||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | $FH = \*FH; | |||||||||||||||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | sub encrypted { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
encrypted: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | my $arg = shift; | |||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | ▶ | unless (ref $self) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | my $newself = Data::Encrypted->new(defined $arg ? $arg : (), @_); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ($self, $arg) = ($newself, $self); | |||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | unless ($arg) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | croak "Must supply argument to encrypted!"; | |||||||||||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | ▶ | unless (exists $self->{_data}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | $self->{_data} = ''; | |||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | ▶ | while (<$FH>) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | $self->{_data} .= $_; | |||||||||||||||||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | $self->{_data} =~ s/\s*$//os; | |||||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | ▶ | if ($self->{_data}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 133 | $self->{_data} = $self->{_rsa}->decrypt(Cyphertext => $self->{_data}, | ||||||||||||||||||||||||||||||||||||||||||
| 134 | Key => $self->{_private}, | ||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | Armour => 1 | |||||||||||||||||||||||||||||||||||||||||
| 136 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $self->{_data} = Storable::thaw($self->{_data}); | |||||||||||||||||||||||||||||||||||||||||
| 138 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | $self->{_data} = {}; | |||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | ▶ | if ($RESET || ! exists $self->{_data}->{$arg}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$RESET or not exists $self->{"_data"}{$arg}
MC/DC0%0/2
$RESET or not exists $self->{"_data"}{$arg}
$RESET
not exists $self->{"_data"}{$arg}
Truth table0%0/3
A or not(B)
A= $RESETB= not exists $self->{"_data"}{$arg}
| |||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | $self->{_data}->{$arg} = | |||||||||||||||||||||||||||||||||||||||||
| 145 | Term::ReadPassword::read_password(ref($self) . | ||||||||||||||||||||||||||||||||||||||||||
| 146 | " value for '$arg' not found," . | ||||||||||||||||||||||||||||||||||||||||||
| 147 | " please enter: ", 0, 1, 1); | ||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | return $self->{_data}->{$arg}; | |||||||||||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||||||||||||
| 152 | 1 | *encrypt = \&encrypted; | |||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | sub finished { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
finished: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | if ($FH) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | flock($FH, Fcntl::LOCK_UN()); | |||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | close($FH); | |||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | undef $FH; | |||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||||||||||||||||
| 163 | 1 | *finish = \&finished; | |||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: not called CC=14 SCAR=53.5
| |||||||||||||||||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | ▶ | if ($self && ($FH || $FILE)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$self and $FH || $FILE
$FH or $FILE
MC/DC0%0/3
$self and $FH || $FILE
$self
$FH
$FILE
Truth table0%0/4
A and B or C
A= $selfB= $FHC= $FILE
| |||||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | ▶ | unless ($FH) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | sysopen(FH, $FILE, Fcntl::O_RDWR() | Fcntl::O_CREAT()) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 172 | or croak "Can't open $FILE: $!"; | ||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | flock(FH, Fcntl::LOCK_EX()) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 174 | or croak "Can't flock file: $!"; | ||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | $FH = \*FH; | |||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | seek($FH, 0, 0); | |||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | ▶ | unless ($RESET) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 179 | # need to rebuild our cryptosystem, ugh. | ||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | $self->{_public} = ref $PK ? $PK : new Crypt::RSA::Key::Public::SSH | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
$PK || &File::HomeDir::home() . '/.ssh/identity.pub'
MC/DC0%0/1
$PK || &File::HomeDir::home() . '/.ssh/identity.pub'
$PK
Truth table0%0/2
A
A= $PK
| |||||||||||||||||||||||||||||||||||||||||||
| 181 | Filename => $PK || (File::HomeDir::home() . '/.ssh/identity.pub'); | ||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | ▶ | $self->{_private} = ref $SK ? $SK : new Crypt::RSA::Key::Private::SSH | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
$SK || &File::HomeDir::home() . '/.ssh/identity'
MC/DC0%0/1
$SK || &File::HomeDir::home() . '/.ssh/identity'
$SK
Truth table0%0/2
A
A= $SK
| |||||||||||||||||||||||||||||||||||||||||||
| 183 | (Filename => $SK || (File::HomeDir::home() . '/.ssh/identity'), | ||||||||||||||||||||||||||||||||||||||||||
| 184 | Password => $PW ); | ||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | $self->{_rsa} = new Crypt::RSA; | |||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | $self->{_data} = Storable::freeze($self->{_data}); | |||||||||||||||||||||||||||||||||||||||||
| 187 | $self->{_data} = $self->{_rsa}->encrypt(Message => $self->{_data}, | ||||||||||||||||||||||||||||||||||||||||||
| 188 | Key => $self->{_public}, | ||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | Armour => 1 | |||||||||||||||||||||||||||||||||||||||||
| 190 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | print $FH $self->{_data}; | |||||||||||||||||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | delete $self->{_data}; | |||||||||||||||||||||||||||||||||||||||||
| 194 | } | ||||||||||||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | ▶ | unless (exists $INC{'Inline/Files.pm'} || ! $FILE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
exists $INC{"Inline/Files.pm"} or not $FILE
MC/DC0%0/2
exists $INC{"Inline/Files.pm"} or not $FILE
exists $INC{"Inline/Files.pm"}
not $FILE
Truth table0%0/3
A or not(B)
A= exists $INC{"Inline/Files.pm"}B= not $FILE
| |||||||||||||||||||||||||||||||||||||||||||
| 197 | 0 | flock($FH, Fcntl::LOCK_UN()); | |||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | close($FH); | |||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | undef $FH; | |||||||||||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||
| 202 | } | ||||||||||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||||||||||
| 204 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||||||||||||||||
| 206 | __END__ | ||||||||||||||||||||||||||||||||||||||||||