# NAME

Faker - Extensible Fake Data Generator

# VERSION

version 0.12

# SYNOPSIS

    use Faker;

    my $faker = Faker->new;

    my $address   = $faker->provider('Address');
    my $color     = $faker->provider('Color');
    my $company   = $faker->provider('Company');
    my $internet  = $faker->provider('Internet');
    my $lorem     = $faker->provider('Lorem');
    my $payment   = $faker->provider('Payment');
    my $person    = $faker->provider('Person');
    my $telephone = $faker->provider('Telephone');

    say $address->lines;
    say $color->name;
    say $company->name;
    say $internet->ip_address;
    say $lorem->sentences;
    say $payment->card_number;
    say $person->username;
    say $telephone->number;

    # or

    say $faker->address_lines;
    say $faker->color_name;
    say $faker->company_name;
    say $faker->internet_ip_address;
    say $faker->lorem_sentences;
    say $faker->payment_card_number;
    say $faker->person_username;
    say $faker->telephone_number;

# DESCRIPTION

Faker is a Perl library that generates fake data for you. Whether you need to
bootstrap your database, create good-looking XML documents, fill-in your
persistence to stress test it, or anonymize data taken from a production
service, Faker makes it easy to generate fake data. **Note: This is an early
release available for testing and feedback and as such is subject to change.**

# ATTRIBUTES

## namespace

    $faker->namespace('MyApp::FakeData');

The namespace attribute contains the namespace from which providers will be
loaded. This attribute defaults to Faker::Provider.

## locale

    $faker->locale('en_US');

The locale attribute contains the locale string which is concatenated with the
namespace attribute to load fake data which is locale-specific.

# METHODS

## provider

    $faker->provider('Company'); # Faker::Provider::en_US::Company

The provider method uses the namespace and locale attributes to load a
particular provider which provides methods to generate fake data.

## address\_city\_name

    $faker->address_city_name; # Leathaville

The address\_city\_name method generates a random ficticious city name. This
method is a proxy method which is the equivilent of calling the `city_name`
method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_city\_prefix

    $faker->address_city_prefix; # East

The address\_city\_prefix method generates a random ficticious city prefix. This
method is a proxy method which is the equivilent of calling the `city_prefix`
method on the [Faker::Provider::en\_US::Address](https://metacpan.org/pod/Faker::Provider::en_US::Address) class.

## address\_city\_suffix

    $faker->address_city_suffix; # town

The address\_city\_suffix method generates a random ficticious city suffix. This
method is a proxy method which is the equivilent of calling the `city_suffix`
method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_country\_name

    $faker->address_country_name; # Maldives

The address\_country\_name method generates a random ficticious country name.
This method is a proxy method which is the equivilent of calling the
`country_name` method on the [Faker::Provider::en\_US::Address](https://metacpan.org/pod/Faker::Provider::en_US::Address) class.

## address\_latitude

    $faker->address_latitude; # 71.339800

The address\_latitude method generates a random ficticious latitude point. This
method is a proxy method which is the equivilent of calling the `latitude`
method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_line1

    $faker->address_line1; # 55 Wolf Street

The address\_line1 method generates a random ficticious street address. This
method is a proxy method which is the equivilent of calling the `line1` method
on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_line2

    $faker->address_line2; # Apt. 097

The address\_line2 method generates a random ficticious address line2. This
method is a proxy method which is the equivilent of calling the `line2` method
on the [Faker::Provider::en\_US::Address](https://metacpan.org/pod/Faker::Provider::en_US::Address) class.

## address\_lines

    $faker->address_lines; # 23 West Parkway, Antoinetteford, 57654-9772

The address\_lines method generates a random ficticious stree address. This
method is a proxy method which is the equivilent of calling the `lines` method
on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_longitude

    $faker->address_longitude; # 40.987408

The address\_longitude method generates a random ficticious longitude point.
This method is a proxy method which is the equivilent of calling the
`longitude` method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_number

    $faker->address_number; # 5

The address\_number method generates a random ficticious street number. This
method is a proxy method which is the equivilent of calling the `number`
method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_postal\_code

    $faker->address_postal_code; # 54708-5923

The address\_postal\_code method generates a random ficticious postal code. This
method is a proxy method which is the equivilent of calling the `postal_code`
method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_state\_abbr

    $faker->address_state_abbr; # MT

The address\_state\_abbr method generates a random ficticious state abbr. This
method is a proxy method which is the equivilent of calling the `state_abbr`
method on the [Faker::Provider::en\_US::Address](https://metacpan.org/pod/Faker::Provider::en_US::Address) class.

## address\_state\_name

    $faker->address_state_name; # Missouri

The address\_state\_name method generates a random ficticious state name. This
method is a proxy method which is the equivilent of calling the `state_name`
method on the [Faker::Provider::en\_US::Address](https://metacpan.org/pod/Faker::Provider::en_US::Address) class.

## address\_street\_name

    $faker->address_street_name; # Gottlieb Avenue

The address\_street\_name method generates a random ficticious street name. This
method is a proxy method which is the equivilent of calling the `street_name`
method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## address\_street\_suffix

    $faker->address_street_suffix; # Street

The address\_street\_suffix method generates a random ficticious street suffix.
This method is a proxy method which is the equivilent of calling the
`street_suffix` method on the [Faker::Provider::Address](https://metacpan.org/pod/Faker::Provider::Address) class.

## color\_hex\_code

    $faker->color_hex_code; # #f69e17

The color\_hex\_code method generates a random ficticious hex color. This method
is a proxy method which is the equivilent of calling the `hex_code` method on
the [Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## color\_name

    $faker->color_name; # DarkBlue

The color\_name method generates a random ficticious color name. This method is
a proxy method which is the equivilent of calling the `name` method on the
[Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## color\_rgbcolors

    $faker->color_rgbcolors; # 191,5,180

The color\_rgbcolors method generates a random ficticious rgb colors. This
method is a proxy method which is the equivilent of calling the `rgbcolors`
method on the [Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## color\_rgbcolors\_array

    $faker->color_rgbcolors_array; # [217,103,213]

The color\_rgbcolors\_array method generates a random ficticious rgb colors. This
method is a proxy method which is the equivilent of calling the
`rgbcolors_array` method on the [Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## color\_rgbcolors\_css

    $faker->color_rgbcolors_css; # rgb(173,240,91)

The color\_rgbcolors\_css method generates a random ficticious rgbcolors for css.
This method is a proxy method which is the equivilent of calling the
`rgbcolors_css` method on the [Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## color\_safe\_hex\_code

    $faker->color_safe_hex_code; # #ff003e

The color\_safe\_hex\_code method generates a random ficticious safe hex color.
This method is a proxy method which is the equivilent of calling the
`safe_hex_code` method on the [Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## color\_safe\_name

    $faker->color_safe_name; # fuchsia

The color\_safe\_name method generates a random ficticious safe color name. This
method is a proxy method which is the equivilent of calling the `safe_name`
method on the [Faker::Provider::Color](https://metacpan.org/pod/Faker::Provider::Color) class.

## company\_buzzword\_type1

    $faker->company_buzzword_type1; # synergize

The company\_buzzword\_type1 method generates a random ficticious buzzword type1.
This method is a proxy method which is the equivilent of calling the
`buzzword_type1` method on the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_buzzword\_type2

    $faker->company_buzzword_type2; # vertical

The company\_buzzword\_type2 method generates a random ficticious buzzword type2.
This method is a proxy method which is the equivilent of calling the
`buzzword_type2` method on the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_buzzword\_type3

    $faker->company_buzzword_type3; # methodologies

The company\_buzzword\_type3 method generates a random ficticious buzzword type3.
This method is a proxy method which is the equivilent of calling the
`buzzword_type3` method on the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_description

    $faker->company_description; # Delivers discrete processimprovement

The company\_description method generates a random ficticious description. This
method is a proxy method which is the equivilent of calling the `description`
method on the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_jargon\_buzz\_word

    $faker->company_jargon_buzz_word; # encryption

The company\_jargon\_buzz\_word method generates a random ficticious jargon buzz
word. This method is a proxy method which is the equivilent of calling the
`jargon_buzz_word` method on the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_jargon\_edge\_word

    $faker->company_jargon_edge_word; # Public-key

The company\_jargon\_edge\_word method generates a random ficticious jargon edge
word. This method is a proxy method which is the equivilent of calling the
`jargon_edge_word` method on the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_jargon\_prop\_word

    $faker->company_jargon_prop_word; # upward-trending

The company\_jargon\_prop\_word method generates a random ficticious jargon
proposition word. This method is a proxy method which is the equivilent of
calling the `jargon_prop_word` method on the
[Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## company\_name

    $faker->company_name; # Quitzon Inc.

The company\_name method generates a random ficticious company name. This method
is a proxy method which is the equivilent of calling the `name` method on the
[Faker::Provider::Company](https://metacpan.org/pod/Faker::Provider::Company) class.

## company\_name\_suffix

    $faker->company_name_suffix; # Inc.

The company\_name\_suffix method generates a random ficticious company name
suffix. This method is a proxy method which is the equivilent of calling the
`name_suffix` method on the [Faker::Provider::Company](https://metacpan.org/pod/Faker::Provider::Company) class.

## company\_tagline

    $faker->company_tagline; # mindshare customized seize

The company\_tagline method generates a random ficticious tagline. This method
is a proxy method which is the equivilent of calling the `tagline` method on
the [Faker::Provider::en\_US::Company](https://metacpan.org/pod/Faker::Provider::en_US::Company) class.

## internet\_domain\_name

    $faker->internet_domain_name; # bauch-co.net

The internet\_domain\_name method generates a random ficticious domain name. This
method is a proxy method which is the equivilent of calling the `domain_name`
method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_domain\_word

    $faker->internet_domain_word; # jerde-gulgowski

The internet\_domain\_word method generates a random ficticious domain word. This
method is a proxy method which is the equivilent of calling the `domain_word`
method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_email\_address

    $faker->internet_email_address; # jessy.kunze\@brekke-cartwright.net

The internet\_email\_address method generates a random ficticious email address.
This method is a proxy method which is the equivilent of calling the
`email_address` method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_email\_domain

    $faker->internet_email_domain; # gmail.com

The internet\_email\_domain method generates a random ficticious email domain.
This method is a proxy method which is the equivilent of calling the
`email_domain` method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_ip\_address

    $faker->internet_ip_address; # 151.127.26.209

The internet\_ip\_address method generates a random ficticious ip address. This
method is a proxy method which is the equivilent of calling the `ip_address`
method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_ip\_address\_v4

    $faker->internet_ip_address_v4; # 165.132.192.226

The internet\_ip\_address\_v4 method generates a random ficticious ip address v4.
This method is a proxy method which is the equivilent of calling the
`ip_address_v4` method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_ip\_address\_v6

    $faker->internet_ip_address_v6; # 8ae5:e9ac:e5fb:4fc2:7763:fa5e:aaf4:8120

The internet\_ip\_address\_v6 method generates a random ficticious ip address v6.
This method is a proxy method which is the equivilent of calling the
`ip_address_v6` method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_root\_domain

    $faker->internet_root_domain; # org

The internet\_root\_domain method generates a random ficticious root domain. This
method is a proxy method which is the equivilent of calling the `root_domain`
method on the [Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## internet\_url

    $faker->internet_url; # http://bauch-runte-and-ondricka.info/

The internet\_url method generates a random ficticious url. This method is a
proxy method which is the equivilent of calling the `url` method on the
[Faker::Provider::Internet](https://metacpan.org/pod/Faker::Provider::Internet) class.

## lorem\_paragraph

    $faker->lorem_paragraph;
    # velit vitae molestiae ut dolores. amet est qui rem placeat accusamus
    # accusamus labore. qui quidem expedita non.\n\n

The lorem\_paragraph method generates a random ficticious paragraph. This method
is a proxy method which is the equivilent of calling the `paragraph` method on
the [Faker::Provider::Lorem](https://metacpan.org/pod/Faker::Provider::Lorem) class.

## lorem\_paragraphs

    $faker->lorem_paragraphs;
    # nobis minus aut nam. odio autem fuga et reprehenderit. magnam eius et
    # possimus.\n\nvelit nam vel nam harum maxime id dolorum. sed ut molestiae
    # cumque voluptas aspernatur quidem aut dicta. officia laborum dolorem ab
    # ipsa deleniti.\n\n

The lorem\_paragraphs method generates a random ficticious paragraphs. This
method is a proxy method which is the equivilent of calling the `paragraphs`
method on the [Faker::Provider::Lorem](https://metacpan.org/pod/Faker::Provider::Lorem) class.

## lorem\_sentence

    $faker->lorem_sentence; # animi iure quo assumenda est.

The lorem\_sentence method generates a random ficticious sentence. This method
is a proxy method which is the equivilent of calling the `sentence` method on
the [Faker::Provider::Lorem](https://metacpan.org/pod/Faker::Provider::Lorem) class.

## lorem\_sentences

    $faker->lorem_sentences;
    # placeat beatae qui aliquid. distinctio quasi repudiandae hic id.
    # explicabo culpa debitis excepturi aliquam quo ea.

The lorem\_sentences method generates a random ficticious sentences. This method
is a proxy method which is the equivilent of calling the `sentences` method on
the [Faker::Provider::Lorem](https://metacpan.org/pod/Faker::Provider::Lorem) class.

## lorem\_word

    $faker->lorem_word; # quidem

The lorem\_word method generates a random ficticious word. This method is a
proxy method which is the equivilent of calling the `word` method on the
[Faker::Provider::Lorem](https://metacpan.org/pod/Faker::Provider::Lorem) class.

## lorem\_words

    $faker->lorem_words; # voluptatibus officia delectus unde sed

The lorem\_words method generates a random ficticious words. This method
is a proxy method which is the equivilent of calling the `words` method on
the [Faker::Provider::Lorem](https://metacpan.org/pod/Faker::Provider::Lorem) class.

## payment\_card\_expiration

    $faker->payment_card_expiration; # 02/17

The payment\_card\_expiration method generates a random ficticious credit card
expiration date. This method is a proxy method which is the equivilent of
calling the `card_expiration` method on the [Faker::Provider::Payment](https://metacpan.org/pod/Faker::Provider::Payment) class.

## payment\_card\_number

    $faker->payment_card_number; # 37814449158323

The payment\_card\_number method generates a random ficticious credit card
number. This method is a proxy method which is the equivilent of calling the
`card_number` method on the [Faker::Provider::Payment](https://metacpan.org/pod/Faker::Provider::Payment) class.

## payment\_vendor

    $faker->payment_vendor; # MasterCard

The payment\_vendor method generates a random ficticious credit card vendor.
This method is a proxy method which is the equivilent of calling the `vendor`
method on the [Faker::Provider::Payment](https://metacpan.org/pod/Faker::Provider::Payment) class.

## person\_first\_name

    $faker->person_first_name; # John

The person\_first\_name method generates a random ficticious first name. This
method is a proxy method which is the equivilent of calling the `first_name`
method on the [Faker::Provider::Person](https://metacpan.org/pod/Faker::Provider::Person) class.

## person\_last\_name

    $faker->person_last_name; # Doe

The person\_last\_name method generates a random ficticious last name. This
method is a proxy method which is the equivilent of calling the `last_name`
method on the [Faker::Provider::Person](https://metacpan.org/pod/Faker::Provider::Person) class.

## person\_name

    $faker->person_name; # Jane Doe

The person\_name method generates a random ficticious full name. This method is
a proxy method which is the equivilent of calling the `name` method on the
[Faker::Provider::Person](https://metacpan.org/pod/Faker::Provider::Person) class.

## person\_name\_prefix

    $faker->person_name_prefix; # Miss

The person\_name\_prefix method generates a random ficticious name prefix. This
method is a proxy method which is the equivilent of calling the `name_prefix`
method on the [Faker::Provider::en\_US::Person](https://metacpan.org/pod/Faker::Provider::en_US::Person) class.

## person\_name\_suffix

    $faker->person_name_suffix; # III

The person\_name\_suffix method generates a random ficticious name suffix. This
method is a proxy method which is the equivilent of calling the `name_suffix`
method on the [Faker::Provider::en\_US::Person](https://metacpan.org/pod/Faker::Provider::en_US::Person) class.

## person\_username

    $faker->person_username; # Jane.Doe

The person\_username method generates a random ficticious username. This method
is a proxy method which is the equivilent of calling the `username` method on
the [Faker::Provider::Person](https://metacpan.org/pod/Faker::Provider::Person) class.

## telephone\_number

    $faker->telephone_number; # (111) 456-1127

The telephone\_number method generates a random ficticious telephone number.
This method is a proxy method which is the equivilent of calling the `number`
method on the [Faker::Provider::Telephone](https://metacpan.org/pod/Faker::Provider::Telephone) class.

# ACKNOWLEDGEMENTS

Some parts of this library were adopted from the following implementations.

- JS Faker [https://github.com/Marak/faker.js](https://github.com/Marak/faker.js)
- PHP Faker [https://github.com/fzaninotto/Faker](https://github.com/fzaninotto/Faker)
- Python Faker [https://github.com/joke2k/faker](https://github.com/joke2k/faker)
- Ruby Faker [https://github.com/stympy/faker](https://github.com/stympy/faker)

# AUTHOR

Al Newkirk <anewkirk@ana.io>

# COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Al Newkirk.

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