aboutsummaryrefslogtreecommitdiffstats
path: root/cpan2tgz
diff options
context:
space:
mode:
authorJason Woodward2004-11-16 13:14:58 +0000
committerJason Woodward2004-11-16 13:14:58 +0000
commit595c8d0bbe253197b72f5f958ce957741ac7278a (patch)
tree7ef92d3421d4625465776c3f15780698301d1e5e /cpan2tgz
parenta7f2803887805320d9296bf7ff5fe8e5ac580e36 (diff)
downloadcpan2tgz-595c8d0bbe253197b72f5f958ce957741ac7278a.tar.gz
print proper error when module couldn't be found
Diffstat (limited to 'cpan2tgz')
-rwxr-xr-xcpan2tgz5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpan2tgz b/cpan2tgz
index 12e9941..1dfeea7 100755
--- a/cpan2tgz
+++ b/cpan2tgz
@@ -46,7 +46,10 @@ sub do_package {
my ($module_name) = @_;
return unless $module_name;
my $module = CPAN::Shell->expand('Module',$module_name);
- die "Failed to find $module_name: $!" unless $module;
+ unless($module){
+ print STDERR "\nFailed to find module: $module_name","\n";
+ exit(1);
+ }
$PACKAGE_CACHE_LIST{$module->id()} = 1;