| 1 | # Grips::Gripsrc.pm | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # Copyright (c) 2002 DIMDI <tarek.ahmed@dimdi.de>. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # This module is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # the same terms as Perl itself, i.e. under the terms of either the GNU General | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | # Public License or the Artistic License, as specified in the F<LICENCE> file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | package Grips::Gripsrc; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use FileHandle; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use vars qw($VERSION); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 1 | $VERSION = "0.01"; # $Id: Gripsrc.pm,v 1.2 2003-02-04 12:19:08 ahmed Exp $ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | my %gripsrc = (); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | sub _readrc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_readrc: not called CC=28 SCAR=67.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | my $host = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | my($home,$file); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | ▶ | if($^O eq "MacOS") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | $home = $ENV{HOME} || `pwd`; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$ENV{'HOME'} || `pwd`
MC/DC0%0/2
$ENV{'HOME'} || `pwd`
$ENV{'HOME'}
`pwd`
Truth table0%0/3
A || B
A= $ENV{'HOME'}B= `pwd`
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | chomp($home); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | ▶ | $file = ($home =~ /:$/ ? $home . "gripsrc" : $home . ":gripsrc"); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | # Some OS's don't have `getpwuid', so we default to $ENV{HOME} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | $home = eval { (getpwuid($>))[7] } || $ENV{HOME}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
eval {
do {
(getpwuid $>)[7]
}
} || $ENV{'HOME'}
MC/DC0%0/2
eval {
do {
(getpwuid $>)[7]
}
} || $ENV{'HOME'}
eval {
do {
(getpwuid $>)[7]
}
}
$ENV{'HOME'}
Truth table0%0/3
A || B
A= eval {
do {
(getpwuid $>)[7]
}
}B= $ENV{'HOME'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | $file = $home . "/.gripsrc"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | my $fh; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | local $_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | $gripsrc{default} = undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | # OS/2 and Win32 do not handle stat in a way compatable with this check :-( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | ▶ | unless($^O eq 'os2' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$^O eq "os2" or $^O eq "MSWin32" or $^O eq "MacOS" or $^O =~ /^cygwin/
$^O eq "os2" or $^O eq "MSWin32" or $^O eq "MacOS"
$^O eq "os2" or $^O eq "MSWin32"
MC/DC0%0/4
$^O eq "os2" or $^O eq "MSWin32" or $^O eq "MacOS" or $^O =~ /^cygwin/
$^O eq "os2"
$^O eq "MSWin32"
$^O eq "MacOS"
$^O =~ /^cygwin/
Truth table0%0/5
A or B or C or D
A= $^O eq "os2"B= $^O eq "MSWin32"C= $^O eq "MacOS"D= $^O =~ /^cygwin/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | || $^O eq 'MSWin32' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | || $^O eq 'MacOS' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | || $^O =~ /^cygwin/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | my @stat = stat($file); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | ▶ | if(@stat) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | ▶ | if($stat[2] & 077) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 0 | carp "Bad permissions: $file"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | if($stat[4] != $<) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | carp "Not owner: $file"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | ▶ | if($fh = FileHandle->new($file,"r")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | my($mach,$macdef,$tok,@tok) = (0,0); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | ▶ | while(<$fh>) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | ▶ | undef $macdef if /\A\n\Z/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | if($macdef) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | push(@$macdef,$_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | s/^\s*//; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 0 | chomp; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | ▶ | push(@tok, $+) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
length $_ and s/^("([^"]*)"|(\S+))\s*//
MC/DC0%0/2
length $_ and s/^("([^"]*)"|(\S+))\s*//
length $_
s/^("([^"]*)"|(\S+))\s*//
Truth table0%0/3
A and B
A= length $_B= s/^("([^"]*)"|(\S+))\s*//
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | while(length && s/^("([^"]*)"|(\S+))\s*//); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | TOKEN: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | ▶ | while(@tok) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | if($tok[0] eq "default") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | shift(@tok); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | $mach = bless {}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | $gripsrc{default} = [$mach]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | next TOKEN; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | last TOKEN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | ▶ | unless @tok > 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | $tok = shift(@tok); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | ▶ | if($tok eq "host") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | my $host = shift @tok; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | $mach = bless {host => $host}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | $gripsrc{$host} = [] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | unless exists($gripsrc{$host}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | push(@{$gripsrc{$host}}, $mach); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | elsif($tok =~ /^(id|user|pwd)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | ▶ | next TOKEN unless $mach; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | my $value = shift @tok; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | # Following line added by rmerrell to remove '/' escape char in .gripsrc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | $value =~ s/\/\\/\\/g; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | $mach->{$1} = $value; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | elsif($tok eq "macdef") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ▶ | next TOKEN unless $mach; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | my $value = shift @tok; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | $mach->{macdef} = {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | unless exists $mach->{macdef}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | $macdef = $mach->{machdef}{$value} = []; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | $fh->close(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | sub lookup | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
lookup: not called CC=10 SCAR=47.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | my($pkg,$mach,$id) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | _readrc() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | unless exists $gripsrc{default}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | ▶ | $mach ||= 'default'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$mach ||= "default"
MC/DC0%0/1
$mach ||= "default"
$mach
Truth table0%0/2
A
A= $mach
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | ▶ | undef $id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | if $mach eq 'default'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | ▶ | if(exists $gripsrc{$mach}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | if(defined $id) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | my $m; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | foreach $m (@{$gripsrc{$mach}}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | return $m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | ▶ | if(exists $m->{id} && $m->{id} eq $id); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
exists $m->{"id"} and $m->{"id"} eq $id
MC/DC0%0/2
exists $m->{"id"} and $m->{"id"} eq $id
exists $m->{"id"}
$m->{"id"} eq $id
Truth table0%0/3
A and B
A= exists $m->{"id"}B= $m->{"id"} eq $id
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | return $gripsrc{$mach}->[0] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | return $gripsrc{default}->[0] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | if defined $gripsrc{default}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | return undef; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | sub id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
id: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | my $me = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | exists $me->{id} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | ? $me->{id} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | ▶ | : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | sub pwd | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pwd: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | my $me = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | exists $me->{pwd} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | ? $me->{pwd} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | sub user | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
user: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 0 | my $me = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | exists $me->{user} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | ? $me->{user} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | ▶ | : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | sub iup | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
iup: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | my $me = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | ($me->id, $me->user, $me->pwd); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||