summaryrefslogtreecommitdiffstats
path: root/preps/perl.d/perl-dist
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-06-01 19:45:05 +0200
committerJustin Davis <jrcd83@gmail.com>2012-06-01 19:45:05 +0200
commitd69b44bc8391f8adc3353e3778e291ff54e82e47 (patch)
tree22e80e392551a781114621c0ea43e171acf40ca4 /preps/perl.d/perl-dist
parent29be38d2671db067c86e07fa6177cd14055a32ea (diff)
downloadgenpkg-d69b44bc8391f8adc3353e3778e291ff54e82e47.tar.gz
genpkg-d69b44bc8391f8adc3353e3778e291ff54e82e47.tar.xz
Update CPAN index filenames everywhere they are used.
cpandists => cpan.dists cpanmods => cpan.mods Fixes a bug where loadcore tried to use _vardir in perl-dist.
Diffstat (limited to 'preps/perl.d/perl-dist')
-rwxr-xr-xpreps/perl.d/perl-dist19
1 files changed, 10 insertions, 9 deletions
diff --git a/preps/perl.d/perl-dist b/preps/perl.d/perl-dist
index 4dd0d84..dd1413c 100755
--- a/preps/perl.d/perl-dist
+++ b/preps/perl.d/perl-dist
@@ -18,6 +18,7 @@ my %CoreMods = loadcore();
package Convert;
*DBG = *main::DBG;
+*vardir = *main::vardir;
use LWP::UserAgent qw();
use YAML::XS qw();
@@ -298,9 +299,9 @@ sub _distsofmods
return () if(@mods == 0);
@mods = _nocore(@mods);
- my $var = _vardir();
+ my $var = vardir();
open my $fh, '<', "$var/cpan.mods"
- or die "$PROG: failed to open $var/cpanmods: $!";
+ or die "$PROG: failed to open $var/cpan.mods: $!";
my %mods = map { ($_ => 1) } @mods;
my %dists;
@@ -337,12 +338,6 @@ sub _nocore
return @mods;
}
-sub _vardir
-{
- return $ENV{'PKGVAR'}
- or die "$PROG: PKGVAR env variable is unset\n";
-}
-
#-----------------------------------------------------------------------------
package main;
@@ -595,9 +590,15 @@ sub _readmedesc
return undef;
}
+sub vardir
+{
+ return $ENV{'PKGVAR'}
+ or die "$PROG: PKGVAR env variable is unset\n";
+}
+
sub loadcore
{
- my $cmpath = _vardir() . '/perlcore.mods';
+ my $cmpath = vardir() . '/perlcore.mods';
unless(-f $cmpath){
print STDERR <<"END_ERR";
$PROG: error: $cmpath is missing.