Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616755]
[LanX]: Socrates was a Troll
[Your Mother]: It's very, very dangerous... Thinking that a group is intrinsically evil... buries the fact that all humans can be so deep that it starts to become likely they will be.
[Your Mother]: LanX++
[Corion]: (also the "troll for trolls sake" could seen be much like the "punk for punks beer")
[Your Mother]: I'm completely (historically anyway) a troll in real life. It's not fun online, you can't really win. :P
Happy-the-monk orders a Punk IPA.
[Your Mother]: Also, I'm too old to start fights with strangers anymore.
[LanX]: concentrating on omestic violence?
[LanX]: d
[Your Mother]: Open air violence. Or on campus.

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (22)
As of 2018-03-19 13:47 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.