line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## |
2
|
|
|
|
|
|
|
# name: Debian::Perl |
3
|
|
|
|
|
|
|
# abstract: Package Perl Modules for Debian. Painlessly! |
4
|
|
|
|
|
|
|
# author: Ingy döt Net |
5
|
|
|
|
|
|
|
# license: perl |
6
|
|
|
|
|
|
|
# copyright: 2011 |
7
|
|
|
|
|
|
|
# see: |
8
|
|
|
|
|
|
|
# - DhMakePerl |
9
|
|
|
|
|
|
|
# - Module::Install::Debian::Perl |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Debian::Perl; |
12
|
1
|
|
|
1
|
|
587
|
use 5.008003; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
55
|
|
13
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
14
|
1
|
|
|
1
|
|
13101
|
use Mouse; |
|
1
|
|
|
|
|
40095
|
|
|
1
|
|
|
|
|
6
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub build { |
17
|
0
|
|
|
0
|
|
|
print "\nBuilding your Debian Package...\n"; |
18
|
0
|
|
|
|
|
|
sleep 1; |
19
|
0
|
|
|
|
|
|
print "\n...just kidding. coming soon though!\n\n"; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub release { |
23
|
0
|
|
|
0
|
|
|
print "\nReleasing your Debian Package...\n"; |
24
|
0
|
|
|
|
|
|
sleep 1; |
25
|
0
|
|
|
|
|
|
print "\n...just kidding. coming soon though!\n\n"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub make_debian { |
29
|
|
|
|
|
|
|
Debian::Perl->new->build; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub make_release { |
33
|
|
|
|
|
|
|
Debian::Perl->new->release; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
37
|
|
|
|
|
|
|
# App::Cmd support for the `debian-perl` command. |
38
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
39
|
|
|
|
|
|
|
sub make_debian { |
40
|
0
|
|
|
0
|
|
|
Debian::Perl->new->build; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub make_release { |
44
|
0
|
|
|
0
|
|
|
Debian::Perl->new->release; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package Debian::Perl::Cmd; |
48
|
1
|
|
|
1
|
|
1079
|
use Mouse; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
6
|
|
49
|
|
|
|
|
|
|
extends 'MouseX::App::Cmd'; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
package Debian::Perl::Cmd::Command; |
52
|
1
|
|
|
1
|
|
412
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
53
|
|
|
|
|
|
|
extends 'MouseX::App::Cmd::Command'; |
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
298
|
use constant abstract => ''; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
86
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
package Debian::Perl::Cmd::Command::build; |
58
|
1
|
|
|
1
|
|
5
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
59
|
|
|
|
|
|
|
extends 'Debian::Perl::Cmd::Command'; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub execute { |
62
|
0
|
|
|
0
|
|
|
Debian::Perl->new->build; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
package Debian::Perl::Cmd::Command::release; |
66
|
1
|
|
|
1
|
|
334
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
67
|
|
|
|
|
|
|
extends 'Debian::Perl::Cmd::Command'; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub execute { |
70
|
0
|
|
|
0
|
|
|
Debian::Perl->new->release; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 SYNOPSIS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
From the command line: |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
> debian-perl build |
80
|
|
|
|
|
|
|
> debian-perl release |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
From a Perl module directory: |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
> Perl Makefile.PL |
85
|
|
|
|
|
|
|
> make debian |
86
|
|
|
|
|
|
|
> make release |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DESCRIPTION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
If you are a Perl module author, you probably know quite a bit about Perl, |
91
|
|
|
|
|
|
|
modules and CPAN. You probably know about Debian Linux. There's even a decent |
92
|
|
|
|
|
|
|
chance you've used it. However, there's only a very slim chance that you |
93
|
|
|
|
|
|
|
maintain Debian packages for your modules. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Let's assume that this at least vaguely describes you. If someone told you |
96
|
|
|
|
|
|
|
that you could flip a switch, and then every time you released a module to |
97
|
|
|
|
|
|
|
CPAN, it went to Debian (perfectly packaged to their standards), you'd |
98
|
|
|
|
|
|
|
probably flip that switch. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This module aspires to be that switch. It wants you to be a Debian Maintainer |
101
|
|
|
|
|
|
|
for free. You may end up becoming a full fledged Debian guru one day, but for |
102
|
|
|
|
|
|
|
now you just want to see your code available to a whole new world, without |
103
|
|
|
|
|
|
|
having to know the details. As long as this switch doesn't tell you |
104
|
|
|
|
|
|
|
otherwise, you know that you did the all right things. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This module is just a helping hand that automates all the standard best |
107
|
|
|
|
|
|
|
practices for you. It bends over backwards to help you get that module to |
108
|
|
|
|
|
|
|
Debian without having to know any more than is expected of a busy Perl module |
109
|
|
|
|
|
|
|
author, like you. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Specifically it uses things like C<dh-make-perl>, C<debuild>, C<pbuilder> and |
112
|
|
|
|
|
|
|
C<lintian>. If you've never heard of these things, that's ok. Until this week, |
113
|
|
|
|
|
|
|
neither did I. They all do a lot of work, and they aren't that hard to use, |
114
|
|
|
|
|
|
|
but the learning curve is quite high. As soon as Debian::Perl is stable and |
115
|
|
|
|
|
|
|
shipping all my CPAN modules to Debian, I plan to forget about them as quickly |
116
|
|
|
|
|
|
|
as possible. :) |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 USAGE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
There are two ways to use this module. There is a command called |
121
|
|
|
|
|
|
|
C<debian-perl> that you can use to prepare, build, test and release Debian |
122
|
|
|
|
|
|
|
packages from your Perl module. There is also a Module::Install plugin that |
123
|
|
|
|
|
|
|
allows you to simply do: |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
> make debian |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
See L<Module::Install::Debian::Perl> |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 MORE DOCUMENTATION |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Coming soon... |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 STATUS |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
This module is brand new and in heavy development. Nothing to see here. Move |
136
|
|
|
|
|
|
|
along. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 KUDOS |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Many thanks to the great folks at Strategic Data for supporting the creation |
141
|
|
|
|
|
|
|
of this module. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Extra special thanks to Andrew Pam, the resident Debian guru at Strategic |
144
|
|
|
|
|
|
|
Data, for providing all the right pointers. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Also a nod to Jeremiah Foster whose article in The Perl Review from the Spring |
147
|
|
|
|
|
|
|
2009 issue, not only pointed me in the right directions, but also convinced me |
148
|
|
|
|
|
|
|
that the process was still not quite consumable by the masses. I look forward |
149
|
|
|
|
|
|
|
to working with you and the debian-perl team. |