Text::Lorem(3pm)

πŸ“¦
version 0.34 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 πŸ”₯

go check em out, iykyk πŸ’«


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