Faker/Plugin/PaymentCardVisa.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 96.0% 24 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Faker/Plugin/PaymentCardMastercard.pm ↑ Summary Faker/Plugin/PaymentVendor.pm »
1 package Faker::Plugin::PaymentCardVisa;
2  
3 3 ▶use 5.018;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use Venus::Class 'base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 base 'Faker::Plugin';
11  
12 # VERSION
13  
14 3 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 return $self->process_markers(
22 $self->faker->random->select(data_for_payment_card_visa()),
23 'numbers',
24 );
25 }
26  
27 10 ▶sub data_for_payment_card_visa {
Subroutine data_for_payment_card_visa: called CC=1 SCAR=0.0
Pod undocumented
28 10 state $payment_card_visa = [
29 '4539########',
30 '4539###########',
31 '4556########',
32 '4556###########',
33 '4916########',
34 '4916###########',
35 '4532########',
36 '4532###########',
37 '4929########',
38 '4929###########',
39 '40240071####',
40 '40240071#######',
41 '4485########',
42 '4485###########',
43 '4716########',
44 '4716###########',
45 '4###########',
46 '4##############',
47 ]
48 }
49  
50 3 1;
51  
52  
53  
54 =head1 NAME
55  
56 Faker::Plugin::PaymentCardVisa - Payment Card Visa
57  
58 =cut
59  
60 =head1 ABSTRACT
61  
62 Payment Card Visa for Faker
63  
64 =cut
65  
66 =head1 VERSION
67  
68 1.19
69  
70 =cut
71  
72 =head1 SYNOPSIS
73  
74 package main;
75  
76 use Faker::Plugin::PaymentCardVisa;
77  
78 my $plugin = Faker::Plugin::PaymentCardVisa->new;
79  
80 # bless(..., "Faker::Plugin::PaymentCardVisa")
81  
82 =cut
83  
84 =head1 DESCRIPTION
85  
86 This package provides methods for generating fake data for payment card visa.
87  
88 =encoding utf8
89  
90 =cut
91  
92 =head1 INHERITS
93  
94 This package inherits behaviors from:
95  
96 L<Faker::Plugin>
97  
98 =cut
99  
100 =head1 METHODS
101  
102 This package provides the following methods:
103  
104 =cut
105  
106 =head2 execute
107  
108 execute(HashRef $data) (Str)
109  
110 The execute method returns a returns a random fake payment card visa.
111  
112 I<Since C<1.10>>
113  
114 =over 4
115  
116 =item execute example 1
117  
118 package main;
119  
120 use Faker::Plugin::PaymentCardVisa;
121  
122 my $plugin = Faker::Plugin::PaymentCardVisa->new;
123  
124 # bless(..., "Faker::Plugin::PaymentCardVisa")
125  
126 # my $result = $plugin->execute;
127  
128 # 453214084468;
129  
130 # my $result = $plugin->execute;
131  
132 # 402400715076;
133  
134 # my $result = $plugin->execute;
135  
136 # 492954439089;
137  
138 =back
139  
140 =cut
141  
142 =head2 new
143  
144 new(HashRef $data) (Plugin)
145  
146 The new method returns a new instance of the class.
147  
148 I<Since C<1.10>>
149  
150 =over 4
151  
152 =item new example 1
153  
154 package main;
155  
156 use Faker::Plugin::PaymentCardVisa;
157  
158 my $plugin = Faker::Plugin::PaymentCardVisa->new;
159  
160 # bless(..., "Faker::Plugin::PaymentCardVisa")
161  
162 =back
163  
164 =cut
165  
166 =head1 AUTHORS
167  
168 Awncorp, C<awncorp@cpan.org>
169  
170 =cut
171  
172 =head1 LICENSE
173  
174 Copyright (C) 2000, Al Newkirk.
175  
176 This program is free software, you can redistribute it and/or modify it under
177 the terms of the Apache license version 2.0.
178  
179 =cut
« Faker/Plugin/PaymentCardMastercard.pm ↑ Summary Faker/Plugin/PaymentVendor.pm »