Role::...bjectID(3pm)

πŸ“¦
version 0.104 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

✨ Role::Commons::Authority β€” from the Role::...bjectID(3pm) era of the perl docs πŸ’–

okay bestie, buckle up, this page is tiny but it's iconic 🌸


πŸ’« NAME

Role::Commons::Authority β€” it's literally just an object method that hands you a unique identifier. that's it. that's the whole job. no cap. πŸ‘‘


πŸŽ€ SYNOPSIS

here's the vibe, copied exactly because we do not touch the code:

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

see how both Bobs are named "Bob" but the identifiers are different? that's the whole point, bestie. two identical-looking objects, two totally distinct IDs. the way that works is giving main character energy fr fr πŸ’…


πŸ¦‹ DESCRIPTION

so this is a tiny shim between Object::ID and Role::Commons β€” and since Role::Commons is the parent vibe, that means it shims into Moo::Role / Moose::Role too 🫢

tiny. small. humble. does one thing and does it slay ✨


😭 BUGS

found a bug? not you being the main character of quality assurance πŸ’€ please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=Role-Commons>.


🌈 SEE ALSO

  • Role::Commons
  • Object::ID

the whole fam πŸŽ€


πŸ’œ AUTHOR

Toby Inkster <tobyink@cpan.org>. legend behavior, honestly πŸ‘‘


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. so go off, redistribute responsibly πŸ’–


🧚 DISCLAIMER OF WARRANTIES

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.

translation: no promises, no take-backs, no warranty bestie πŸ™ˆ it's giving "you get what you get" and honestly? respect.


and that's a wrap on Role::...bjectID(3pm), brought to you by perl v5.32.0, dated 2021-01-05 πŸ’… mwah, go write some objects with unique IDs, periodt ✨

πŸ“¦ where this page comes from