use Carp;
use base 'Exporter';
-use version; our $VERSION = qv('1.0.0');
our @EXPORT = (
qw( dt_from_string output_pref format_sqldatetime )
and return
if $dt and $str;
- $dt = eval { dt_from_string( $str ) } if $str;
- carp "Invalid date '$str' passed to output_pref\n" if $@;
+ if ( $str ) {
+ local $@;
+ $dt = eval { dt_from_string( $str ) };
+ carp "Invalid date '$str' passed to output_pref\n" if $@;
+ }
return unless defined $dt;