Skip to content

Commit

Permalink
Make missing cpanmods message friendlier.
Browse files Browse the repository at this point in the history
Scrapecore needs ~/.genpkg/var/cpanmods data to exist.
When it is missing try to give a friendlier error message.
  • Loading branch information
juster committed Apr 21, 2012
1 parent 1808cd4 commit 2ab2432
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions preps/perl.d/scrapecore
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ sub coreonly
my %mods = map { @$_ } @_;
my $var = $ENV{'PKGVAR'} || "$ENV{'HOME'}/.genpkg/var";
my $path = "$var/cpanmods";
unless(-f $path){
die "$0: $path is missing. Generate it with fetchcpan.\n";
}
open(my $if, '<', $path) or die("open $path failed: $!");

my @dists;
Expand Down

0 comments on commit 2ab2432

Please sign in to comment.