Merge pull request #4 from tadl/master

Omnibus pull request of TADL changes

Per request of Dan Wells, this omnibus pull request incorporates all of the changes which TADL has made to iNCIPit over the course of our go-live and first few months with MeLCat.

I have not summarized the changes here. Please see the individual commit messages for more details.

Thanks for reviewing and testing, Dan!

EDIT:
Please note that the config file added in this merge is not guaranteed to be stable, and is very likely to have minor changes in the near future. -Dan W.
Added extra header info to use for processing xml and added support for different ini/configuration files based on hostname
added contact info and copyleft
Load config automatically based on matching request hostname
Add configuration file instructions
Add markdown extension to README
Merge pull request #8 from mark-cooper/load_config_hostname_match

Load config automatically based on matching request hostname
Expand patron identifier config options

Remove the patron_id_as_identifier yes/no configuration option and
replace it with "patron_identifier" which accepts the following:

* barcode - patron barcode (the default)
* id - patron database id

In the near future, we expect to have an additional option:

* ident - patron's ident value

This future third option will require additional work for retrieving
patrons via their ident value, etc.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Merge pull request #5 from tadl/patron_identifier_config_changes

Expand patron identifier config options
Add handling / mitigation for invalid XML

Wrap XML parsing attempts in an eval block to avoid having the CGI
generate an Internal Server Error.

Add support for removing raw Control-D characters, which we have
experienced in the wild when working with INN-REACH.

Generate warnings and attempt to gracefully fail with a log entry
and the "do not hang INN-REACH" message approach used in fail().

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Make invalid XML handling more robust, verbose

Differentiate between LibXML and non-LibXML errors when parsing
incoming NCIP messages.

Log the actual error encountered, and log what steps we take (if
any) to mitigate.

Also, remove an invalid use of == introduced in the previous commit.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add 'use XML::LibXML::ErrNo'

We are referencing a constant defined in XML::LibXML::ErrNo, so
let's ensure that we use that module.

Signed-off-by: Jeff Godin <jgodin@tadl.org>