Faker/Plugin/EsEs/InternetDomainWord.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Faker/Plugin/EsEs/InternetDomainName.pm ↑ Summary Faker/Plugin/HttpUserAgent.pm »
1 package Faker::Plugin::EsEs::InternetDomainWord;
2  
3 4 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶use Venus::Class 'base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 4 base 'Faker::Plugin::EsEs';
11  
12 # VERSION
13  
14 4 our $VERSION = '1.19';
15  
16 # METHODS
17  
18 10 ▶sub execute {
Subroutine execute: called CC=1 SCAR=0.0
Pod documented
19 10 my ($self, $data) = @_;
20  
21 10 my $domain_word = lc $self->transliterate($self->faker->company_name);
22  
23 10 $domain_word =~ s/\W+/-/g;
24 10 $domain_word =~ s/^\W+|\W+$//g;
25  
26 10 return $domain_word;
27 }
28  
29 4 1;
30  
31  
32  
33 =head1 NAME
34  
35 Faker::Plugin::EsEs::InternetDomainWord - Internet Domain Word
36  
37 =cut
38  
39 =head1 ABSTRACT
40  
41 Internet Domain Word for Faker
42  
43 =cut
44  
45 =head1 VERSION
46  
47 1.19
48  
49 =cut
50  
51 =head1 SYNOPSIS
52  
53 package main;
54  
55 use Faker::Plugin::EsEs::InternetDomainWord;
56  
57 my $plugin = Faker::Plugin::EsEs::InternetDomainWord->new;
58  
59 # bless(..., "Faker::Plugin::EsEs::InternetDomainWord")
60  
61 =cut
62  
63 =head1 DESCRIPTION
64  
65 This package provides methods for generating fake data for internet domain word.
66  
67 =encoding utf8
68  
69 =cut
70  
71 =head1 INHERITS
72  
73 This package inherits behaviors from:
74  
75 L<Faker::Plugin::EsEs>
76  
77 =cut
78  
79 =head1 METHODS
80  
81 This package provides the following methods:
82  
83 =cut
84  
85 =head2 execute
86  
87 execute(HashRef $data) (Str)
88  
89 The execute method returns a returns a random fake internet domain word.
90  
91 I<Since C<1.10>>
92  
93 =over 4
94  
95 =item execute example 1
96  
97 package main;
98  
99 use Faker::Plugin::EsEs::InternetDomainWord;
100  
101 my $plugin = Faker::Plugin::EsEs::InternetDomainWord->new;
102  
103 # bless(..., "Faker::Plugin::EsEs::InternetDomainWord")
104  
105 # my $result = $plugin->execute;
106  
107 # 'asociacion-lujan';
108  
109 # my $result = $plugin->execute;
110  
111 # 'montano-y-alcala';
112  
113 # my $result = $plugin->execute;
114  
115 # 'mata-de-ibarra';
116  
117 =back
118  
119 =cut
120  
121 =head2 new
122  
123 new(HashRef $data) (Plugin)
124  
125 The new method returns a new instance of the class.
126  
127 I<Since C<1.10>>
128  
129 =over 4
130  
131 =item new example 1
132  
133 package main;
134  
135 use Faker::Plugin::EsEs::InternetDomainWord;
136  
137 my $plugin = Faker::Plugin::EsEs::InternetDomainWord->new;
138  
139 # bless(..., "Faker::Plugin::EsEs::InternetDomainWord")
140  
141 =back
142  
143 =cut
144  
145 =head1 AUTHORS
146  
147 Awncorp, C<awncorp@cpan.org>
148  
149 =cut
150  
151 =head1 LICENSE
152  
153 Copyright (C) 2000, Al Newkirk.
154  
155 This program is free software, you can redistribute it and/or modify it under
156 the terms of the Apache license version 2.0.
157  
158 =cut
« Faker/Plugin/EsEs/InternetDomainName.pm ↑ Summary Faker/Plugin/HttpUserAgent.pm »