Menu

Getting perl errors, any ideas?

Help
2008-07-16
2013-04-22
  • Steve Godfrey

    Steve Godfrey - 2008-07-16

    Hi there,

    I've run through the README and installed the two perl packages. When I run perlpod.pl I get this error

    steve@Kenny:~/perlpod$ ./perlpod.pl
      Using /home/steve/.feeds
      Checking for new edition of "this WEEK in TECH - MP3 Edition" ...
    Can't locate object method "items" via package "XML::RSS" at ./perlpod.pl line 165, <FEEDLIST> line 1.

    However XML::RSS is installed.

    cpan> install XML::RSS
    CPAN: Storable loaded ok
    Going to read /home/steve/.cpan/Metadata
      Database was generated on Wed, 16 Jul 2008 01:02:51 GMT
    XML::RSS is up to date.

    Any suggestons/ideas?

    Thanks

     
    • Anonymous

      Anonymous - 2008-07-17

      Hi Steve,

      That message doesn't ring any bells directly.

      What versions of Perl and XML:RSS are you using?

      What flavour and version of Linux are you using?

      Cheers

      Jonathan

       
      • Steve Godfrey

        Steve Godfrey - 2008-07-17

        I'm running Ubuntu Hardy 8.04. With all updates installed.

        How do I check which version of XML::RSS I'm running?

        This is perl, v5.8.8 built for i486-linux-gnu-thread-multi.

        Thanks

         
        • Anonymous

          Anonymous - 2008-07-17

          try:

          perl -MXML::RSS  -e 'print "XML::RSS version = $XML::RSS::VERSION\n"'

          Jonathan

           
          • Steve Godfrey

            Steve Godfrey - 2008-07-17

            Here you go!

            perl -MXML::RSS -e 'print "XML::RSS version = $XML::RSS::VERSION\n"'

             
    • Steve Godfrey

      Steve Godfrey - 2008-07-17

      Whoops posted the wrong output!

      steve@Kenny:~$ perl -MXML::RSS -e 'print "XML::RSS version = $XML::RSS::VERSION\n"'
      XML::RSS version = 1.33

       
      • Anonymous

        Anonymous - 2008-07-17

        OK, that all looks OK, I have experienced problems before of CPAN saying it has the upto date module but in fact it never cimpiled or installed OK.

        Are you sure XML::RSS is properly installed?  Can you get any other module to actually use any of its features?

        Do you have libexpat1-dev installed in Ubuntu?

        Try removing XML::RSS in CPAN and installing it again and watch the output carefully?

        Jonathan

        CPAN on Ubuntu ==============

        While trying to install various Perl modules I was getting errors like:
        "/usr/lib/perl/5.8/CORE/perl.h:420:24: error: sys/types.h: No such file or directory" and a load more complaints of missing ".h" files

        This is because Ubuntu isn't shipped for "Developers" but more for end users and so it isn't preinstalled with all sorts of development header files needed for compiling your own or others programs.

        So, as root, I ran:
        apt-get install libexpat1-dev

        And that solved the problems.

         
        • Steve Godfrey

          Steve Godfrey - 2008-07-17

          The first time I ran the XML::RSS  install it failed at the build stage. I quit from cpan then ran again as root, this time the install seemed to go ok.

          I don't know how to check whether it's installed correctly. So I thought I'd simply uninstall the module then re-install it. Problem is I can't find out how to uninstall it.

          libexpat1-dev is definately installed.

          steve@Kenny:~$ aptitude search libexpat1-dev
          i   libexpat1-dev                   - XML parsing C library - development kit  

           
          • Anonymous

            Anonymous - 2008-07-18

            Hi Steve,

            Here's a link which talks about uninstalling a Perl module:

            http://www.leap-cf.org/oldarchive/2004-August/039946.html

            You might want to use the manual method to reinstall it, you might get a clue as to whats going wrong.

            I've recently had a disk failure and don't have a good linux install to try this on but I'm setting up a VM with Ubuntu and will try an install like yours and see if I get the same problems.

            Jonathan

             
        • Anonymous

          Anonymous - 2008-07-20

          Hi Steve,

          You've found yourself a bug, I'm going to fix it in SVN and then issue a patched version, but if you can't wait for that then modify line 166:

            foreach my $item (@{$rss->items})

          to

            foreach my $item (@{$rss->{'items'}})

          and line 297:

            my ($tot)=scalar(@{$rss->items});

          to

            my ($tot)=scalar(@{$rss->{'items'}});

          That should do it.

          Apologies for the delay in spotting this but I've being having PC problems and I've debugged this on a Windows box, urrghh ;o)

          Jonathan

          p.s. Let me know how it goes.

           
          • Steve Godfrey

            Steve Godfrey - 2008-07-20

            Cool - I found a bug! I did open up perlpod.pl and went to that line but I don't know what I'm looking at! It's (sort of) obvious now you've pointed it out!

            When I'm back home I'll give it a try.

            Thanks

             
    • Anonymous

      Anonymous - 2008-07-20

      OK I've just released 1.2 which should fix this problem, I don't know how that crept in, and I've also added support for non IPOD players that are simply mounted in a directory!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.