line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Faker::Plugin::PaymentCardExpiration; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
21556
|
use 5.018; |
|
2
|
|
|
|
|
8
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
48
|
|
6
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
70
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
13
|
use Venus::Class 'base'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
base 'Faker::Plugin'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '1.17'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub execute { |
19
|
6
|
|
|
6
|
1
|
2799
|
my ($self, $data) = @_; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
31
|
my $pad = $self->faker->random->range(1,3); |
22
|
6
|
|
|
|
|
129
|
my $month = sprintf('%02d', $self->faker->random->range(1,12)); |
23
|
6
|
|
|
|
|
377
|
my $year = sprintf('%02d', ((localtime)[5] % 100) + $pad); |
24
|
|
|
|
|
|
|
|
25
|
6
|
|
|
|
|
70
|
return "$month/$year"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Faker::Plugin::PaymentCardExpiration - Payment Card Expiration |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 ABSTRACT |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Payment Card Expiration for Faker |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1.17 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SYNOPSIS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
package main; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
use Faker::Plugin::PaymentCardExpiration; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::PaymentCardExpiration->new; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::PaymentCardExpiration") |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This package provides methods for generating fake data for payment card expiration. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=encoding utf8 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 INHERITS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This package inherits behaviors from: |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 METHODS |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This package provides the following methods: |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 execute |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
execute(HashRef $data) (Str) |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
The execute method returns a returns a random fake payment card expiration. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
I> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=over 4 |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item execute example 1 |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
package main; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
use Faker::Plugin::PaymentCardExpiration; |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::PaymentCardExpiration->new; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::PaymentCardExpiration") |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# "02/24"; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
# "11/23"; |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# my $result = $plugin->execute; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# "09/24"; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=back |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head2 new |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
new(HashRef $data) (Plugin) |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
The new method returns a new instance of the class. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
I> |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=over 4 |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item new example 1 |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
package main; |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
use Faker::Plugin::PaymentCardExpiration; |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
my $plugin = Faker::Plugin::PaymentCardExpiration->new; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
# bless(..., "Faker::Plugin::PaymentCardExpiration") |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=back |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=cut |