From: Charles McGarvey Date: Sun, 24 Apr 2022 20:07:06 +0000 (-0600) Subject: improve dumping Time::Piece objects X-Git-Tag: v0.800~17 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=4919a87027c9f0501a636fbea0cbd2a6510afb38;p=chaz%2Fp5-File-KDBX improve dumping Time::Piece objects --- diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index 9fe9a9e..3141c3f 100644 --- a/lib/File/KDBX/Util.pm +++ b/lib/File/KDBX/Util.pm @@ -223,7 +223,8 @@ sub dumper { # boolean $str =~ s/bless\( do\{\\\(my \$o = ([01])\)\}, 'boolean' \)/boolean($1)/gs; # Time::Piece - $str =~ s/bless\([^\)]+?(\d+)'?,\s+\d+,?\s+\], 'Time::Piece' \)/Time::Piece->new($1)/gs; + $str =~ s/bless\([^\)]+?(\d+)'?,\s+\d+,?\s+\], 'Time::Piece' \),/ + "scalar gmtime($1), # " . scalar gmtime($1)->datetime/ges; print STDERR $str if !defined wantarray; push @dumps, $str;