#make_ppd.pl use File::DosGlob qw(glob); use Win32::FileOp; use strict; my $make='nmake.exe'; END { print "\nDONE\n"; }; system('perl Makefile.PL'); system($make) and die "Failed to make!\n"; system($make, 'dist'); # this creates the ordinary distribution # I need the archive to find the version number! # If you comment this out, always copy the archive to current directory. # this part of code finds the latest distribution, I don't have time to # explore how to find the version number my @archives = sort (grep {!/-PPM\.tar\.gz$/i} <*.tar.gz>); my $archive = $archives[-1]; my ($name, $module, $file); ($name = $archive) =~ s/\.tar\.gz$//; ($module = $name) =~ s/-[\d.]+$//; ($file = $module) =~ s/^.*-(.*?)$/$1/; $module =~ s/-/\\/g; print "Module name : $file\n"; print "Newest archive is $archive\n"; # system($make, 'ppd'); # you may do something like system($make, 'ppd', "BINARY_LOCATION=$name-PPM.tar.gz"); # if you do not apply my path to ExtUtils\MM_Unix.pm print (qq{pod2html.bat "-header" "-htmlroot=." "$file.pm" "-outfile=$file.html"\n}); system(qq{pod2html.bat "-header" "-htmlroot=." "$file.pm" "-outfile=$file.html"}); #mkdir 'blib/html'; # not necessary Move "$file.html" => "blib/html/lib/$module.html"; system("tar cvf $name-PPM.tar blib"); # print "gzip --best $name-PPM.tar"; system("gzip --best $name-PPM.tar"); Delete 'blib', 'pod2html-dircache', 'pod2html-itemcache', 'pm_to_blib';