Commits

Toby Inkster committed ae2f55f

use Module::Info

  • Participants
  • Parent commits 1b0fde8

Comments (0)

Files changed (3)

File lib/P5U/Command/Reprove.pm

 argument is the version; and the third argument is the CPAN ID of the
 author. The presence of "::" is used to disambiguate between distribution
 and module names; in the case of something like "JSON" which is ambiguous,
-use a leading "::" to force it to be interpreted as a module name.
+use a trailing "::" to force it to be interpreted as a module name.
 
 When given a distribution name, the version is required. When given a
 module name, the version can usually be automatically detected. The author
 		
 		if ($a eq 'release' and $val =~ /::/)
 		{
-			$val =~ s{^::}{};
+			$val =~ s{::$}{};
 			$opt->{module} = $val;
 			next;
 		}

File lib/P5U/Lib/Reprove.pm

 use JSON qw/from_json/;
 use File::pushd qw/pushd/;
 use File::Temp qw//;
+use Module::Info qw//;
 use Path::Class qw//;
 use LWP::Simple qw/get/;
 use Module::Manifest qw//;
 	
 	if (defined $args{module} and not defined $args{version})
 	{
-		load_class($args{module});
-		$args{version} = $args{module}->VERSION;
+		$args{version} = Module::Info::->new_from_module($args{module})->version;
 	}
 	
 	if (defined $args{module} and not defined $args{author})

File meta/makefile.ttl

 	:requires           "File::Slurp";
 	:requires           "JSON 2.00";
 	:requires           "LWP::Simple";
+	:requires           "Module::Info";
 	:requires           "Module::Manifest";
 	:requires           "namespace::clean 0.19";
 	:requires           "Object::AUTHORITY";