Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Why isn't it found in @INC ?

by matth (Monk)
on Dec 13, 2002 at 18:37 UTC ( #219681=perlquestion: print w/ replies, xml ) Need Help??
matth has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

Can anyone please explain this.

bash-2.05$ perl -I/home/redden/.cpan/build/XML-Clean-1.04 -e 'print jo +in"\n",@INC' /home/redden/.cpan/build/XML-Clean-1.04 /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl bash-2.05$ perl Can't locate XML/ in @INC (@INC contains: /usr/lib/perl5/5.6.1 +/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386- +linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at X line 3. BEGIN failed--compilation aborted at line 3. bash-2.05$

Title edit by tye

Comment on Why isn't it found in @INC ?
Download Code
Replies are listed 'Best First'.
Re: @INC
by Tanalis (Curate) on Dec 13, 2002 at 18:50 UTC
    You don't have the XML::Clean module installed on your system.

    The @INC array simply tells you where perl will look (or has tried to look) for modules it needs to execute a particular script.

    You can download and install the module here - everything should work as you expect once you've done that.
    Instructions to help you install modules are available on CPAN here.

    Hope that helps.
    -- Foxcub

    Update: Um, Perl is case-sensitive - CLean isn't the same as Clean. The error you're pasting shows CLean - if it's like that in your code, then you'll get the error you're seeing. Make sure you're spelling (including case) the module name correctly.

    -- Foxcub


      Time for me to go to the opticians.

•Re: @INC
by merlyn (Sage) on Dec 13, 2002 at 18:43 UTC
    Can't locate XML/ in @INC (@INC contains: /usr/lib/perl5/5.6.1 +/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386- +linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at X line 3. BEGIN failed--compilation aborted at line 3.
    Well, my guess is that the file doesn't exist in any of those directories, just like it said, and you didn't show anything to suggest it did.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

Re: @INC
by pfaut (Priest) on Dec 13, 2002 at 18:45 UTC

    Try perl -I/home/redden/.cpan/build/XML-Clean-1.04

      bash-2.05$ perl -I /home/redden/.cpan/build/XML-Clean-1.04/ XML_clean. +pl Can't locate XML/ in @INC (@INC contains: /home/redden/.cpan/b +uild/XML-Clean-1.04/ /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5 +.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_pe +rl/5.6.1 /usr/lib/perl5/site_perl .) at line 3. BEGIN failed--compilation aborted at line 3. bash-2.05$
Re: @INC
by Mr. Muskrat (Abbot) on Dec 13, 2002 at 18:44 UTC

    I could be wrong. I have been before. ;)
    However, this looks like you downloaded and extracted the files for XML::Clean but didn't install it!

      bash-2.05$ perl -e 'use ExtUtils::Installed; $inst = ExtUtils::Install +ed->new(); print join "\n", $inst->modules();' DBI DBIx::XML_RDB Parse::Yapp Perl XML-DOM XML::Catalog XML::Checker XML::Clean XML::DT XML::Dumper XML::Edifact XML::Generator XML::Grove XML::Handler::YAWriter XML::Node XML::Parser XML::QL XML::RSS XML::RegExp XML::Registry XML::Simple XML::Twig XML::Writer XML::XPath XML::XQL libxml-enno libxml-perlbash-2.05$

        If it's installed correctly then you don't need to include the directory where you extracted the files to...

        So, why did you include /home/redden/.cpan/build/XML-Clean-1.04 in the first place?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://219681]
Approved by Tanalis
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-10-09 13:32 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (242 votes), past polls