Class::DBI lets you do a simple "eq" test for sameness of database objects.
It uses overload to return an encoded key value in a string context, so that $a eq $b works anywhere that primary keys have been declared and both are from the same table.
Update: This overloading leads to a trivial Schwartzian Transform: @t = map { [$_, "$_"] } @u, potentially making any sorting or duplicate checking lightening fast!!
In reply to Re^2: OO Identity Crisis
by snoopy
in thread OO Identity Crisis
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |