Uniqid(3)

πŸ¦‹ Data::Uniqid β€” the Uniqid(3) page, but make it make sense

okay so bestie, this is a Perl manual page from the User Contributed Perl Documentation section, and it's genuinely so simple it's giving comfort food. it's Data::Uniqid, and it's literally just three little routines that hand you unique ids. that's the whole thing. no cap. πŸ’…


✨ NAME ✨

Data::Uniqid β€” a Perl extension for simple generating of unique id's. yeah, that's the official description and we're keeping it, apostrophe and all 🫢


🌸 SYNOPSIS 🌸

here's how you actually pull it into your code β€” you import the three functions by name with qw:

use Data::Uniqid qw ( suniqid uniqid luniqid );

$id = suniqid;
$id = uniqid;
$id = luniqid;

that's it. three calls, three ids, zero drama ✨


πŸ’– DESCRIPTION πŸ’–

okay so the whole package is this: Data::Uniqid provides three simple routines for generating unique ids.

and the cute part? these ids are coded with a Base62 system so they come out short and handy β€” like, actually usable as part of a URL, which is the entire vibe here. no gross hex blobs, just tidy little strings. obsessed πŸŽ€

here's the lineup, one by one:

πŸ’« suniqid

generates a very short id. the catch: it's only valid for the localhost, and it's got a lifetime of 1 day. so it's the short-lived local legend of the family. use it, love it, let it expire 😭

⭐ uniqid

generates a short id, valid on the local host. your everyday main character routine.

πŸ‘‘

🌈 luniqid

generates a long id β€” and this one is valid everywhere and ever. yes, ever. it's the one you trust with your whole chest, iykyk πŸ”₯

quick vibe check: short = local + temporary, long = global + forever. pick your fighter accordingly πŸ’…

🧚 AUTHOR 🧚

Mike Wesemann, <mwx@gmx.de> β€” thank you for your service, king πŸ‘‘


πŸ“ SEE ALSO πŸ“

  • perl. that's it. that's the reference. honestly iconic.

and that's the page!! short and sweet, just like the ids πŸ’œ this was perl v5.42.0, dated 2016-06-19, page Uniqid(3) β€” go forth and generate something unique, bestie πŸŒΈβœ¨πŸ¦‹

πŸ“¦ where this page comes from