Faker/Plugin/InternetIpAddressV6.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Faker/Plugin/InternetIpAddressV4.pm ↑ Summary Faker/Plugin/JaJp/AddressAreaNumber.pm »
1 package Faker::Plugin::InternetIpAddressV6;
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 8 ▶sub execute {
Subroutine execute: called CC=1 SCAR=0.0
Pod documented
19 8 my ($self, $data) = @_;
20  
21 8 my $random = $self->faker->random;
22  
23 8 return join ':',
24 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
25 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
26 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
27 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
28 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
29 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
30 sprintf('%04s', sprintf("%02x", $random->range(0, 65535))),
31 sprintf('%04s', sprintf("%02x", $random->range(0, 65535)));
32 }
33  
34 3 1;
35  
36  
37  
38 =head1 NAME
39  
40 Faker::Plugin::InternetIpAddressV6 - Internet Ip Address V6
41  
42 =cut
43  
44 =head1 ABSTRACT
45  
46 Internet Ip Address V6 for Faker
47  
48 =cut
49  
50 =head1 VERSION
51  
52 1.19
53  
54 =cut
55  
56 =head1 SYNOPSIS
57  
58 package main;
59  
60 use Faker::Plugin::InternetIpAddressV6;
61  
62 my $plugin = Faker::Plugin::InternetIpAddressV6->new;
63  
64 # bless(..., "Faker::Plugin::InternetIpAddressV6")
65  
66 =cut
67  
68 =head1 DESCRIPTION
69  
70 This package provides methods for generating fake data for internet ip address v6.
71  
72 =encoding utf8
73  
74 =cut
75  
76 =head1 INHERITS
77  
78 This package inherits behaviors from:
79  
80 L<Faker::Plugin>
81  
82 =cut
83  
84 =head1 METHODS
85  
86 This package provides the following methods:
87  
88 =cut
89  
90 =head2 execute
91  
92 execute(HashRef $data) (Str)
93  
94 The execute method returns a returns a random fake internet ip address v6.
95  
96 I<Since C<1.10>>
97  
98 =over 4
99  
100 =item execute example 1
101  
102 package main;
103  
104 use Faker::Plugin::InternetIpAddressV6;
105  
106 my $plugin = Faker::Plugin::InternetIpAddressV6->new;
107  
108 # bless(..., "Faker::Plugin::InternetIpAddressV6")
109  
110 # my $result = $plugin->execute;
111  
112 # "57bb:1c70:6c1e:14c3:db3f:7fb1:7a93:b0d9";
113  
114 # my $result = $plugin->execute;
115  
116 # "7680:93e0:88b2:06a0:c512:99e4:e8a9:7d48";
117  
118 # my $result = $plugin->execute;
119  
120 # "7f27:7009:5984:ec03:0f75:dc22:f8d4:d951";
121  
122 =back
123  
124 =cut
125  
126 =head2 new
127  
128 new(HashRef $data) (Plugin)
129  
130 The new method returns a new instance of the class.
131  
132 I<Since C<1.10>>
133  
134 =over 4
135  
136 =item new example 1
137  
138 package main;
139  
140 use Faker::Plugin::InternetIpAddressV6;
141  
142 my $plugin = Faker::Plugin::InternetIpAddressV6->new;
143  
144 # bless(..., "Faker::Plugin::InternetIpAddressV6")
145  
146 =back
147  
148 =cut
149  
150 =head1 AUTHORS
151  
152 Awncorp, C<awncorp@cpan.org>
153  
154 =cut
155  
156 =head1 LICENSE
157  
158 Copyright (C) 2000, Al Newkirk.
159  
160 This program is free software, you can redistribute it and/or modify it under
161 the terms of the Apache license version 2.0.
162  
163 =cut
« Faker/Plugin/InternetIpAddressV4.pm ↑ Summary Faker/Plugin/JaJp/AddressAreaNumber.pm »