r53474 - in /trunk/dh-make-perl: dh-make-perl lib/DhMakePerl.pm lib/DhMakePerl/Command/help.pm lib/DhMakePerl/Config.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Mar 1 20:27:04 UTC 2010


Author: dmn
Date: Mon Mar  1 20:26:56 2010
New Revision: 53474

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53474
Log:
implement --help as a regular command

Added:
    trunk/dh-make-perl/lib/DhMakePerl/Command/help.pm
Modified:
    trunk/dh-make-perl/dh-make-perl
    trunk/dh-make-perl/lib/DhMakePerl.pm
    trunk/dh-make-perl/lib/DhMakePerl/Config.pm

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=53474&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Mon Mar  1 20:26:56 2010
@@ -27,6 +27,8 @@
 =item dh-make-perl refresh-cache
 
 =item dh-make-perl dump-config
+
+=item dh-make-perl help
 
 =item cpan2deb I<DIST> I<options...>
 
@@ -125,6 +127,10 @@
 
 Useful for populating L<dh-make-perl.conf> file.
 
+=item help
+
+Displays short usage information.
+
 =back
 
 =head2 OPTIONS

Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=53474&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Mon Mar  1 20:26:56 2010
@@ -5,7 +5,6 @@
 use 5.010;    # we use smart matching
 
 use base 'Class::Accessor';
-use Pod::Usage;
 
 __PACKAGE__->mk_accessors(
     qw(
@@ -175,14 +174,13 @@
     $self->bdepends(
         Debian::Dependencies->new( 'debhelper (>=' . $self->cfg->dh . ')' ) );
 
-    # Help requested? Nice, we can just die! Isn't it helpful?
-    die pod2usage(-message => "See `man 1 dh-make-perl' for details.\n") if $self->cfg->help;
     die "CPANPLUS support disabled, sorry" if $self->cfg->cpanplus;
 
     if (   $self->cfg->command eq 'refresh-cache'
         or $self->cfg->command eq 'dump-config'
         or $self->cfg->command eq 'locate'
-        or $self->cfg->command eq 'refresh' )
+        or $self->cfg->command eq 'refresh'
+        or $self->cfg->command eq 'help' )
     {
         my $cmd_mod = $self->cfg->command;
         $cmd_mod =~ s/-/_/g;

Added: trunk/dh-make-perl/lib/DhMakePerl/Command/help.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Command/help.pm?rev=53474&op=file
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Command/help.pm (added)
+++ trunk/dh-make-perl/lib/DhMakePerl/Command/help.pm Mon Mar  1 20:26:56 2010
@@ -1,0 +1,62 @@
+package DhMakePerl::Command::help;
+
+=head1 NAME
+
+DhMakePerl::Command::help - dh-make-perl help implementation
+
+=head1 DESCRIPTION
+
+This module implements the I<help> command of L<dh-make-perl(1)>.
+
+=cut
+
+use strict; use warnings;
+
+use base 'DhMakePerl';
+use Pod::Usage;
+
+=head1 METHODS
+
+=over
+
+=item execute
+
+Provides I<help> command implementation.
+
+=cut
+
+sub execute {
+    my $self = shift;
+
+    # Help requested? Nice, we can just die! Isn't it helpful?
+    die pod2usage( -message => "See `man 1 dh-make-perl' for details.\n" )
+}
+
+=back
+
+=cut
+
+1;
+
+=head1 COPYRIGHT & LICENSE
+
+=over
+
+=item Copyright (C) 2008, 2009, 2010 Damyan Ivanov <dmn at 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
+

Modified: trunk/dh-make-perl/lib/DhMakePerl/Config.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl/Config.pm?rev=53474&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl/Config.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl/Config.pm Mon Mar  1 20:26:56 2010
@@ -24,7 +24,7 @@
     'dbflags=s',       'depends=s',
     'desc=s',          'dh=i',
     'dist=s',          'email|e=s',
-    'exclude|i:s{,}',  'help',
+    'exclude|i:s{,}',
     'home-dir=s',      'install!',
     'network!',
     'nometa',          'notest',
@@ -36,7 +36,7 @@
 );
 
 use constant commands =>
-    ( 'make', 'refresh|R', 'refresh-cache', 'dump-config', 'locate' );
+    ( 'make', 'refresh|R', 'refresh-cache', 'dump-config', 'locate', 'help' );
 
 __PACKAGE__->mk_accessors(
     do {




More information about the Pkg-perl-cvs-commits mailing list