Permalink
Browse files

specify the version number in package

  • Loading branch information...
1 parent 52cd8c1 commit 9dc65e777094a923eed445f77d2197d53d6ec515 @tokuhirom committed Feb 20, 2013
Showing with 9 additions and 1 deletion.
  1. +1 −0 Makefile.PL
  2. +1 −0 lib/OrePAN.pm
  3. +7 −1 orepan.pl
View
@@ -3,6 +3,7 @@ use Module::Install::AuthorTests;
name 'OrePAN';
all_from 'orepan.pl';
+version_from 'lib/OrePAN.pm';
abstract 'yet another CPAN mirror aka DarkPAN repository manager';
license 'perl';
View
@@ -3,4 +3,5 @@ use strict;
use warnings;
use 5.008001;
# This is just a placeholder class.
+our $VERSION='0.06';
1;
View
@@ -4,6 +4,7 @@
use utf8;
use lib 'lib';
use 5.008001;
+use OrePAN;
use OrePAN::Package::Index;
use OrePAN::Archive;
@@ -18,15 +19,20 @@
use LWP::UserAgent;
use File::Temp;
-our $VERSION='0.06';
+our $VERSION=$OrePAN::VERSION;
my $pauseid = 'DUMMY';
GetOptions(
'p|pauseid=s' => sub { $pauseid = uc $_[1] },
'd|destination=s' => \my $destination,
'h|help' => \my $help,
+ 'v|version' => \my $version,
);
pod2usage(-verbose=>1) unless $destination;
+if ($version) {
+ print "$VERSION\n";
+ exit 0;
+}
my ($pkg) = @ARGV;
$pkg or pod2usage(-verbose=>1);

0 comments on commit 9dc65e7

Please sign in to comment.