UNIVERSAL::Object::ID - Supply a unique object identifier to every object
use DateTime; # for example use UNIVERSAL::Object::ID; my $date = DateTime->now; print $date->object_id;
Loading UNIVERSAL::Object::ID makes the Object::ID role available to every object.
Object::ID
Use at your own risk, polluting UNIVERSAL is not to be taken lightly. The best place to use this module is in your own personal or internal use code rather than a widely distributed software library. Or you can use Method::Lexical to safely apply the UNIVERSAL effect to just your lexical scope.
Object::ID, Method::Lexical
To install Object::ID, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::ID
CPAN shell
perl -MCPAN -e shell install Object::ID
For more information on module installation, please visit the detailed CPAN module installation guide.