summaryrefslogtreecommitdiffstats
path: root/perlmodver
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-05-21 15:01:47 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-05-21 15:01:47 +0200
commit960a895cb9286bf225fa66fa41c79bef0acb350e (patch)
treef54125818e1efa3fb30c40226030bf53bd4babe9 /perlmodver
parent30677ea550b8b7618856edb715ec5f312a6b9fdb (diff)
downloadbin-960a895cb9286bf225fa66fa41c79bef0acb350e.tar.gz
bin-960a895cb9286bf225fa66fa41c79bef0acb350e.tar.xz
perlmodver: display message if module can't be found
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'perlmodver')
-rwxr-xr-xperlmodver7
1 files changed, 4 insertions, 3 deletions
diff --git a/perlmodver b/perlmodver
index 298079f..87891e6 100755
--- a/perlmodver
+++ b/perlmodver
@@ -1,6 +1,7 @@
#!/usr/bin/perl
use strict;
-foreach my $module ( @ARGV ) {
+foreach my $module (@ARGV) {
eval "require $module";
- printf( "%-20s: %s\n", $module, $module->VERSION ) unless ( $@ );
-} \ No newline at end of file
+ printf("Can't find %s\n", $module) if $@;
+ printf("%-20s: %s\n", $module, $module->VERSION) unless $@;
+}