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
#!/bin/bash
BD="/home/user/myperlmodule/tar"
d="Acme-Pythonic-Functions"
d2="Acme-Pythonic-Functions-0.3"
tarname="Acme-Pythonic-Functions-0.3.tar.gz"
if test -f "$BD/$tarname"; then
rm -f "$BD/$tarname"
echo "Old version of $tarname removed."
fi
if test -d "$BD/test/$d2"; then
rm -rf "$BD/test/$d2"
echo "Old version of $d2 removed."
fi
module-starter --module=Acme::Pythonic::Functions --author="My Name" --email=myemail@someprovider.somedomain
cp "$BD/files/README" "$BD/$d"
cp "$BD/files/Functions.pm" "$BD/$d/lib/Acme/Pythonic"
cd "$BD/$d"
perl Makefile.PL
make
make test
make dist
mv "$tarname" "$BD"
cd $BD
rm -rf "$d"
tar -xzvf "$tarname"
cp -r "$BD/files/examples" "$BD/$d2"
rm $tarname
tar -czvf "$tarname" "$d2"
rm -rf "$d2"
tar -xzvf "$tarname"
mv "$d2" "$BD/test"
2012-02-01T22:27:22 reneeIch würde Dir empfehlen mal Dist::Zilla anzuschauen. Damit kannst Du den Release-Prozess weitgehend automatisieren (erstellen von Autoren-Tests, erstellen von Makefile.PL, erstellen der README etc) und es gibt ein Plugin, mit dem man automatisch den CPAN-Upload machen kann.
1
2
3
4
5
6
7
8
9
10
use CPAN::Uploader;
my $file = 'Dist-0.1.tar.gz';
CPAN::Uploader->upload_file(
$file,
{
user => 'your_cpan_id',
password => 'your_cpan_password',
},
);
2013-07-11T08:22:38 reneeCode: (dl )1
2
3
4
5
6
7
8
9
10use CPAN::Uploader;
my $file = 'Dist-0.1.tar.gz';
CPAN::Uploader->upload_file(
$file,
{
user => 'your_cpan_id',
password => 'your_cpan_password',
},
);