X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=lib%2FFile%2FKDBX%2FUtil.pm;h=d36bcda7cff81b7af0f41e34a030420c71183bf1;hp=9c4e6f63cea884dcde6fd14e2e4a51c45fcdd51c;hb=eefcd42a336641c8927b29d12c5c59443212468f;hpb=cec3705c27fbb9fd9bdfead7103480294b673ed1 diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index 9c4e6f6..d36bcda 100644 --- a/lib/File/KDBX/Util.pm +++ b/lib/File/KDBX/Util.pm @@ -231,6 +231,10 @@ sub clone_nomagic { return $thing; } +=func DEBUG + +Constant number indicating the level of debuggingness. + =func dumper $str = dumper $thing; @@ -901,7 +905,8 @@ sub to_number { $_[0] // return; 0+$_[0] } sub to_string { $_[0] // return; "$_[0]" } sub to_time { $_[0] // return; - return gmtime($_[0]) if looks_like_number($_[0]); + return scalar gmtime($_[0]) if looks_like_number($_[0]); + return scalar gmtime if $_[0] eq 'now'; return Time::Piece->strptime($_[0], '%Y-%m-%d %H:%M:%S') if !blessed $_[0]; return $_[0]; }