diff options
author | Graham Knop <haarg@haarg.org> | 2013-06-20 03:14:28 -0400 |
---|---|---|
committer | Karen Etheridge <ether@cpan.org> | 2013-06-21 21:26:58 -0700 |
commit | 964ad25dbd2c5e95d8ccc58616b8db25b4d52fa6 (patch) | |
tree | a2d07007ec459c844b0df5bedab4acf258399b73 | |
parent | 70a520fa77671dd3ef1cdd51b21044b65a446d22 (diff) | |
download | dist-checkconflicts-964ad25dbd2c5e95d8ccc58616b8db25b4d52fa6.tar.gz dist-checkconflicts-964ad25dbd2c5e95d8ccc58616b8db25b4d52fa6.zip |
use Module::Runtime instead of Class::Load
-rw-r--r-- | lib/Dist/CheckConflicts.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Dist/CheckConflicts.pm b/lib/Dist/CheckConflicts.pm index 393e586..8779e4e 100644 --- a/lib/Dist/CheckConflicts.pm +++ b/lib/Dist/CheckConflicts.pm @@ -11,8 +11,7 @@ our @EXPORT = our @EXPORT_OK = ( use Carp; use List::MoreUtils 0.12 'first_index'; -use Class::Load 'try_load_class'; -use Module::Runtime 'module_notional_filename'; +use Module::Runtime 'module_notional_filename', 'require_module'; =head1 SYNOPSIS @@ -271,7 +270,8 @@ sub calculate_conflicts { CONFLICT: for my $conflict (keys %conflicts) { - my ($success, $error) = try_load_class($conflict); + my $success = eval { require_module($conflict) }; + my $error = $@; my $file = module_notional_filename($conflict); next if not $success and $error =~ /Can't locate \Q$file\E in \@INC/; |