CPAN sees XML::Parser, require does not
CPAN sees XML::Parser, require does not
am 19.09.2006 22:18:31 von strombrg
What might cause a scenario where CPAN thinks you have a module but
require thinks you don't?
Thanks!
root@strombrg-desktop:~/src/jpilot/0.99.9# perl
-MCPAN -e 'install XML::Parser::Expat' CPAN: Storable loaded ok Going to
read /big/strombrg/.cpan/Metadata
Database was generated on Mon, 18 Sep 2006 06:29:55 GMT
XML::Parser::Expat is up to date.
root@strombrg-desktop:~/src/jpilot/0.99.9# perl -MCPAN -e 'install
XML::Parser' CPAN: Storable loaded ok Going to read
/big/strombrg/.cpan/Metadata
Database was generated on Mon, 18 Sep 2006 06:29:55 GMT
XML::Parser is up to date.
root@strombrg-desktop:~/src/jpilot/0.99.9# perl -MCPAN -e 'require
XML::Parser' Can't locate loadable object for module XML::Parser::Expat in
@INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.7
/usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at
/usr/local/lib/perl/5.8.7/XML/Parser.pm line 14 Compilation failed in
require at /usr/local/lib/perl/5.8.7/XML/Parser.pm line 14. BEGIN
failed--compilation aborted at /usr/local/lib/perl/5.8.7/XML/Parser.pm
line 18. Compilation failed in require at -e line 1.
root@strombrg-desktop:~/src/jpilot/0.99.9#
Re: CPAN sees XML::Parser, require does not
am 19.09.2006 22:40:59 von unknown
strombrg wrote:
> What might cause a scenario where CPAN thinks you have a module but
> require thinks you don't?
>
> Thanks!
>
> root@strombrg-desktop:~/src/jpilot/0.99.9# perl
> -MCPAN -e 'install XML::Parser::Expat' CPAN: Storable loaded ok Going to
> read /big/strombrg/.cpan/Metadata
> Database was generated on Mon, 18 Sep 2006 06:29:55 GMT
> XML::Parser::Expat is up to date.
> root@strombrg-desktop:~/src/jpilot/0.99.9# perl -MCPAN -e 'install
> XML::Parser' CPAN: Storable loaded ok Going to read
> /big/strombrg/.cpan/Metadata
> Database was generated on Mon, 18 Sep 2006 06:29:55 GMT
> XML::Parser is up to date.
> root@strombrg-desktop:~/src/jpilot/0.99.9# perl -MCPAN -e 'require
> XML::Parser' Can't locate loadable object for module XML::Parser::Expat in
> @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.7
> /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5
> /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at
> /usr/local/lib/perl/5.8.7/XML/Parser.pm line 14 Compilation failed in
> require at /usr/local/lib/perl/5.8.7/XML/Parser.pm line 14. BEGIN
> failed--compilation aborted at /usr/local/lib/perl/5.8.7/XML/Parser.pm
> line 18. Compilation failed in require at -e line 1.
> root@strombrg-desktop:~/src/jpilot/0.99.9#
>
>
Sounds like a bad install of XML::Parser::Expat to me, or at least one
that can't find the expat library.
See 'perldoc perldiag' for your exact message. If Perl couldn't find
XML/Parser/Expat.pm at all, you'd get a different message than the one
you're seeing. Compare and contrast your message to the one you get from
$ perl -e 'require Foo::Bar'
Tom Wyant
Re: CPAN sees XML::Parser, require does not
am 20.09.2006 00:59:39 von strombrg
On Tue, 19 Sep 2006 16:40:59 -0400, harryfmudd [AT] comcast [DOT] net
wrote:
> strombrg wrote:
>> What might cause a scenario where CPAN thinks you have a module but
>> require thinks you don't?
>>
>> Thanks!
>>
>> root@strombrg-desktop:~/src/jpilot/0.99.9# perl
>> -MCPAN -e 'install XML::Parser::Expat' CPAN: Storable loaded ok Going to
>> read /big/strombrg/.cpan/Metadata
>> Database was generated on Mon, 18 Sep 2006 06:29:55 GMT
>> XML::Parser::Expat is up to date.
>> root@strombrg-desktop:~/src/jpilot/0.99.9# perl -MCPAN -e 'install
>> XML::Parser' CPAN: Storable loaded ok Going to read
>> /big/strombrg/.cpan/Metadata
>> Database was generated on Mon, 18 Sep 2006 06:29:55 GMT
>> XML::Parser is up to date.
>> root@strombrg-desktop:~/src/jpilot/0.99.9# perl -MCPAN -e 'require
>> XML::Parser' Can't locate loadable object for module XML::Parser::Expat in
>> @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.7
>> /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5
>> /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at
>> /usr/local/lib/perl/5.8.7/XML/Parser.pm line 14 Compilation failed in
>> require at /usr/local/lib/perl/5.8.7/XML/Parser.pm line 14. BEGIN
>> failed--compilation aborted at /usr/local/lib/perl/5.8.7/XML/Parser.pm
>> line 18. Compilation failed in require at -e line 1.
>> root@strombrg-desktop:~/src/jpilot/0.99.9#
>>
>>
>
> Sounds like a bad install of XML::Parser::Expat to me, or at least one
> that can't find the expat library.
>
> See 'perldoc perldiag' for your exact message. If Perl couldn't find
> XML/Parser/Expat.pm at all, you'd get a different message than the one
> you're seeing. Compare and contrast your message to the one you get from
>
> $ perl -e 'require Foo::Bar'
>
> Tom Wyant
perl newbie that I am, my first thought in response to what you've
written was to remove XML::Parser (and XML::Parser::Expat if it doesn't
go with XML::Parser), but the program at
http://www.cpan.org/misc/cpan-faq.html#How_delete_Perl_modul es believes
that XML::Parser and XML::Parser::Expat aren't installed, much like
require.
Is there a CPAN command to blow away a module, since it seems to believe
these modules exist?
Can I "just" remove the relevant files under /usr/local/lib/perl? I can
get a list of likely suspects from strace, but does anyone know for sure
what would need to be removed to delete a typical perl module via rm?
Thanks!
Re: CPAN sees XML::Parser, require does not
am 20.09.2006 09:03:06 von Sisyphus
"strombrg" wrote in message
..
..
>
> Is there a CPAN command to blow away a module, since it seems to believe
> these modules exist?
There might be ... I don't use CPAN.pm, so I don't really know.
>
> Can I "just" remove the relevant files under /usr/local/lib/perl?
Not generally recommended, but I think that should be ok in your case.
Removing /usr/local/lib/perl/5.8.7/XML/Parser.pm should be enough to
convince CPAN.pm that you don't have XML::Parser installed. Then it should
fetch, build and install XML::Parser for you (overwriting any other remnants
of the bad XML::Parser installation in the process).
Note that you'll need expat installed to build XML::Parser -
http://sourceforge.net/projects/expat/ .
Cheers,
Rob
Re: CPAN sees XML::Parser, require does not
am 20.09.2006 14:30:27 von unknown
Sisyphus wrote:
>
> Note that you'll need expat installed to build XML::Parser -
> http://sourceforge.net/projects/expat/ .
>
> Cheers,
> Rob
>
>
Which may be the original problem.
You can use "force" in front of a CPAN command to make it do something
it does not want to do, e.g.
cpan> force install XML::Parser
This overrides everything: the up-to-date-module check, test failures,
dependency failures, pretty much everything.
But you might want to try not using CPAN. The incantation is:
download.
$ tar -xzf distribution.tar.gz
$ cd distribution
$ # read README, and Makefile.PL
$ perl Makefile.PL
$ make
$ make test
$ sudo make install
Tom Wyant