DBIx::...I::GUID(3pm)

πŸ“¦
version 0.02006 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

DBIx::Class::UUIDColumns::UUIDMaker::Win32API::GUID β€” bestie, this is the lil UUID-maker that goes and gets your uuids from Win32API::GUID. It's a subclass of DBIx::Class::UUIDColumns::UUIDMaker, and it's the one you want when you're on Windows and you want your DBIx::Class rows to have real, honest-to-god GUIDs. It lives in the DBIx::...I::GUID man page (the docs had to trim the name for the header, the full thing is the one up top, iykyk). πŸ¦‹


✨ SYNOPSIS ✨

Okay so here's the whole vibe, like three lines and you're done:

package Artist;
__PACKAGE__->load_components(qw/UUIDColumns Core DB/);
__PACKAGE__->uuid_columns( 'artist_id' );
__PACKAGE__->uuid_class('::Win32API::GUID');

That's it. That's the whole setup. Load UUIDColumns (plus Core and DB, obviously, she needs them), tell her which column is the uuid one, and tell her which uuid class to use. Slay. πŸ’…


🌸 DESCRIPTION 🌸

This DBIx::Class::UUIDColumns::UUIDMaker subclass uses Win32API::GUID to generate uuid strings. And the format it spits out? Literally this:

098f2470-bae0-11cd-b579-08002b30bfeb

The classic hyphenated hex situation. Gorgeous. No notes. πŸ‘‘


πŸŽ€ METHODS πŸŽ€

πŸ’« as_string

Returns the new uuid as a string. That's the whole job. It gives you the string, you put it in your column, everybody's happy. 🫢


πŸ”₯ SEE ALSO πŸ”₯

  • Win32API::GUID β€” the actual Windows-side machinery doing the heavy lifting here, go say hi.

πŸ’œ AUTHOR πŸ’œ

Chris Laco <claco@chrislaco.com> β€” the icon who wrote this. πŸ‘‘


🌈 LICENSE 🌈

You may distribute this code under the same terms as Perl itself. So, same deal as Perl, no cap.


okay and real quick, the receipts at the bottom of the original page: this is perl v5.32.0, dated 2021-01-06, filed under DBIx::...I::GUID(3pm) in the User Contributed Perl Documentation. That's the whole thing bestie, go make some GUIDs πŸ’–βœ¨

πŸ“¦ where this page comes from