lib/ChordPro/Files.pm

filter: Statementstmt 71.5% 128 / 179 Branchbran 43.8% 43 / 98 Conditioncond 54.8% 17 / 31 MC/DCmcdc 35.2% 6 / 17 Subroutinesub 80.0% 24 / 30 Podpod 0.0% 0 / 13 totaltotal 59.2% 218 / 368 CC 61 SCAR 37.5
CC
61
Cov
61%
search_tree
156.0
_fs_test
82.9
fs_load
12.9
CRAP 42.3
« lib/ChordPro/Chords.pm ↑ Summary blib/lib/ChordPro/Wx/Utils.pm »
1 #! perl
2  
3 106 ▶use v5.26;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 106 ▶use feature qw( signatures );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 106 ▶no warnings qw( experimental::signatures );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 106 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 package ChordPro::Files;
9  
10 # Generalize some file system operations so they use LongPath on Windows.
11 # This is necessary for long filenames and unicode filenames.
12  
13 # NOTE: FILENAMES SHOULD AT ALL TIMES BE PERL STRINGS!
14  
15 # Where do filenames come from?
16 #
17 # 1. Command line arguments. Decode ASAP.
18 # 2. File (and directory) dialogs: Always perl string.
19 # 3. Preferences, configs, recents: should all be perl strings.
20 # 4. From filelists. We expect these lists to have UTF8 filenames that
21 # get decoded when the list is read.
22  
23 106 ▶use Encode qw( decode_utf8 encode_utf8 );
Subroutine BEGIN: called CC=1 SCAR=0.0
24 106 ▶use Ref::Util qw(is_ref);
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 106 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
27 106 our @EXPORT;
28 106 our @EXPORT_OK;
29  
30 ################ Platforms ################
31  
32 106 ▶use constant MSWIN => $^O =~ /MSWin|Windows_NT/i ? 1 : 0;
Subroutine BEGIN: called CC=2 SCAR=7.1
Branch: 1 branch
BranchTrueFalseTotal
$^O =~ /MSWin|Windows_NT/iu ? : 0 106 106
33  
34 3687 ▶sub is_msw () { MSWIN }
Subroutine is_msw: called CC=1 SCAR=0.0
Pod undocumented
35 2 ▶sub is_macos () { $^O =~ /darwin/ }
Subroutine is_macos: called CC=1 SCAR=0.0
Pod undocumented
36 0 ▶sub is_wx () { defined($Wx::wxVERSION) }
Subroutine is_wx: not called CC=1 SCAR=6.9
Pod undocumented
37  
38 106 push( @EXPORT, qw( is_msw is_macos is_wx ) );
39  
40 106 ▶if ( is_msw ) {
Branch: 1 branch
BranchTrueFalseTotal
if (is_msw()) 0 106 106
41 0 require Win32::LongPath;
42 }
43  
44 ################ ################
45  
46 # General pattern:
47 # If Windows, call Windows specific function.
48 # Otherwise
49 # If the filename contains UTF8 characters, encode.
50 # Call standard perl function.
51  
52 520 ▶sub fs_open( $name, $mode = '<:utf8' ) {
Subroutine fs_open: called CC=6 SCAR=20.3
Pod undocumented
53 520 my $fd;
54 520 ▶ if ( is_msw ) {
Branch: 1 branch
BranchTrueFalseTotal
if (is_msw()) 0 520 520
55 0 ▶ Win32::LongPath::openL( \$fd, $mode, $name )
Branch: 1 branch
BranchTrueFalseTotal
Win32::LongPath::openL(\$fd, $mode, $name) or die "${name}: $^E\n" 0 0 0
56 or die("$name: $^E\n");
57 0 return $fd;
58 }
59  
60 520 my $uname = $name;
61 520 ▶ $uname = encode_utf8($name) if utf8::is_utf8($uname);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($uname) 167 353 520
62  
63 520 ▶ open( $fd, $mode, $uname )
Branch: 1 branch
BranchTrueFalseTotal
open $fd, $mode, $uname or die "${name}: $!\n" 520 0 520
64 or die("$name: $!\n");
65 520 return $fd;
66 }
67  
68 106 push( @EXPORT, qw(fs_open) );
69  
70 1813 ▶sub fs_test( $tests, $name ) {
Subroutine fs_test: called CC=3 SCAR=11.0
Pod undocumented
71 1813 my $res = 1;
72 1813 for my $test ( split( //, $tests ) ) {
73 2929 $res = _fs_test( $test, $name );
74 2929 ▶ return unless $res;
Branch: 1 branch
BranchTrueFalseTotal
unless $res 488 2441 2929
75 }
76 1325 $res;
77 }
78  
79 2929 ▶sub _fs_test( $test, $name ) {
Subroutine _fs_test: called CC=19 SCAR=44.2
80 2929 ▶ return Win32::LongPath::testL( $test, $name ) if is_msw;
Branch: 1 branch
BranchTrueFalseTotal
if is_msw() 0 2929 2929
81  
82 2929 my $uname = $name;
83 2929 ▶ $uname = encode_utf8($name) if utf8::is_utf8($uname);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($uname) 10 2919 2929
84  
85 0 ▶ if ( $test eq 'b' ) { return -b $uname }
Branch: 16 branches
BranchTrueFalseTotal
if ($test eq 'b') { } 0 2929 2929
elsif ($test eq 'c') { } 0 2929 2929
elsif ($test eq 'd') { } 270 2659 2929
elsif ($test eq 'e') { } 0 2659 2659
elsif ($test eq 'f') { } 1318 1341 2659
elsif ($test eq 'l') { } 0 1341 1341
elsif ($test eq 'o') { } 0 1341 1341
elsif ($test eq 'O') { } 0 1341 1341
elsif ($test eq 'r') { } 6 1335 1341
elsif ($test eq 'R') { } 0 1335 1335
elsif ($test eq 's') { } 1335 0 1335
elsif ($test eq 'w') { } 0 0 0
elsif ($test eq 'W') { } 0 0 0
elsif ($test eq 'x') { } 0 0 0
elsif ($test eq 'X') { } 0 0 0
elsif ($test eq 'z') { } 0 0 0
86 0 elsif ( $test eq 'c' ) { return -c $uname }
87 270 elsif ( $test eq 'd' ) { return -d $uname }
88 0 elsif ( $test eq 'e' ) { return -e $uname }
89 1318 elsif ( $test eq 'f' ) { return -f $uname }
90 0 elsif ( $test eq 'l' ) { return -l $uname }
91 0 elsif ( $test eq 'o' ) { return -o $uname }
92 0 elsif ( $test eq 'O' ) { return -O $uname }
93 6 elsif ( $test eq 'r' ) { return -r $uname }
94 0 elsif ( $test eq 'R' ) { return -R $uname }
95 1335 elsif ( $test eq 's' ) { return -s $uname }
96 0 elsif ( $test eq 'w' ) { return -w $uname }
97 0 elsif ( $test eq 'W' ) { return -W $uname }
98 0 elsif ( $test eq 'x' ) { return -x $uname }
99 0 elsif ( $test eq 'X' ) { return -X $uname }
100 0 elsif ( $test eq 'z' ) { return -z $uname }
101 0 else { die("Invalid test '$test' for $name\n") }
102 }
103  
104 106 push( @EXPORT, qw(fs_test) );
105  
106 3 ▶sub fs_unlink( $name ) {
Subroutine fs_unlink: called CC=3 SCAR=11.4
Pod undocumented
107  
108 3 ▶ return Win32::LongPath::unlinkL($name) if is_msw;
Branch: 1 branch
BranchTrueFalseTotal
if is_msw() 0 3 3
109  
110 3 my $uname = $name;
111 3 ▶ $uname = encode_utf8($name) if utf8::is_utf8($uname);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($uname) 3 0 3
112 3 unlink($uname);
113 }
114  
115 106 push( @EXPORT, qw(fs_unlink) );
116  
117 1 ▶sub fs_find( $folder, $opts = {} ) {
Subroutine fs_find: called CC=6 SCAR=25.5
Pod undocumented
118  
119 1 ▶ my $filter = $opts->{filter} // qr/[.]/i;
Condition50%1/2
$opts->{"filter"} // qr/[.]/iu
l!l
10
MC/DC0%0/1
$opts->{"filter"} // qr/[.]/iu
$opts->{"filter"}
Truth table50%1/2
A
A= $opts->{"filter"}
Aresult
11
00
120 1 ▶ my $recurse = $opts->{recurse} // 1;
Condition50%1/2
$opts->{"recurse"} // 1
l!l
01
MC/DC0%0/1
$opts->{"recurse"} // 1
$opts->{"recurse"}
Truth table50%1/2
A
A= $opts->{"recurse"}
Aresult
11
00
121 1 $opts->{subfolders} = 0;
122  
123 1 ▶ unless ( is_msw ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (is_msw()) 1 0 1
124 1 my $ufolder = $folder;
125 1 ▶ $ufolder = encode_utf8($folder) if utf8::is_utf8($folder);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($folder) 0 1 1
126  
127 106 ▶ use File::Find qw(find);
Subroutine BEGIN: called CC=1 SCAR=0.0
128 1 my @files;
129  
130 271 ▶ find sub {
Subroutine __ANON__: called CC=5 SCAR=16.1
131 271 ▶ if ( -d && $File::Find::name ne $folder ) {
Branch: 2 branches
BranchTrueFalseTotal
if (-d $_ and $File::Find::name ne $folder) { } 8 263 271
elsif (-s _ and $_ =~ /$filter/u) { } 3 260 263
Condition100%3/3
-d $_ and $File::Find::name ne $folder
!ll&&!rl&&r
26218
MC/DC100%2/2
-d $_ and $File::Find::name ne $folder
-d $_ $File::Find::name ne $folder
Truth table100%3/3
A and B
A= -d $_B= $File::Find::name ne $folder
ABresult
0X0
100
111
132 8 $File::Find::prune = !$recurse;
133 8 $opts->{subfolders} = 1;
134 }
135 ▶ elsif ( -s _ && $_ =~ $filter ) {
Condition66%2/3
-s _ and $_ =~ /$filter/u
!ll&&!rl&&r
02603
MC/DC50%1/2
-s _ and $_ =~ /$filter/u
-s _ $_ =~ /$filter/u
Truth table66%2/3
A and B
A= -s _B= $_ =~ /$filter/u
ABresult
0X0
100
111
136 3 my $i = 0;
137 3 my @st = stat(_);
138 push( @files,
139 { name => decode_utf8($File::Find::name =~ s;^\Q$ufolder\E/?;;r),
140 3 map { $_ => $st[$i++] }
141 qw{ dev ino mode nlink uid gid rdev size
142 atime mtime ctime blksize blocks }
143 } );
144 }
145 1 }, $ufolder;
146  
147 1 @files = sort { $a->{name} cmp $b->{name} } @files;
148 1 return \@files;
149 }
150  
151 0 ▶ sub search_tree( $path, $opts, $folder ) {
Subroutine search_tree: not called CC=12 SCAR=50.5
Pod undocumented
152  
153 0 ▶ my $filter = $opts->{filter} // qr/[.]/i;
Condition0%0/2
$opts->{"filter"} // qr/[.]/iu
l!l
00
MC/DC0%0/1
$opts->{"filter"} // qr/[.]/iu
$opts->{"filter"}
Truth table0%0/2
A
A= $opts->{"filter"}
Aresult
11
00
154 0 ▶ my $recurse = $opts->{recurse} // 1;
Condition0%0/2
$opts->{"recurse"} // 1
l!l
00
MC/DC0%0/1
$opts->{"recurse"} // 1
$opts->{"recurse"}
Truth table0%0/2
A
A= $opts->{"recurse"}
Aresult
11
00
155 0 my $dir = Win32::LongPath->new;
156 0 my @files;
157 0 ▶ $dir->opendirL($path)
Branch: 1 branch
BranchTrueFalseTotal
$dir->opendirL($path) or die "${path}: $^E\n" 0 0 0
158 or die ("$path: $^E\n");
159  
160 0 foreach my $file ( $dir->readdirL ) {
161 # Skip parent dir.
162 0 ▶ next if $file eq '..';
Branch: 1 branch
BranchTrueFalseTotal
if $file eq ".." 0 0 0
163 # Get file stats.
164 0 ▶ my $name = $file eq '.' ? $path : "$path/$file";
Branch: 1 branch
BranchTrueFalseTotal
$file eq '.' ? : 0 0 0
165 0 ▶ my $stat = Win32::LongPath::lstatL($name)
Branch: 1 branch
BranchTrueFalseTotal
my $stat = Win32::LongPath::lstatL($name) or die "stat($name,", Win32::LongPath::getcwdL(), "): $^E\n" 0 0 0
166 or die( "stat($name,", Win32::LongPath::getcwdL(), "): $^E\n" );
167  
168 # Recurse if dir.
169 0 ▶ if ( ( $file ne '.' )
Branch: 1 branch
BranchTrueFalseTotal
if ($file ne "." and ($stat->{"attribs"} & (Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY() | Win32::LongPath::FILE_ATTRIBUTE_REPARSE_POINT())) == Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY()) 0 0 0
Condition0%0/3
$file ne "." and ($stat->{"attribs"} & (Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY() | Win32::LongPath::FILE_ATTRIBUTE_REPARSE_POINT())) == Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY()
!ll&&!rl&&r
000
MC/DC0%0/2
$file ne "." and ($stat->{"attribs"} & (Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY() | Win32::LongPath::FILE_ATTRIBUTE_REPARSE_POINT())) == Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY()
$file ne "." ($stat->{"attribs"} & (Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY() | Win32::LongPath::FILE_ATTRIBUTE_REPARSE_POINT())) == Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY()
Truth table0%0/3
A and B
A= $file ne "."B= ($stat->{"attribs"} & (Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY() | Win32::LongPath::FILE_ATTRIBUTE_REPARSE_POINT())) == Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY()
ABresult
0X0
100
111
170 && ( ($stat->{attribs}
171 & ( Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY()
172 | Win32::LongPath::FILE_ATTRIBUTE_REPARSE_POINT() ) )
173 == Win32::LongPath::FILE_ATTRIBUTE_DIRECTORY() ) ) {
174 0 ▶ push( @files, @{ search_tree( $name, $opts, $folder ) } )
Branch: 1 branch
BranchTrueFalseTotal
if $recurse 0 0 0
175 if $recurse;
176 0 $opts->{subfolders} = 1;
177 0 next;
178 }
179 0 $name =~ s;^\Q$folder\E/?;;;
180 0 ▶ push( @files, { #%$stat,
Branch: 1 branch
BranchTrueFalseTotal
if $file =~ /$filter/u 0 0 0
181 name => $name,
182 full => Win32::LongPath::abspathL($name) } )
183 if $file =~ $filter;
184 }
185  
186 0 $dir->closedirL;
187 0 return \@files;
188 }
189  
190 0 return [ sort { $a->{name} cmp $b->{name} }
191 0 @{ search_tree( $folder, $opts, $folder ) } ];
192  
193 }
194  
195 106 push( @EXPORT, qw(fs_find) );
196  
197 0 ▶sub fs_copy( $from, $to ) {
Subroutine fs_copy: not called CC=4 SCAR=24.2
Pod undocumented
198 0 ▶ return Win32::LongPath::copyL( $from, $to ) if is_msw;
Branch: 1 branch
BranchTrueFalseTotal
if is_msw() 0 0 0
199  
200 0 ▶ $to = encode_utf8($to) if utf8::is_utf8($to);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($to) 0 0 0
201 0 ▶ $from = encode_utf8($from) if utf8::is_utf8($from);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($from) 0 0 0
202  
203 106 ▶ use File::Copy;
Subroutine BEGIN: called CC=1 SCAR=0.0
204 0 copy( $from, $to );
205 }
206  
207 106 push( @EXPORT, qw(fs_copy) );
208  
209 # Wrapper for File::LoadLines.
210  
211 499 ▶sub fs_load( $name, $opts = {} ) {
Subroutine fs_load: called CC=9 SCAR=25.6
Pod undocumented
212  
213 106 ▶ use File::LoadLines;
Subroutine BEGIN: called CC=1 SCAR=0.0
214  
215 499 ▶ $opts->{fail} //= "soft";
Condition100%2/2
$opts->{"fail"} //= "soft"
l!l
48019
MC/DC100%1/1
$opts->{"fail"} //= "soft"
$opts->{"fail"}
Truth table100%2/2
A
A= $opts->{"fail"}
Aresult
11
00
216  
217 499 my $ret;
218 499 eval {
219 499 ▶ if ( is_ref($name) || $name =~ m;^\w\w+:; ) {
Branch: 1 branch
BranchTrueFalseTotal
if (is_ref($name) or $name =~ /^\w\w+:/u) { } 82 417 499
Condition66%2/3
is_ref($name) or $name =~ /^\w\w+:/u
l!l&&r!l&&!r
820417
MC/DC50%1/2
is_ref($name) or $name =~ /^\w\w+:/u
is_ref($name) $name =~ /^\w\w+:/u
Truth table66%2/3
A or B
A= is_ref($name)B= $name =~ /^\w\w+:/u
ABresult
1X1
011
000
220 82 $ret = loadlines( $name, $opts );
221 }
222 else {
223 417 ▶ my $fd = $name eq '-' ? \*STDIN : fs_open($name);
Branch: 1 branch
BranchTrueFalseTotal
$name eq '-' ? : 0 417 417
224 417 $ret = loadlines( $fd, $opts );
225 417 $opts->{_filesource} = $name;
226 }
227 };
228 499 ▶ return $ret unless $@;
Branch: 1 branch
BranchTrueFalseTotal
unless $@ 499 0 499
229  
230 0 my $msg = $@;
231 0 ▶ die( "$msg\n" ) unless $opts->{fail} eq "soft";
Branch: 1 branch
BranchTrueFalseTotal
unless $opts->{"fail"} eq "soft" 0 0 0
232 0 ▶ $msg = $1 if $msg =~ /^\Q$name\E: (.*)$/;
Branch: 1 branch
BranchTrueFalseTotal
if $msg =~ /^\Q$name\E: (.*)$/u 0 0 0
233 0 $opts->{error} = $msg;
234 0 return;
235 }
236  
237 0 ▶sub fs_blob( $name, $opts = {} ) {
Subroutine fs_blob: not called CC=2 SCAR=17.9
Pod undocumented
238 0 fs_load( $name, { blob => 1, %$opts } );
239 }
240  
241 106 push( @EXPORT, qw(fs_load fs_blob) );
242  
243 ################ File::Spec functions ################
244  
245 # Adapted from File::Spec::Functions 3.75.
246  
247 # Function fn_catfile = File::Spec->catfile, etc.
248  
249 106 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
250 106 require File::Spec::Unix;
251  
252 106 my @funcs =
253 qw( canonpath
254 catdir
255 catfile
256 curdir
257 rootdir
258 updir
259 is_absolute
260 splitpath
261 catpath
262 path
263 devnull
264 tmpdir
265 splitdir
266 abs2rel
267 rel2abs
268 case_tolerant
269 );
270 106 push( @EXPORT, map { "fn_$_" } @funcs );
271  
272 106 my %udeps = ( canonpath => [],
273 catdir => [ qw(canonpath) ],
274 catfile => [ qw(canonpath catdir) ],
275 case_tolerant => [],
276 curdir => [],
277 devnull => [],
278 rootdir => [],
279 updir => [],
280 );
281  
282 106 foreach my $meth ( @funcs ) {
283 1696 ▶ $meth = 'file_name_is_absolute' if $meth eq 'is_absolute';
Branch: 1 branch
BranchTrueFalseTotal
if $meth eq "is_absolute" 106 1590 1696
284 1696 my $sub = File::Spec->can($meth);
285 106 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
286 1696 ▶ if ( exists( $udeps{$meth} )
Branch: 1 branch
BranchTrueFalseTotal
if (exists $udeps{$meth} and $sub == 'File::Spec::Unix'->can($meth) and not grep({'File::Spec'->can($_) != 'File::Spec::Unix'->can($_);} @{$udeps{$meth};}) and defined &{"File::Spec::Unix::_fn_$meth";}) { } 848 848 1696
Condition66%6/9
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth) and not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};}) and defined &{"File::Spec::Unix::_fn_$meth";}
!ll&&!rl&&r
8480848
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth) and not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};})
!ll&&!rl&&r
8480848
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth)
!ll&&!rl&&r
8480848
MC/DC25%1/4
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth) and not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};}) and defined &{"File::Spec::Unix::_fn_$meth";}
exists $udeps{$meth} $sub == "File::Spec::Unix"->can($meth) not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};}) defined &{"File::Spec::Unix::_fn_$meth";}
Truth table40%2/5
A and B and not(C) and D
A= exists $udeps{$meth}B= $sub == "File::Spec::Unix"->can($meth)C= not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};})D= defined &{"File::Spec::Unix::_fn_$meth";}
ABCDresult
0XXX0
10XX0
110X0
11100
11111
287 && $sub == File::Spec::Unix->can($meth)
288 318 && !( grep { File::Spec->can($_) != File::Spec::Unix->can($_) }
289 848 @{$udeps{$meth} } )
290 848 && defined( &{"File::Spec::Unix::_fn_$meth"} ) ) {
291 848 *{"fn_$meth"} = \&{"File::Spec::Unix::_fn_$meth"};
292 }
293 else {
294 848 ▶ $meth = 'is_absolute' if $meth eq 'file_name_is_absolute';
Branch: 1 branch
BranchTrueFalseTotal
if $meth eq "file_name_is_absolute" 106 742 848
295 335 ▶ *{"fn_$meth"} = sub { &$sub( 'File::Spec', @_) };
Subroutine __ANON__: called CC=1 SCAR=0.0
296 }
297 }
298  
299 ################ File::Basename functions ################
300  
301 # For now, use File:Basename functions.
302 # Refine to File::Spec functions later.
303  
304 106 ▶use File::Basename ();
Subroutine BEGIN: called CC=1 SCAR=0.0
305  
306 0 ▶sub fn_basename( $fullname, @suffixlist ) {
Subroutine fn_basename: not called CC=1 SCAR=6.9
Pod undocumented
307 0 File::Basename::basename( $fullname, @suffixlist );
308 }
309  
310 106 push( @EXPORT, "fn_basename" );
311  
312 0 ▶sub fn_dirname( $fullname ) {
Subroutine fn_dirname: not called CC=1 SCAR=6.9
Pod undocumented
313 0 File::Basename::dirname( $fullname );
314 }
315  
316 106 push( @EXPORT, "fn_dirname" );
317  
318 106 1;
« lib/ChordPro/Chords.pm ↑ Summary blib/lib/ChordPro/Wx/Utils.pm »