in reply to New module - Test::FileReferenced - please review
I'd also check if you have read permissions and wrap the call to the serializer in an eval so you can catch any error in the serializer.sub _load_reference_if_you_need { # {{{ if ($reference) { # Reference already loaded or initialized. return $reference; } # Is there a reference file? if (not -f $default_reference_filename) { # Nope. Warn the User, but don't make a tragedy of it. diag("No reference file found. All calls to is_referenced_ok W +ILL fail."); return $reference = {}; } return $reference = $serializer_load->($default_reference_filename +); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: New module - Test::FileReferenced - please review
by Natanael (Acolyte) on May 29, 2010 at 22:07 UTC |