| Role::Commons::ObjectID(3pm) | User Contributed Perl Documentation | Role::Commons::ObjectID(3pm) |
Role::Commons::Authority - an object method providing a unique identifier
use v5.14;
package Person 1.0 {
use Moo;
use Role::Commons -all;
has name => (is => 'ro');
};
my $bob1 = Person->new(name => "Bob");
my $bob2 = Person->new(name => "Bob");
say $bob1->object_id; # an identifier
say $bob2->object_id; # a different identifier
This is a tiny shim between Object::ID and Role::Commons (and hence Moo::Role/Moose::Role too).
Please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=Role-Commons>.
Role::Commons, Object::ID.
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2012, 2014 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
| 2021-01-05 | perl v5.32.0 |