NAME

Text::Lorem::More - Generate formatted nonsense using random Latin words.

VERSION

Version 0.09

SYNOPSIS

Generate formatted nonsense using random Latin words.

use Text::Lorem::More;

my $lorem = Text::Lorem::More->new();

# Greet a friend
print "Hello, ", $lorem->fullname, "\n";

# You could also ...
print $lorem->process("Hello, +fullname\n");

... or you can use the singleton:

use Text::Lorem::More qw(lorem);

# Generate a random latin word
my $latinwordoftheday = lorem->word;

# Produce paragaphs in the Text::Lorem compatible manner
my $content = lorem->paragraphs(3);

# Print 4 paragraphs, each separated by a single newline and tab:
print "\t", scalar lorem->paragraph(4, "\n\t");

EXPORT

FUNCTIONS

new [$source]

Construct a new Text::Lorem::More object

generate $pattern [, $count, $separator]

Generate some text using the specified pattern.

generate is faster than process, as generate uses regex to perform substitution.

In list context, generate will return list with $count number of "words"

In scalar context, generate will return some text repeating the $pattern $count times and joined by $separator.

If you do not specify scalar context on the receiving end, then the separator will simply be discarded. This may change in the future

The default for $count is 1

The default for $separator is " "

A pattern will usually contain one or more generator tokens. For example:

+name
+fullname
+word+word+word+word

The pattern can also contain other text:

+name@+domainname
"+firstname +lastname"

Sometimes you might need to enclose the token identifier between +{ and }

For example, the following pattern won't work right:

prefix+namesuffix

But this will:

prefix+{name}suffix

If you need to include a '+' in your pattern, you'll have to use parse instead.

process $text

Process a block of text, performing pattern substitutions as they're found.

process is slower than generate, as process uses Parse::RecDescent.

To escape '+', simply repeat it. For example, to produce "2 + 2" you would submit:

2 ++ 2

Please see generate for more information.

source

Return the generator source for this instance.

lorem

A L<Text::Lorem::More> singleton.

AUTHOR

Robert Krimen, <robertkrimen at gmail.com>

SEE ALSO

Text::Lorem and WWW::Lipsum and http://lipsum.com/

ACKNOWLEDGEMENTS

Thanks to Adeola Awoyemi for writing Text::Lorem which was the inspiration behind this module.

COPYRIGHT & LICENSE

Copyright 2006 Robert Krimen, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

BUGS

Please report any bugs or feature requests to bug-text-lorem-more at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-Lorem-More. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Text::Lorem::More

You can also look for information at: