---
name: "Data::Fake::Text"
section: "3pm"
platform: "linux"
package: "libdata-fake-perl"
version: "0.006-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Data::Fake::Text"
---

# Data::Fake::Text(3pm)

Fake text data generators

## NAME

Data::Fake::Text - Fake text data generators

## VERSION

version 0.006

## SYNOPSIS

```
    use Data::Fake::Text;
    fake_words(2)->();
    fake_sentences(3)->();
    fake_paragraphs(1)->();
```

## DESCRIPTION

This module provides fake data generators for random words and other textual data.

All functions are exported by default.

## FUNCTIONS

### fake\_words

```
    $generator = fake_words();    # single "lorem" word
    $generator = fake_words($n);  # N "lorem" words, space separated
    $generator = fake_words( fake_int(1, 3) ); # random number of them
```

Returns a generator that provides space-separated Text::Lorem words as a single scalar value.  The argument is the number of words to return (or a code reference to provide the number of words); the default is one.

### fake\_sentences

```
    $generator = fake_sentences();    # single fake sentence
    $generator = fake_sentences($n);  # N sentences
    $generator = fake_sentences( fake_int(1, 3) ); # random number of them
```

Returns a generator that provides Text::Lorem sentences as a single scalar value.  The argument is the number of sentences to return (or a code reference to provide the number of sentences); the default is one.

### fake\_paragraphs

```
    $generator = fake_paragraphs();    # single fake paragraph
    $generator = fake_paragraphs($n);  # N paragraph
    $generator = fake_paragraphs( fake_int(1, 3) ); # random number of them
```

Returns a generator that provides Text::Lorem paragraphs as a single scalar value.  The argument is the number of paragraphs to return (or a code reference to provide the number of paragraphs); the default is one.

## AUTHOR

David Golden \<dagolden@cpan.org\>

## COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by David Golden.

This is free software, licensed under:

```
  The Apache License, Version 2.0, January 2004
```
