X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=lib%2FFile%2FKDBX%2FEntry.pm;h=c124b94203adf169a84aeec91374b2a6ad4e6324;hp=c4c67b7f73dc335d0449e15a667a332e4ea5f9f3;hb=81604125cc023132207802b4ae0ab4cea12c17fd;hpb=cfe6ddf632ec8f9ce9569fbf4c7e759160ba3419 diff --git a/lib/File/KDBX/Entry.pm b/lib/File/KDBX/Entry.pm index c4c67b7..c124b94 100644 --- a/lib/File/KDBX/Entry.pm +++ b/lib/File/KDBX/Entry.pm @@ -10,9 +10,10 @@ use Encode qw(encode); use File::KDBX::Constants qw(:history :icon); use File::KDBX::Error; use File::KDBX::Util qw(:function :uri generate_uuid load_optional); +use Hash::Util::FieldHash; use List::Util qw(sum0); -use Ref::Util qw(is_plain_hashref is_ref); -use Scalar::Util qw(looks_like_number refaddr); +use Ref::Util qw(is_plain_hashref); +use Scalar::Util qw(looks_like_number); use Storable qw(dclone); use Time::Piece; use boolean; @@ -169,7 +170,7 @@ sub uuid { for my $entry (@{$self->history}) { $entry->{uuid} = $uuid; } - # if (defined $old_uuid and my $kdbx = $KDBX{refaddr($self)}) { + # if (defined $old_uuid and my $kdbx = $KDBX{$self}) { # $kdbx->_update_entry_uuid($old_uuid, $uuid, $self); # } } @@ -363,7 +364,7 @@ sub _expand_placeholder { } return if !defined $File::KDBX::PLACEHOLDERS{$placeholder_key}; - my $local_key = join('/', refaddr($self), $placeholder_key); + my $local_key = join('/', Hash::Util::FieldHash::id($self), $placeholder_key); local $PLACEHOLDERS{$local_key} = my $handler = $PLACEHOLDERS{$local_key} // do { my $handler = $File::KDBX::PLACEHOLDERS{$placeholder_key} or next; memoize recurse_limit($handler, $PLACEHOLDER_MAX_DEPTH, sub {