We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e18540e commit 2a14e35Copy full SHA for 2a14e35
lib/MetaCPAN/Ingest.pm
@@ -330,10 +330,18 @@ sub read_00whois ( $file = undef ) {
330
}
331
332
# TODO: replace usage with read_02packages
333
-sub read_02packages_fh ( $log_meta = 0 ) {
334
- my $cpan = cpan_dir();
335
- my $fh = $cpan->child(qw< modules 02packages.details.txt.gz >)
336
- ->openr(':gzip');
+sub read_02packages_fh ( %args ) {
+ my $log_meta = $args{log_meta} // 0;
+ my $file = $args{file};
+
337
+ my $fh;
338
+ if ( $file ) {
339
+ $fh = path($file)->openr(':gzip');
340
+ } else {
341
+ my $cpan = cpan_dir();
342
+ $fh = $cpan->child(qw< modules 02packages.details.txt.gz >)
343
+ ->openr(':gzip');
344
+ }
345
346
# read first 9 lines (meta info)
347
my $meta = "Meta info:\n";
0 commit comments