Faker
Extensible Fake Data Generator
package main; use Faker; my $f = Faker->new;
This package provides 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.
This package integrates behaviors from:
Data::Object::Role::Pluggable
Data::Object::Role::Proxyable
Data::Object::Role::Throwable
Faker::Maker
This package uses type constraints from:
Types::Standard
This package supports the following scenarios:
package Faker::Plugin::FileExt; use Data::Object::Class; use Data::Object::ClassHas; has 'faker'; sub execute { 'video/mpeg' } package main; use Faker; my $f = Faker->new; $f->_file_ext
This package supports the auto-loading of plugins, which means that anyone can create non-core plugins (fake data generators) and load and control them using Faker.
package Faker::Plugin::JaJp::PersonName; use Data::Object::Class; use Data::Object::ClassHas; has 'faker'; sub execute { '鈴木 陽一' } package main; use Faker; my $f = Faker->new; $f->_person_name(under => 'ja_jp')
This package also supports auto-loading plugins under a specific sub-namespace which is typical in creating fake data plugins for locales.
This package implements the following methods:
address_city_name(Any %args) : Str
The address_city_name method returns a random fake address city name. See the Faker::Plugin::AddressCityName plugin for more information.
# given: synopsis $f->address_city_name # Lolastad
address_city_prefix(Any %args) : Str
The address_city_prefix method returns a random fake address city prefix. See the Faker::Plugin::AddressCityPrefix plugin for more information.
# given: synopsis $f->address_city_prefix # South
address_city_suffix(Any %args) : Str
The address_city_suffix method returns a random fake address city suffix. See the Faker::Plugin::AddressCitySuffix plugin for more information.
# given: synopsis $f->address_city_suffix # berg
address_country_name(Any %args) : Str
The address_country_name method returns a random fake address country name. See the Faker::Plugin::AddressCountryName plugin for more information.
# given: synopsis $f->address_country_name # Iraq
address_latitude(Any %args) : Str
The address_latitude method returns a random fake address latitude. See the Faker::Plugin::Address::Latitude plugin for more information.
# given: synopsis $f->address_latitude # 2338952
address_line1(Any %args) : Str
The address_line1 method returns a random fake address line1. See the Faker::Plugin::AddressLine1 plugin for more information.
# given: synopsis $f->address_line1 # 4 Schaefer Parkway
address_line2(Any %args) : Str
The address_line2 method returns a random fake address line2. See the Faker::Plugin::AddressLine2 plugin for more information.
# given: synopsis $f->address_line2 # Apt. 092
address_lines(Any %args) : Str
The address_lines method returns a random fake address lines. See the Faker::Plugin::AddressLines plugin for more information.
# given: synopsis $f->address_lines # 3587 Thiel Avenue # Suite 335 # Tobinmouth, ME 96440-0239
address_longitude(Any %args) : Str
The address_longitude method returns a random fake address longitude. See the Faker::Plugin::AddressLongitude plugin for more information.
# given: synopsis $f->address_longitude # -28.920235
address_number(Any %args) : Str
The address_number method returns a random fake address number. See the Faker::Plugin::AddressNumber plugin for more information.
# given: synopsis $f->address_number # 67
address_postal_code(Any %args) : Str
The address_postal_code method returns a random fake address postal code. See the Faker::Plugin::AddressPostalCode plugin for more information.
# given: synopsis $f->address_postal_code # 02475
address_state_abbr(Any %args) : Str
The address_state_abbr method returns a random fake address state abbr. See the Faker::Plugin::AddressStateAbbr plugin for more information.
# given: synopsis $f->address_state_abbr # OH
address_state_name(Any %args) : Str
The address_state_name method returns a random fake address state name. See the Faker::Plugin::AddressStateName plugin for more information.
# given: synopsis $f->address_state_name # Georgia
address_street_name(Any %args) : Str
The address_street_name method returns a random fake address street name. See the Faker::Plugin::AddressStreetName plugin for more information.
# given: synopsis $f->address_street_name # Reyna Avenue
address_street_suffix(Any %args) : Str
The address_street_suffix method returns a random fake address street suffix. See the Faker::Plugin::AddressStreetSuffix plugin for more information.
# given: synopsis $f->address_street_suffix # Avenue
color_hex_code(Any %args) : Str
The color_hex_code method returns a random fake color hex code. See the Faker::Plugin::ColorHexCode plugin for more information.
# given: synopsis $f->color_hex_code # #b9fe40
color_name(Any %args) : Str
The color_name method returns a random fake color name. See the Faker::Plugin::ColorName plugin for more information.
# given: synopsis $f->color_name # LightSteelBlue
color_rgbcolors(Any %args) : Str
The color_rgbcolors method returns a random fake color rgbcolors. See the Faker::Plugin::ColorRgbcolors plugin for more information.
# given: synopsis $f->color_rgbcolors # 77,186,28
color_rgbcolors_array(Any %args) : ArrayRef
The color_rgbcolors_array method returns a random fake color rgbcolors array. See the Faker::Plugin::ColorRgbcolorsArray plugin for more information.
# given: synopsis $f->color_rgbcolors_array # [77,186,28]
color_rgbcolors_css(Any %args) : Str
The color_rgbcolors_css method returns a random fake color rgbcolors css. See the Faker::Plugin::ColorRgbcolorsCss plugin for more information.
# given: synopsis $f->color_rgbcolors_css # rgb(115,98,44)
color_safe_hex_code(Any %args) : Str
The color_safe_hex_code method returns a random fake color safe hex code. See the Faker::Plugin::ColorSafeHexCode plugin for more information.
# given: synopsis $f->color_safe_hex_code # #ff0078
color_safe_name(Any %args) : Str
The color_safe_name method returns a random fake color safe name. See the Faker::Plugin::ColorSafeName plugin for more information.
# given: synopsis $f->color_safe_name # blue
company_buzzword_type1(Any %args) : Str
The company_buzzword_type1 method returns a random fake company buzzword type1. See the Faker::Plugin::CompanyBuzzwordType1 plugin for more information.
# given: synopsis $f->company_buzzword_type1 # implement
company_buzzword_type2(Any %args) : Str
The company_buzzword_type2 method returns a random fake company buzzword type2. See the Faker::Plugin::CompanyBuzzwordType2 plugin for more information.
# given: synopsis $f->company_buzzword_type2 # interactive
company_buzzword_type3(Any %args) : Str
The company_buzzword_type3 method returns a random fake company buzzword type3. See the Faker::Plugin::CompanyBuzzwordType3 plugin for more information.
# given: synopsis $f->company_buzzword_type3 # bandwidth
company_description(Any %args) : Str
The company_description method returns a random fake company description. See the Faker::Plugin::CompanyDescription plugin for more information.
# given: synopsis $f->company_description # Excels at impactful pre-emptive decisions
company_jargon_buzz_word(Any %args) : Str
The company_jargon_buzz_word method returns a random fake company jargon buzz word. See the Faker::Plugin::CompanyJargonBuzzWord plugin for more information.
# given: synopsis $f->company_jargon_buzz_word # parallelism
company_jargon_edge_word(Any %args) : Str
The company_jargon_edge_word method returns a random fake company jargon edge word. See the Faker::Plugin::CompanyJargonEdgeWord plugin for more information.
# given: synopsis $f->company_jargon_edge_word # Customer-focused
company_jargon_prop_word(Any %args) : Str
The company_jargon_prop_word method returns a random fake company jargon prop word. See the Faker::Plugin::CompanyJargonPropWord plugin for more information.
# given: synopsis $f->company_jargon_prop_word # upward-trending
company_name(Any %args) : Str
The company_name method returns a random fake company name. See the Faker::Plugin::CompanyName plugin for more information.
# given: synopsis $f->company_name # Boehm, Rutherford and Roberts
company_name_suffix(Any %args) : Str
The company_name_suffix method returns a random fake company name suffix. See the Faker::Plugin::CompanyNameSuffix plugin for more information.
# given: synopsis $f->company_name_suffix # Group
company_tagline(Any %args) : Str
The company_tagline method returns a random fake company tagline. See the Faker::Plugin::CompanyTagline plugin for more information.
# given: synopsis $f->company_tagline # cultivate end-to-end partnerships
internet_domain_name(Any %args) : Str
The internet_domain_name method returns a random fake internet domain name. See the Faker::Plugin::InternetDomainName plugin for more information.
# given: synopsis $f->internet_domain_name # kassulke-cruickshank.biz
internet_domain_word(Any %args) : Str
The internet_domain_word method returns a random fake internet domain word. See the Faker::Plugin::InternetDomainWord plugin for more information.
# given: synopsis $f->internet_domain_word # raynor-beier
internet_email_address(Any %args) : Str
The internet_email_address method returns a random fake internet email address. See the Faker::Plugin::InternetEmailAddress plugin for more information.
# given: synopsis $f->internet_email_address # rose@maggio-pfannerstill-and-marquardt.com
internet_email_domain(Any %args) : Str
The internet_email_domain method returns a random fake internet email domain. See the Faker::Plugin::InternetEmailDomain plugin for more information.
# given: synopsis $f->internet_email_domain # gmail.com
internet_ip_address(Any %args) : Str
The internet_ip_address method returns a random fake internet ip address. See the Faker::Plugin::InternetIpAddress plugin for more information.
# given: synopsis $f->internet_ip_address # 193.199.217.87
internet_ip_address_v4(Any %args) : Str
The internet_ip_address_v4 method returns a random fake internet ip address v4. See the Faker::Plugin::InternetIpAddressV4 plugin for more information.
# given: synopsis $f->internet_ip_address_v4 # 45.212.129.22
internet_ip_address_v6(Any %args) : Str
The internet_ip_address_v6 method returns a random fake internet ip address v6. See the Faker::Plugin::InternetIpAddressV6 plugin for more information.
# given: synopsis $f->internet_ip_address_v6 # 4024:40e9:b107:681d:8ce1:bb12:3380:b476
internet_root_domain(Any %args) : Str
The internet_root_domain method returns a random fake internet root domain. See the Faker::Plugin::InternetRootDomain plugin for more information.
# given: synopsis $f->internet_root_domain # biz
internet_url(Any %args) : Str
The internet_url method returns a random fake internet url. See the Faker::Plugin::InternetUrl plugin for more information.
# given: synopsis $f->internet_url # https://krajcik-goyette.biz/
lorem_paragraph(Any %args) : Str
The lorem_paragraph method returns a random fake lorem paragraph. See the Faker::Plugin::LoremParagraph plugin for more information.
# given: synopsis $f->lorem_paragraph # id tempore eum. vitae optio rerum enim nihil perspiciatis omnis et. ut # voluptates dicta qui culpa. a nam at nemo fugiat.
lorem_paragraphs(Any %args) : Str
The lorem_paragraphs method returns a random fake lorem paragraphs. See the Faker::Plugin::LoremParagraphs plugin for more information.
# given: synopsis $f->lorem_paragraphs # modi minus pariatur accusamus possimus eaque id velit porro. voluptatum # natus saepe. non in quas est. ut quos autem occaecati quo. # saepe quae unde. vel hic consequuntur. quia aut ut nostrum amet. et # consequuntur occaecati.
lorem_sentence(Any %args) : Str
The lorem_sentence method returns a random fake lorem sentence. See the Faker::Plugin::LoremSentence plugin for more information.
# given: synopsis $f->lorem_sentence # amet id id culpa reiciendis minima id corporis illum quas.
lorem_sentences(Any %args) : Str
The lorem_sentences method returns a random fake lorem sentences. See the Faker::Plugin::LoremSentences plugin for more information.
# given: synopsis $f->lorem_sentences # laboriosam ipsam ipsum. animi accusantium quisquam repellendus. occaecati # itaque reiciendis perferendis exercitationem.
lorem_word(Any %args) : Str
The lorem_word method returns a random fake lorem word. See the Faker::Plugin::LoremWord plugin for more information.
# given: synopsis $f->lorem_word # quos
lorem_words(Any %args) : Str
The lorem_words method returns a random fake lorem words. See the Faker::Plugin::LoremWords plugin for more information.
# given: synopsis $f->lorem_words # autem assumenda commodi eum dolor
payment_card_expiration(Any %args) : Str
The payment_card_expiration method returns a random fake payment card expiration. See the Faker::Plugin::PaymentCardExpiration plugin for more information.
# given: synopsis $f->payment_card_expiration # 01/21
payment_card_number(Any %args) : Str
The payment_card_number method returns a random fake payment card number. See the Faker::Plugin::PaymentCardNumber plugin for more information.
# given: synopsis $f->payment_card_number # 544772628796996
payment_vendor(Any %args) : Str
The payment_vendor method returns a random fake payment vendor. See the Faker::Plugin::PaymentVendor plugin for more information.
# given: synopsis $f->payment_vendor # Visa
person_first_name(Any %args) : Str
The person_first_name method returns a random fake person first name. See the Faker::Plugin::PersonFirstName plugin for more information.
# given: synopsis $f->person_first_name # Sandrine
person_last_name(Any %args) : Str
The person_last_name method returns a random fake person last name. See the Faker::Plugin::PersonLastName plugin for more information.
# given: synopsis $f->person_last_name # Langosh
person_name(Any %args) : Str
The person_name method returns a random fake person name. See the Faker::Plugin::PersonName plugin for more information.
# given: synopsis $f->person_name # Eveline Wintheiser
person_name_prefix(Any %args) : Str
The person_name_prefix method returns a random fake person name prefix. See the Faker::Plugin::PersonNamePrefix plugin for more information.
# given: synopsis $f->person_name_prefix # Ms.
person_name_suffix(Any %args) : Str
The person_name_suffix method returns a random fake person name suffix. See the Faker::Plugin::PersonNameSuffix plugin for more information.
# given: synopsis $f->person_name_suffix # Sr.
person_username(Any %args) : Str
The person_username method returns a random fake person username. See the Faker::Plugin::PersonUsername plugin for more information.
# given: synopsis $f->person_username # Cayla25
telephone_number(Any %args) : Str
The telephone_number method returns a random fake telephone number. See the Faker::Plugin::TelephoneNumber plugin for more information.
# given: synopsis $f->telephone_number # 549-844-2061
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Parts of this library were inspired by the following implementations:
PHP Faker
Ruby Faker
Python Faker
JS Faker
Elixir Faker
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Faker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Faker
CPAN shell
perl -MCPAN -e shell install Faker
For more information on module installation, please visit the detailed CPAN module installation guide.