Add --version.

Bump version to 1.61.
This commit is contained in:
stevenpritchard
2006-03-11 18:24:45 +00:00
parent 3685d9e6b6
commit 8d1e43228f
3 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ my $builder = Module::Build->new(
module_name => 'cpanspec',
license => 'perl',
dist_author => 'Steven Pritchard <steve@cpan.org>',
dist_version => '1.60',
dist_version => '1.61',
requires => {
'Archive::Tar' => 0,
'Archive::Zip' => 0,
+1
View File
@@ -8,6 +8,7 @@
--add-requires Add Requires for this item
--add-provides Add Provides for this item
--add-buildrequires Add BuildRequires for this item
--version Print the version and exit
* Fix path check to allow for a directory without a trailing /.
(Found in Module::Install 0.59.)
+16 -2
View File
@@ -10,7 +10,10 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: cpanspec,v 1.9 2006/03/09 21:21:19 stevenpritchard Exp $
# $Id: cpanspec,v 1.10 2006/03/11 18:24:45 stevenpritchard Exp $
my $NAME="cpanspec";
my $VERSION='1.61';
=head1 NAME
@@ -40,6 +43,7 @@ cpanspec [options] [file [...]]
--add-requires Add Requires for this item
--add-provides Add Provides for this item
--add-buildrequires Add BuildRequires for this item
--version Print the version number and exit
=head1 DESCRIPTION
@@ -151,6 +155,10 @@ Add Provides for this item.
Add BuildRequires for this item.
=item B<-V>, B<--version>
Print the version number and exit.
=back
=head1 AUTHOR
@@ -212,6 +220,11 @@ our @add_requires;
our @add_provides;
our @add_buildrequires;
sub print_version {
print "$NAME version $VERSION\n";
exit 0;
}
sub verbose(@) {
print STDERR @_, "\n" if ($verbose);
}
@@ -351,6 +364,7 @@ GetOptions(
'add-requires=s' => \@add_requires,
'add-provides=s' => \@add_provides,
'add-buildrequires=s' => \@add_buildrequires,
'version' => \&print_version,
) or pod2usage({ -exitval => 1, -verbose => 0 });
pod2usage({ -exitval => 0, -verbose => 1 }) if ($help);
@@ -887,7 +901,7 @@ END
\%changelog
* $date $packager $version-$release
- Specfile autogenerated.
- Specfile autogenerated by $NAME $VERSION.
END
$spec->close();