X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=lib%2FFile%2FKDBX%2FUtil.pm;h=5645b4c4a4fa83e994427335ac850a92730ef8cc;hp=9c4e6f63cea884dcde6fd14e2e4a51c45fcdd51c;hb=63d73bf382edfb0089b36a45193fc2835cb58b6d;hpb=8ccefe1cedea9b0886a44ad096aa5710528eaac7 diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index 9c4e6f6..5645b4c 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; @@ -681,7 +685,7 @@ The logic can be specified in a manner similar to L for examples. +See L for examples. =cut @@ -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]; }