/usr/share/perl5/DhMakePerl.pm is in dh-make-perl 0.94.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | package DhMakePerl;
use warnings;
use strict;
use 5.010; # we use smart matching
use base 'Class::Accessor';
__PACKAGE__->mk_accessors( qw( cfg apt_contents ) );
=head1 NAME
DhMakePerl - create Debian source package from CPAN dist
=head1 VERSION
Version 0.90
=cut
our $VERSION = '0.94';
=head1 SYNOPSIS
use DhMakePerl;
DhMakePerl->run;
=head1 ACCESSORS
=over
=item apt_contents
Stores the cached copy of L<Debian::AptContents>.
=item cfg
Stores the configuration, an instance of L<DhMakePerl::Config>
=back
=head1 CLASS METHODS
=over
=cut
use Debian::AptContents ();
use DhMakePerl::Config;
use version ();
=item run( I<%init> )
Runs DhMakePerl.
Unless the %init contains an I<cfg> member, constructs and instance of
L<DhMakePerl::Config> and assigns it to I<$init{cfg}>.
Then determines the dh-make-perl command requested (via cfg->command), loads
the appropriate I<DhMakePerl::Command::$command> class, constructs an instance
of it and calls its I<execute> method.
=cut
sub run {
my ( $class, %c ) = @_;
unless ( $c{cfg} ) {
my $cfg = DhMakePerl::Config->new;
$cfg->parse_command_line_options;
$cfg->parse_config_file;
$c{cfg} = $cfg;
}
my $cmd_mod = $c{cfg}->command;
$cmd_mod =~ s/-/_/g;
require "DhMakePerl/Command/$cmd_mod.pm";
$cmd_mod =~ s{/}{::}g;
$cmd_mod = "DhMakePerl::Command::$cmd_mod";
my $self = $cmd_mod->new( \%c );
return $self->execute;
}
=item get_apt_contents
Returns (possibly cached) instance of L<Debian::AptContents>.
=cut
sub get_apt_contents {
my $self = shift;
return $self->apt_contents
if $self->apt_contents;
my $apt_c = Debian::AptContents->new(
{ homedir => $self->cfg->home_dir,
dist => $self->cfg->dist,
verbose => $self->cfg->verbose,
}
);
undef $apt_c unless $apt_c->cache;
return $self->apt_contents($apt_c);
}
=back
=head1 COPYRIGHT & LICENSE
=over
=item Copyright (C) 2009, 2010 Damyan Ivanov <dmn@debian.org>
=back
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 2 as published by the Free
Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
Street, Fifth Floor, Boston, MA 02110-1301 USA.
=cut
1; # End of DhMakePerl
|