It looks like the builtin try is getting depreciated, so I'm not keen on using it long term. Having said that, swapping in use experimental 'try'; works (for most feeds; see above). Swapping in Try::Tiny gives me this new error:

syntax error at /home/ross/scripts/podcasts/podcasts.pl line 233, near + ") {" Execution of /home/ross/scripts/podcasts/podcasts.pl aborted due to co +mpilation errors.

This is the section it's complaining about:

try { $curl->pushopt(CURLOPT_HTTPHEADER, [$ua_string]); $curl->setopt(CURLOPT_PROGRESSFUNCTION, \&no_progress); $curl->setopt(CURLOPT_NOPROGRESS, 0); $curl->setopt(CURLOPT_FOLLOWLOCATION, 1); $curl->setopt(CURLOPT_CONNECT_ONLY, 0); $curl->setopt(CURLOPT_URL, $feedsrc); $curl->setopt(CURLOPT_WRITEDATA, \$feed); $curl->perform(); } catch { $broken = 1; #putting next in here complains that it's exi +ting a subroutine } if (!defined($feed)) { # <--- Line 233 $broken = 2; }

I can't see an error there, and it doesn't throw one without Try::Tiny, so that seems pretty weird.

EDIT

OK, I figured that out. The Try::Tiny try/catch blocks need a closing semicolon. So now I have a robust try that won't go away in future versions of perl, and isn't somehow messing up all the feeds, but some are still getting messed up in ways I don't understand.


In reply to Re^3: RSS Parsing not working on new machine by wintermute115
in thread RSS Parsing not working on new machine by wintermute115

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.