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 2727
2828# read the rest of the file line-by-line (too big to slurp)
2929
30- my $fh_packages = read_02packages_fh(1 );
30+ my $fh_packages = read_02packages_fh( log_meta => 1 );
3131while ( my $line = <$fh_packages > ) {
3232 next unless $line ;
3333 chomp ($line );
Original file line number Diff line number Diff line change @@ -355,10 +355,16 @@ sub read_02packages_fh ( %args ) {
355355 return $fh ;
356356}
357357
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 );
362368}
363369
364370# TODO: replace usage with unified read_06perms
You can’t perform that action at this time.
0 commit comments