# WWW-Lipsum **Repository Path**: mirrors_gitpan/WWW-Lipsum ## Basic Information - **Project Name**: WWW-Lipsum - **Description**: Read-only release history for WWW-Lipsum - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-20 - **Last Updated**: 2026-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # NAME WWW::Lipsum - perl interface to www.lipsum.com # SYNOPSIS use WWW::Lipsum; my $lipsum = WWW::Lipsum->new( html => 1, amount => 50, what => 'bytes', start => 0 ); print "$lipsum\n"; # auto-fetches lipsum text # Change an arg and check for errors explicitly $lipsum->generate( html => 0 ) or die "Error: " . $lipsum->error; print $lipsum->lipsum . "\n"; # Change some args and fetch using interpolation overload $lipsum->start(0); $lipsum->amount(5); $lipsum->what('paras'); print "$lipsum\n"; # generate a whole bunch of lipsums my @lipsums = map "$lipsum", 1..10; # DESCRIPTION Generate _Lorem Ipsum_ place holder text from perl, using [www.lipsum.com](http://www.lipsum.com/) # SEE ALSO You most likely want [Text::Lorem](https://metacpan.org/pod/Text::Lorem) or [Text::Lorem::More](https://metacpan.org/pod/Text::Lorem::More) instead of this module, as those generate _Lorem Ipsum_ text without using a web service. # METHODS ## `new` my $lipsum = WWW::Lipsum->new; my $lipsum = WWW::Lipsum->new( html => 1, amount => 50, what => 'bytes', start => 0 ); Creates and returns a brand new `WWW::Lipsum` object. Takes a number of __optional__ arguments that are given as key/value pairs. These specify the format of the generated lipsum text and can be changed either individually, using the appropriate accessor methods, or when calling `->generate` method. Possible arguments are as follows: ### `what` my $lipsum = WWW::Lipsum->new( what => 'paras' ); my $lipsum = WWW::Lipsum->new( what => 'lists' ); my $lipsum = WWW::Lipsum->new( what => 'words' ); my $lipsum = WWW::Lipsum->new( what => 'bytes' ); __Optional.__ Specifies in what form to get the _Lorem Ipsum_ text. Valid values are lowercase strings `paras`, `lists`, `words`, and `bytes` that mean to get the text as `paragraps`, `lists`, `words`, or `bytes` respectively. __Defaults to:__ `paras`. The meaning is most relevant for the `amount` argument (see below). The `lists` value will cause generation of variable-item-number lists of _Lorem Ipsum_ text. __Note:__ there seems to be very loose adherence to the `amount` you specified and what you get when you request `bytes`, and the value seems to be ignored if `amount` is set too low. ### `amount` my $lipsum = WWW::Lipsum->new( amount => 10 ); __Optional.__ __Takes__ a positive integer as a value. Large values will likely be abridged by [www.lipsum.com](http://www.lipsum.com/) to something reasonable. Specifies the number of `what` (see above) things to get. __Defaults to:__ `5`. ### `html` my $lipsum = WWW::Lipsum->new( html => 1 ); __Optional.__ __Takes__ true or false values. __Specifies__ whether to wrap _Lorem Ipsum_ text in HTML markup (will wrap in HTML when set to a true value). This will be `