DBIx::...I::GUID(3pm)
π 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
- debian bookworm: libdbix-class-uuidcolumns-perl 0.02006-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdbix-class-uuidcolumns-perl 0.02006-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdbix-class-uuidcolumns-perl 0.02006-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdbix-class-uuidcolumns-perl 0.02006-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms