Permalink
Browse files

fixed JSON module import error handling

  • Loading branch information...
1 parent c04c5ed commit 3b713e70a936d39c9d10b248f8c1aac71767ae6f sshAdm.in committed Mar 20, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 snapback.pl
View
@@ -2,10 +2,10 @@
use strict ;
# use warnings ;
use Getopt::Long ;
-use Error qw(:try);
-try {
+eval {
use JSON ;
-} catch Error with {
+} ;
+if (@_) {
my $exception=shift;
print "Please install JSON module and make available to current user.\n";
exit 1;

0 comments on commit 3b713e7

Please sign in to comment.