removed compile-time dep on a valid $dbh from C4::Dates
authorGalen Charlton <galen.charlton@liblime.com>
Wed, 5 Mar 2008 00:26:01 +0000 (18:26 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 5 Mar 2008 04:25:04 +0000 (22:25 -0600)
commit34ce43c8ba354fb0e17a2dfbc9bdfac770c4cff1
tree8389f988a08263c4467c6770f03e4732cf4ebaa7
parent2a1da8da1afbf44a5e972f70966555dc2b63baf7
removed compile-time dep on a valid $dbh from C4::Dates

This replaces using the package variable $prefformat directly, and
specifically, doing a call to C4::Context->preference() during
module initialization.  That way, C4::Dates no longer has a
compile-time dependency on having a valid $dbh.

The inspiration for this is making it easier for
zebraqueue_daemon to have code that detects when
the database connection goes down and then try to
reconnect to the DB.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Dates.pm