line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Faker::Plugin::ColorSafeName; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
22257
|
use 5.018; |
|
2
|
|
|
|
|
9
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
6
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
63
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
11
|
use Venus::Class 'base'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
base 'Faker::Plugin'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '1.18'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub execute { |
19
|
6
|
|
|
6
|
1
|
2792
|
my ($self, $data) = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
30
|
return $self->faker->random->select(data_for_color_safe_name()); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub data_for_color_safe_name { |
25
|
6
|
|
|
6
|
0
|
35
|
state $color_safe_name = [ |
26
|
|
|
|
|
|
|
'black', |
27
|
|
|
|
|
|
|
'maroon', |
28
|
|
|
|
|
|
|
'green', |
29
|
|
|
|
|
|
|
'navy', |
30
|
|
|
|
|
|
|
'olive', |
31
|
|
|
|
|
|
|
'purple', |
32
|
|
|
|
|
|
|
'teal', |
33
|
|
|
|
|
|
|
'lime', |
34
|
|
|
|
|
|
|
'blue', |
35
|
|
|
|
|
|
|
'silver', |
36
|
|
|
|
|
|
|
'gray', |
37
|
|
|
|
|
|
|
'yellow', |
38
|
|
|
|
|
|
|
'fuchsia', |
39
|
|
|
|
|
|
|
'aqua', |
40
|
|
|
|
|
|
|
'white', |
41
|
|
|
|
|
|
|
] |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 NAME |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Faker::Plugin::ColorSafeName - Color Safe Name |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 ABSTRACT |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Color Safe Name for Faker |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 VERSION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1.18 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SYNOPSIS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
package main; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
use Faker::Plugin::ColorSafeName; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::ColorSafeName->new; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::ColorSafeName") |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 DESCRIPTION |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This package provides methods for generating fake data for color safe name. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=encoding utf8 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 INHERITS |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This package inherits behaviors from: |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 METHODS |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
This package provides the following methods: |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 execute |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
execute(HashRef $data) (Str) |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The execute method returns a returns a random fake color safe name. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
I> |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=over 4 |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item execute example 1 |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
package main; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
use Faker::Plugin::ColorSafeName; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::ColorSafeName->new; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::ColorSafeName") |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
# "purple"; |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# "teal"; |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
# "fuchsia"; |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=back |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 new |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
new(HashRef $data) (Plugin) |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
The new method returns a new instance of the class. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
I> |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=over 4 |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item new example 1 |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
package main; |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
use Faker::Plugin::ColorSafeName; |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::ColorSafeName->new; |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::ColorSafeName") |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=back |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head1 AUTHORS |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Awncorp, C |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=cut |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=head1 LICENSE |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Copyright (C) 2000, Al Newkirk. |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it under |
171
|
|
|
|
|
|
|
the terms of the Apache license version 2.0. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=cut |