philgyford has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I have a script like this:
#!/usr/bin/perl -w use strict; use XML::Feed; my $feed = XML::Feed->parse(URI->new( 'http://test.org.uk/feed/' )) or print XML::Feed->errstr . "\n";
That generates "Not Found", although the feed at http://test.org.uk/feed/ does exist.

I thought this might be some problem with the WordPress.com site at test.org.uk but trying the same script with another site hosted at WordPress.com, eg http://robsword.net/feed/, works fine.

So I'm puzzled as to why XML::Feed can't find a feed that exists. Any ideas...? Thanks, Phil

Replies are listed 'Best First'.
Re: XML::Feed saying a feed is "Not Found" when it exists
by psini (Deacon) on Sep 22, 2008 at 17:42 UTC

    I tried your code and it works on my box (Debian Linux Etch).

    Have you verified if you can reach that URL from the same machine? If not it could be a proxy or routing problem.

    If you can reach it, you could give us more info on the machine on which you have the problem (OS, perl version, and so on)

    Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

      Huh, you're right -- I tried from another machine and it works fine.

      Looks like that particular machine is having problems with that domain and the WordPress domain it's mapped to (mattlocke.wordpress.com) -- accessing either through Lynx it just gets stuck in some kind of loop.

      As it's not a Perl issue I'll bug the admin of that box.

      Thanks for your help!