Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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 XML_clean.pl Can't locate XML/CLean.pm 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 +ML_clean.pl line 3. BEGIN failed--compilation aborted at XML_clean.pl line 3. bash-2.05$

Title edit by tye

Comment on Why isn't it found in @INC ?
Download Code
•Re: @INC
by merlyn (Sage) on Dec 13, 2002 at 18:43 UTC
    Can't locate XML/CLean.pm 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 +ML_clean.pl line 3. BEGIN failed--compilation aborted at XML_clean.pl 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 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?

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

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

      bash-2.05$ perl -I /home/redden/.cpan/build/XML-Clean-1.04/ XML_clean. +pl Can't locate XML/CLean.pm 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 XML_clean.pl line 3. BEGIN failed--compilation aborted at XML_clean.pl line 3. bash-2.05$
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

      Thanks,

      Time for me to go to the opticians.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2015-07-04 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls