autarch/Log-Dispatch — pull request #2 by thaljef (2012-11-21 07:29:57+00:00)
Title: Avoid warning about closing unopened filehandle during destruction

If the filehandle isn't open, then closing it throws a warning. This could happen if the application blows up before the logging ever starts. So to avoid the warning, we check if the filehandle is open before trying to close. Scalar::Util::openhandle seems to be best way to do this. Using tell() throws the same warning, and fileno() doesn't always give the right answer.