r29505 - in /trunk/dh-make-perl: debian/changelog lib/DhMakePerl.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Jan 10 00:55:19 UTC 2009
Author: gregoa
Date: Sat Jan 10 00:55:15 2009
New Revision: 29505
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29505
Log:
"--help": use pod2usage() instead of the hand-crafted usage_instructions()
method, duplicate maintainance of documentation is error-prone.
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/lib/DhMakePerl.pm
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=29505&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Sat Jan 10 00:55:15 2009
@@ -15,6 +15,8 @@
* "--exclude": use default values from Dpkg::Source::Package instead of
maintaining our own list; if invoked without arguments use default values
again.
+ * "--help": use pod2usage() instead of the hand-crafted usage_instructions()
+ method, duplicate maintainance of documentation is error-prone.
-- Damyan Ivanov <dmn at debian.org> Fri, 09 Jan 2009 11:38:50 +0200
Modified: trunk/dh-make-perl/lib/DhMakePerl.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/DhMakePerl.pm?rev=29505&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/DhMakePerl.pm (original)
+++ trunk/dh-make-perl/lib/DhMakePerl.pm Sat Jan 10 00:55:15 2009
@@ -4,6 +4,7 @@
use strict;
use base 'Class::Accessor';
+use Pod::Usage;
__PACKAGE__->mk_accessors( qw( cfg ) );
@@ -120,7 +121,7 @@
);
# Help requested? Nice, we can just die! Isn't it helpful?
- die $self->usage_instructions() if $self->cfg->help;
+ 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' ) {
@@ -296,25 +297,6 @@
$self->package_already_exists($apt_contents);
return(0);
-}
-
-sub usage_instructions {
- my ($self) = @_;
-
- return <<"USAGE"
-Usage:
-$0 [ --build ] [ --install ] [ SOURCE_DIR | --cpan MODULE ]
-$0 --refresh|-R
-Other options: [ --desc DESCRIPTION ] [ --arch all|any ] [ --version VERSION ]
- [ --depends DEPENDS ] [ --bdepends BUILD-DEPENDS ]
- [ --bdependsi BUILD-DEPENDS-INDEP ] [ --cpan-mirror MIRROR ]
- [ --exclude|-i [REGEX] ] [ --notest ] [ --nometa ]
- [ --requiredeps ] [ --core-ok ] [ --basepkgs PKGSLIST ]
- [ --closes ITPBUG ] [ --packagename|-p PACKAGENAME ]
- [ --email|-e EMAIL ] [ --pkg-perl ] [ --dh <ver> ]
- [ --sources-list file ] [ --dist <pattern> ]
- [ --[no-]verbose ] [ --data-dir dir ]
-USAGE
}
sub is_core_module {
More information about the Pkg-perl-cvs-commits
mailing list