Created
April 11, 2017 08:36
-
-
Save Abhinickz/78920f9511b7be67cf3442161bb692b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; use warnings; | |
my $data = [ 1, 2, 3, 4 ]; | |
eval { | |
require Data::Dumper; | |
Data::Dumper->import(); | |
print Dumper($data); | |
1; | |
} or do { | |
my $error = $@; | |
# Module load failed. You could recover, try loading | |
# an alternate module, die with $error... | |
# whatever's appropriate | |
print "Module Data::Dumper not found See the below error about module\n##########\n$error\n##########\nStill continuing with the program\n"; | |
}; | |
print "\nRunning other things without Data::Dumper!\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment