My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping


Tuesday, March 27, 2012

Can't locate XML/ @INC( @INC in Perl linux

Sometimes you Perl code starts acting weird. You get error as "Can't locate XML/ @INC( @IN" . This basically occurs due to a very simple reason: file missing in Perl linux
For example you can see the snapshot of an error message that I got:

How to solve Can't locate XML/ @INC( @INC problem in Perl Linux
How to resolve XML/ or Install
simple method to install XML::Simple is as follows:

perl -MCPAN -e 'install "XML::Simple"'

There is yet another test that you may do before installing. This is to check if XML::Simple is installed. For this try:

perl -e 'use XML::Simple;'

There is yet another method that I personally like because of less complexity involved. And as I can see, this is even faster:

cpan install XML::Simple

I would like to convey to my readers here some bits over the CPAN. This is collected from Internet and following has no intellectual claims by me :)

CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the module. If you want to use, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.

The same can be seen in following picture:

If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)

And doing this solves the problem!!