...eval block to catch this, but I was wondering if there was a better way.From the XML::Twig docs:
safe_parse ( SOURCE [, OPT => OPT_VALUE ...])
This method is similar to parse except that it wraps the parsing in an eval block. It returns the twig on success and 0 on failure (the twig object also contains the parsed twig). $@ contains the error message on failure.Note that the parsing still stops as soon as an error is detected, there is no way to keep going after an error.
“The sources of quotes found on the internet are not always reliable.” — Abraham Lincoln.3; cf.
In reply to Re^3: Capturing errors from 3-arg pipe open in ActivePerl 5.020
by NetWallah
in thread [SOLVED] Capturing errors from 3-arg pipe open in ActivePerl 5.020
by ateague
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |