File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 27
27
28
28
# read the rest of the file line-by-line (too big to slurp)
29
29
30
- my $fh_packages = read_02packages_fh(1 );
30
+ my $fh_packages = read_02packages_fh( log_meta => 1 );
31
31
while ( my $line = <$fh_packages > ) {
32
32
next unless $line ;
33
33
chomp ($line );
Original file line number Diff line number Diff line change @@ -355,10 +355,16 @@ sub read_02packages_fh ( %args ) {
355
355
return $fh ;
356
356
}
357
357
358
- sub read_02packages () {
359
- my $cpan = cpan_dir();
360
- return Parse::CPAN::Packages::Fast-> new(
361
- $cpan -> child(qw< modules 02packages.details.txt.gz > )-> stringify );
358
+ sub read_02packages ( $file = undef ) {
359
+ my $content ;
360
+ if ( $file ) {
361
+ $content = path($file )-> stringify;
362
+ } else {
363
+ my $cpan = cpan_dir();
364
+ $content = $cpan -> child(qw< modules 02packages.details.txt.gz > )-> stringify;
365
+ }
366
+
367
+ return Parse::CPAN::Packages::Fast-> new($content );
362
368
}
363
369
364
370
# TODO: replace usage with unified read_06perms
You can’t perform that action at this time.
0 commit comments