0

I am new to Perl. I have a Perl script which uses the Data::Dumper module. But on some systems the module isn't installed. So I need to check whether Data::Dumper is installed or not. How can I do that?

Borodin
  • 123,915
  • 9
  • 66
  • 138
avishkar
  • 19
  • 2
  • [How can I check if I have a Perl module before using it?](http://stackoverflow.com/questions/251694/how-can-i-check-if-i-have-a-perl-module-before-using-it) – Robert Harvey Apr 30 '15 at 15:42
  • 1
    This was hastily classified as a duplicate. The link has a case of somebody wanting to *conditionally* include a module, where this one could be about the frequent command line I use to do the same thing: `perl -MData::Dumper -e 1` It seems a waste to write evals if you can check it from a simple command line. – Axeman Apr 30 '15 at 17:18
  • 1
    `Data::Dumper` is a core perl module. It will be part of any perl installation: $ corelist Data::Dumper Data for 2015-02-14 Data::Dumper was first released with perl 5.005 You can't not have it. :) – LeoNerd Apr 30 '15 at 18:44

0 Answers0