Faker::Plugin::HttpUserAgent
HTTP User-Agent
HTTP User-Agent for Faker
method: new method: execute
package main;
use Faker::Plugin::HttpUserAgent;
my $plugin = Faker::Plugin::HttpUserAgent->new;
# bless(..., "Faker::Plugin::HttpUserAgent")
This package provides methods for generating fake data for HTTP user-agents.
+=encoding utf8
Faker::Plugin
The execute method returns a returns a random fake HTTP user-agent.
execute(HashRef $data) (Str)
{ since => '1.17', }
=example-1 execute
package main;
use Faker::Plugin::HttpUserAgent;
my $plugin = Faker::Plugin::HttpUserAgent->new;
# bless(..., "Faker::Plugin::HttpUserAgent")
# my $result = $plugin->execute;
# "Mozilla/6.1 (Windows; U; Windows NT 07.6; rv:0.4.5) ... Windows Firefox/4.4.3";
# my $result = $plugin->execute;
# "Mozilla/5.8 (Macintosh; U; Mac OS 58.2; rv:0.02) ... Macintosh Safari/0.5";
# my $result = $plugin->execute;
# "Mozilla/9.9 (Macintosh; U; Mac OS 58.9; rv:1.25) ... Macintosh Safari/0.6";
The new method returns a new instance of the class.
new(HashRef $data) (Plugin)
{ since => '1.17', }
=example-1 new
package main;
use Faker::Plugin::HttpUserAgent;
my $plugin = Faker::Plugin::HttpUserAgent->new;
# bless(..., "Faker::Plugin::HttpUserAgent")
t/Faker.t: pdml: authors t/Faker.t: pdml: license
14 POD Errors
The following errors were encountered while parsing the POD:
- Around line 14:
Unknown directive: =name
- Around line 22:
Unknown directive: =tagline
- Around line 30:
Unknown directive: =abstract
- Around line 38:
Unknown directive: =includes
- Around line 47:
Unknown directive: =synopsis
- Around line 67:
Unknown directive: =description
- Around line 77:
Unknown directive: =inherits
- Around line 85:
Unknown directive: =method
- Around line 89:
Unknown directive: =signature
- Around line 93:
Unknown directive: =metadata
- Around line 139:
Unknown directive: =method
- Around line 143:
Unknown directive: =signature
- Around line 147:
Unknown directive: =metadata
- Around line 174:
Unknown directive: =partials