Faker/Plugin/Internet.pm untested

filter: Statementstmt 0.0% 0 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 40 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Faker::Plugin::Internet;
2  
3 use 5.014;
4  
5 use strict;
6 use warnings;
7  
8 use registry;
9 use routines;
10  
11 use Data::Object::Class;
12 use Data::Object::ClassHas;
13  
14 extends 'Data::Object::Plugin';
15  
16 our $VERSION = '1.04'; # VERSION
17  
18 # ATTRIBUTES
19  
20 has 'faker' => (
21 is => 'ro',
22 isa => 'ConsumerOf["Faker::Maker"]',
23 req => 1,
24 );
25  
26 # METHODS
27  
28 method data_for_email_domain() {
29 [
30 'gmail.com',
31 'yahoo.com',
32 'hotmail.com',
33 ]
34 }
35  
36 method data_for_root_domain() {
37 [
38 'biz',
39 'co',
40 'co',
41 'com',
42 'com',
43 'com',
44 'info',
45 'io',
46 'net',
47 'org',
48 ]
49 }
50  
51 method format_for_email() {
52 [
53 '{{person.first_name}}@{{internet.domain_name}}',
54 '{{person.first_name}}-{{person.last_name}}@{{internet.email_domain}}',
55 '{{person.first_name}}.{{person.last_name}}@{{internet.email_domain}}',
56 '{{person.first_name}}@{{company.name}}.{{internet.root_domain}}',
57 '{{person.first_name}}{{person.last_name}}@{{company.name}}.{{internet.root_domain}}',
58 ]
59 }
60  
61 method format_for_url() {
62 [
63 'https://www.{{internet.domain_name}}/',
64 'https://{{internet.domain_name}}/',
65 'http://www.{{internet.domain_name}}/',
66 'http://{{internet.domain_name}}/',
67 ]
68 }
69  
70 1;