And moving further on, Example 3 starts talking about "warnings", and
follows up with "strict_off". This confused me, as I tried to associate
their meaning with what I know about Perl's own warning and strict pragma's:

 * warnings are shown, but processing attempts to continue.
 * when strict is on, really naughty errors stop processing.

The behavior of MARC::Record seems different, as warnings stops processing
of an entire file, not just the record within the file that had problems.
Using the distributed 't/camel.usmarc', I introduced a critical error by
replacing the first "10" tag with "a0", an obvious problem. What I expected
was a warning to be shown, that specific record ignored, and continued
processing of all the other records within the MARC file, which would place
it more in line with what Perl's "use warnings" attempts: continue on at
all costs.

Instead, that single warning in the first MARC record (of ten or so)
stops processing for the entire file, not just that record:

 Invalid indicators "a0" forced to blanks in record 1 for tag 245

and nothing else was printed. I expected titles for the other 9 or so.

This "stop at first warning" also seems to defeat the purpose of returning
an array of @warnings, since @warnings will always be one: the first
warning that stopped processing of the file. Granted, the array becomes
important when strict is turned off and warnings are aggregated over time.

Nutshell: the implied "strict" doesn't make a
"warning" a warning: it makes it an error that
stops the entire batch, not just the record.

-- 
Morbus Iff ( rotinom ruoy edisni deppart mi pleH )
Technical: http://www.oreillynet.com/pub/au/779
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Reply via email to