Announcement

Collapse
No announcement yet.

[Resolved]Perl Module (XML::Xpath)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Resolved]Perl Module (XML::Xpath)

    Hi
    I'm using Kubuntu Edgy and trying to install some perl module named XML::Xpath.
    I used it before and i love it.
    But it seems I have some trouble running it on Kubuntu.
    I installed it via apt, via cpan, and even manually and I always get :
    Code:
    yuuki@yuuki:~/bao$ perl script.pl
    Can't locate XML/Xpath.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at script.pl line 2.
    BEGIN failed--compilation aborted at script.pl line 2.
    Line 1 is the usually "!#whereIsPerl" line
    Line 2 is the "use XML::Xpath;" line

    This script works fine on other linux system.
    I checked the path in the error, and the module is there.

    Code:
    yuuki@yuuki:/usr/share/perl5/XML$ ls -l
    total 24
    drwxr-xr-x 3 root root 4096 2007-03-18 03:27 XPath
    -rw-r--r-- 1 root root 17113 2003-01-26 20:33 XPath.pm
    yuuki@yuuki:/usr/share/perl5/XML$
    I dont know why its not working... I tried running the thing with su, changed mod with some devils number... always the same error.

    Any Idea?

    #2
    Re: Perl Module (XML::Xpath)

    Maybe you should add /usr/share/perl5/XML to the contents of @INC ... :P

    Comment


      #3
      Re: Perl Module (XML::Xpath)

      still not working.

      Its looking for XML/Xpath.pm in the path defined in @INC. As you can see, the /usr/share/perl5 is in it,
      and /usr/share/perl5/XML/Xpath.pm is installed.

      I tried to add use lib qw(/usr/share/perl5/XML/Xpath.pm); in my script.
      It works but then, i have another error:

      Code:
      yuuki@yuuki:~/bao$ perl script.pl 19-00-00
      Can't locate object method "new" via package "XML::XPath" (perhaps you forgot to load "XML::XPath"?) at script.pl line 28.
      yuuki@yuuki:~/bao$
      This is a XML::Xpath fonction and it acts like i didnt include it


      Tried to use another perl module like XML:OM and it work fine. DOM and Xpath are both in the right folder, with the same rights. I really don't understand why perl cant locate Xpath...

      Comment


        #4
        Re: Perl Module (XML::Xpath)

        May sound silly, but if Python were case-sensitive, referring to "XPath" and "Xpath" alternately, would make me think of a typo ... (?)

        Comment


          #5
          Re: Perl Module (XML::Xpath)

          sorry i already resolved the problem
          and yes, in fact I used older version of Xpath.
          the new one is XPath with maj P....

          Hate those little stupid errors that drive you crazy
          thx for the help

          Comment

          Working...
          X