Makefile.pl (beispiel):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Mail::Transfer',
'VERSION_FROM' => 'Transfer.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
('ABSTRACT_FROM' => 'Transfer.pm', # retrieve abstract from module
'AUTHOR' => 'Sascha Kiefer <sk@intertivity.com>',
'INSTALLSITELIB' => undef,
'dist' => {
'COMPRESS' => 'gzip -9f',
'SUFFIX' => 'gz'
},
) : ()
),
);
make_ppd.pl (macht ppd package und cpan zeugs)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#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';
Tar und Gzip für Windows hab ich
hier hingelegt!