Text::Lorem(3pm)
π Text::Lorem π
okay so bestie, welcome to Text::Lorem β it's a Perl module (yes, the 3pm kind, a User Contributed Perl Documentation page) and it's literally here to generate random Latin looking text for u. no cap.
β¨ SYNOPSIS β¨
here's the whole vibe, copy-paste ready:
use Text::Lorem;
my $text = Text::Lorem->new();
# Generate a string of text with 5 words
$words = $text->words(5);
# Generate a list of 5 words
@words = $text->words(5);
# Generate a string of text with 2 sentences
$sentences = $text->sentences(2);
# Generate a list of 2 sentences
@sentences = $text->sentences(2);
# Generate a string of text with 3 paragraphs
$paragraphs = $text->paragraphs(3);
# Generate a list of 3 paragraphs
@paragraphs = $text->paragraphs(3);
see how the sigil changes and the whole return type changes?? scalar context vs list context, that's the tea π
πΈ DESCRIPTION πΈ
so picture this: you're building a website or some other app, and you need placeholders for the content bc the real copy isn't ready yet. that's the moment. that's the assignment. π
this module generates prescribed amounts of fake Latin text. not vibes-based, not random-ish β prescribed. you say how much, it gives you how much. iconic behaviour honestly π
π¦ CONSTRUCTOR π¦
new()
the default constructor, bestie. new() takes no arguments and returns a Text::Lorem object. that's it. that's the whole thing. no drama, no config, just an object π«Ά
π METHODS π
real talk before we start: all methods below will return a string in scalar context or list in list context. so like,my $x = ...gets u one thing,my @x = ...gets u a list. same call, different energy β¨
words( INTEGER )
returns INTEGER fake Latin words. the number you pass in is the number of words you get out. slay.
sentences( INTEGER )
returns INTEGER sentences in fake Latin. periodt.
paragraphs( INTEGER )
returns INTEGER paragraphs of fake Latin text. big chunks of it. very demure, very placeholder π
π THANKS π
huge shoutout to the guys who pushed me off the cliff called comfort and into the scary world of Perl: James Duncan, Leon Brocard. π§β¨
π AUTHOR π
Adeola Awoyemi (adeola@cpan.org) β the main character who wrote all this π
π₯ SEE ALSO π₯
L<WWW::Lipsum>L<http://lipsum.com/>
go check em out, iykyk π«
π COPYRIGHT π
Copyright (c) 2003 by Adeola Awoyemi. This software is released under the same license as Perl itself.
ngl that's the whole page, no hidden lore π
and that's a wrap bestie!! this was perl v5.36.0, dated 2022-11-30 β yes the page is a lil vintage but she ate and left no crumbs πβ¨ππ¦πΈππβπ
π¦ where this page comes from
- debian bookworm: libtext-lorem-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtext-lorem-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtext-lorem-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtext-lorem-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-lorem-perl 0.34-3 Β· 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