CPANPLUS-Dist-Mageia
view release on metacpan or search on metacpan
lib/CPANPLUS/Dist/Mageia.pm view on Meta::CPAN
# compute & store path of specfile.
my $spec = "$RPMDIR{spec}/$rpmname.spec";
$status->specpath($spec);
my $vers = $module->version;
# writing the spec file.
my $tmpl = _template_spec_file_path();
open my $tmplfh, '<', $tmpl or die "can't open '$tmpl': $!";
POSIX::setlocale(&POSIX::LC_ALL, 'C');
my $specfh;
if ( not open $specfh, '>', $spec ) {
error( "can't open '$spec': $!" );
return;
}
while ( defined( my $line = <$tmplfh> ) ) {
last if $line =~ /^__END__$/;
$line =~ s/DISTNAME/$distname/;
$line =~ s/DISTVERS/$distvers/g;
( run in 1.772 second using v1.01-cache-2.11-cpan-ceb78f64989 )