Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to make a fingerprint from an Object

by valdez (Monsignor)
on May 22, 2007 at 12:52 UTC ( #616755=note: print w/replies, xml ) Need Help??


in reply to How to make a fingerprint from an Object

I would use Data::UUID to generate a universal unique identifier during object creation; you would store that object identifier and use it later for comparison; in fact there is no reason to compute object fingerprint later.

package Class; use strict; use warnings; use Data::UUID; sub new { my $class = shift; my $uuid = Data::UUID->new; return bless { some => 'data', object_signature => $uuid->create_str(), }, $class; } sub object_signature { shift->{object_signature}; } 1;

HTH, Valerio

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616755]
help
Chatterbox?
[Tanktalus]: 11.31 is already 10 years old... you still need to support versions older than that? My condolences :)
[Eily]: meh, got confused. s/(?=\bis\b)/h/ will work better :)
[Eily]: \K keeps the thing on the left, not the right (IE, it's like look behind, not look ahead)
[Tux]: and 11.31 is still the last stable. We're moving all our customers to Linux (openSUSE and CentOS), but that takes a loooooooooooooooon g time
[LanX]: ehm ... I woke up my *boobs* ?
LanX where is the camera?
Tux => $HOME
[Eily]: you wrote boos instead of boss, and jedikaiti read that as boobs :)
[LanX]: Win claims only 8 MB left on C: how do I find out where the problem happens?
[Eily]: by Tux. And going home sounds like a good idea

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-09-20 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (237 votes). Check out past polls.

    Notices?