in reply to Unable to install Data::Dumper module

Data::Dumper is a part of Perl and should come installed with your Perl installation already. If your distributor did exclude it, you have to find what package they put it in instead. You can check whether you have Data::Dumper installed by running the following command:

perl -MData::Dumper -e 'print "Data::Dumper is installed"'

The error message indicates that your C compiler is a different C compiler (version) than what was used to compile Perl with - this likely means that you will encounter more problems when you try to install Perl modules with a C (or "XS") component.

Replies are listed 'Best First'.
Re^2: Unable to install Data::Dumper module
by VGR (Acolyte) on Feb 16, 2010 at 10:41 UTC
    It says that it is installed but whenever i try using it in a perl script, this is what i get:
    administrator@varunraj ~/scripts $ perl ex1.pl Can't locate Data/Dupmer.pm in @INC (@INC contains: /usr/lib/perl5/5.1 +0/i686-cyg win /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr +/lib/perl5 /site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/p +erl5/vendo r_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5 +.8 /usr/li b/perl5/vendor_perl/5.8 .) at ex1.pl line 5. BEGIN failed--compilation aborted at ex1.pl line 5.
    It says it can't locate Dumper.pm
    This is the code i wrote:
    #!/usr/bin/perl #use strict; #use warnings; use XML::Simple; use Data::Dupmer; my $simple = XML::Simple->new(); my $struct = $simple->XMLin("./xml/exer1.xml", forcearray => 1, keepro +ot => 1); print Dumper($struct);

      You're trying to use Data::Dupmer, but the module name is Data::Dumper.

        i just hate typos
        i ran it again and this is what i got!
        $ perl ex1.pl could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.10/XM +L/SAX Document requires an element [Ln: 2, Col: 0]
        Im not sure why it's looking at SAX