Re: Making use of XML::Feed->parse() more robust

2019-08-29 Thread Andy Bach
> Is this something which should be handled differently in the module itself? Possibly. But what the author considers to be fatal is up to them so I wouldn’t say “should” but “could” ... that’s why Perl has eval ;-). You can go into the module code, find the “die” and change it “warn” maybe. It’d

Re: Making use of XML::Feed->parse() more robust

2019-08-29 Thread Lars Noodén
On 8/28/19 7:33 PM, Andy Bach wrote: > Look at eval blocks - lets you trap fatal errors from other code and not > die/abort yourself. > https://perldoc.perl.org/functions/eval.html Thanks. I went with an eval block since it was very quick to set up. > You can also wrie your own signal handling c

Re: Making use of XML::Feed->parse() more robust

2019-08-28 Thread Andy Bach
Look at eval blocks - lets you trap fatal errors from other code and not die/abort yourself. https://perldoc.perl.org/functions/eval.html You can also wrie your own signal handling code https://www.perl.com/article/37/2013/8/18/Catch-and-Handle-Signals-in-Perl/ On Wed, Aug 28, 2019 at 8:42 AM Lar

Making use of XML::Feed->parse() more robust

2019-08-28 Thread Lars Noodén
I've been using the CPAN module XML::Feed to parse Atom and RSS feeds. Some of the feeds it fetches are a little broken from time to time and when that happens the parser produces and error and stops the program. I'd like it to just keep going. I am invoking the parser inside a subroutine like th