Combining Syslog and DBI

Saw an interesting interaction today. The Sys::Syslog module makes use of fork to prevent a blocking write to the console. Unfortunately, this means that if you are connected to a database via DBI and try to log anything via syslog, you'll run the issue of the DBI handle being closed under you. Even the DBI property of InactiveDestroy cannot save you b/c of the fork being hidden in Sys::Syslog. Thanks to David E Wheeler for the DBI AutoInactiveDestroy attribute which saves the day!

Leave a comment

About David Dick

user-pic I'm based out of Melbourne, Australia. I attend the excellent melbourne.pm.org meetings whenever i get the chance, which is not often enough.