File Coverage

blib/lib/Acme/MakeMoneyAtHome.pm
Criterion Covered Total %
statement 23 28 82.1
branch 4 10 40.0
condition 1 3 33.3
subroutine 4 4 100.0
pod 0 1 0.0
total 32 46 69.5


line stmt bran cond sub pod time code
1             package Acme::MakeMoneyAtHome;
2             $Acme::MakeMoneyAtHome::VERSION = '1.002001';
3 1     1   18589 use strict; use warnings;
  1     1   2  
  1         29  
  1         3  
  1         2  
  1         21  
4              
5 1     1   4 use Exporter 'import';
  1         3  
  1         449  
6             our @EXPORT = 'make_money_at_home';
7              
8             our @Subject = (
9             "roommate",
10             "cousin",
11             "neighbor",
12             [ "mother", 'F' ],
13             [ "father", 'M' ],
14             [ "sensei", 'M' ],
15             "associate",
16             "senator",
17             "friend",
18             [ "aunt", 'F' ],
19             "employer",
20             "car dealer",
21             [ "housemaid", 'F' ],
22             "limousine driver",
23             "study partner",
24             "roommate",
25             [ "half-sister", 'F' ],
26             [ "step-uncle", 'M' ],
27             "Perl mentor",
28             "third cousin",
29             [ "mother-in-law", 'F' ],
30             [ "father-in-law", 'M' ],
31             "tennis partner",
32             "gym spotter",
33             "statistician",
34             "hairdresser",
35             "dungeon master",
36             "priest",
37             "BFF",
38             [ "sugar daddy", 'M' ],
39             "secret lover",
40             [ "great grandmother", 'F' ],
41             "retarded parakeet",
42             "chemistry assistant",
43             "meth cook",
44             "crippled dog",
45             "deaf cat",
46             "PHP advisor",
47             "personal trainer",
48             "neighbor",
49             "lacrosse teammate",
50             "distant Russian relative",
51             "personal cheerleader",
52             "autistic goldfish",
53             "dishwasher",
54             );
55              
56             our @Activity = (
57             "photoshopping dicks",
58             "browsing 4chan",
59             "posting memes",
60             "mining scamcoins",
61             "browsing CPAN",
62             "avoiding honest work",
63             "being a fucktard on Tumblr",
64             "smoking weed",
65             "scamming people",
66             "writing to Nigerian princes",
67             "collecting reddit karma",
68             "mocking celebrities",
69             "playing Farm Birds on MyFace+",
70             "IRCing",
71             "answering fetish surveys",
72             );
73              
74              
75             sub make_money_at_home {
76 1     1 0 40 my $activity = $Activity[rand @Activity];
77              
78 1         2 my @people;
79 1         1 do {
80 3         5 my $new_subj = $Subject[rand @Subject];
81 3 50 33     6 $new_subj = shift @$new_subj if ref $new_subj and @people < 3;
82 3 50       8 push @people, $new_subj unless grep {; $_ eq $new_subj } @people
  3         9  
83             } until @people == 3;
84              
85 1         3 my $unemploy = (int rand 36) + 4;
86 1         1 my $hourly = (int rand 60) + 40;
87 1         2 my $monthly = (int rand 10_000) + 10_000;
88              
89 1         1 my @gender;
90 1 50       64 if (ref $people[2] eq 'ARRAY') {
91 0         0 $people[2] = shift @{ $people[2] };
  0         0  
92 0         0 my $mf = shift @{ $people[2] };
  0         0  
93 0 0       0 @gender = $mf eq 'M' ? ( 'He', 'his' ) : ( 'She', 'her' );
94             } else {
95 1 50       5 @gender = int rand 2 ? ( 'He', 'his' ) : ( 'She', 'her' );
96             }
97              
98 1         14 "My $people[0]'s $people[1]'s $people[2] makes \$$hourly an hour on the "
99             ."computer. $gender[0] has been without work for $unemploy months but last "
100             ."month $gender[1] pay was \$$monthly from just $activity "
101             ."a few hours per day."
102             }
103              
104             1;
105              
106              
107             =pod
108              
109             =head1 NAME
110              
111             Acme::MakeMoneyAtHome - I made 17047 dollars just posting Acme dists to CPAN
112              
113             =head1 SYNOPSIS
114              
115             use Acme::MakeMoneyAtHome;
116             print make_money_at_home();
117              
118             =head1 DESCRIPTION
119              
120             Exports the function B, which can tell you how
121             much money your father's gym spotter's autistic goldfish made last month just
122             browsing 4chan a few hours per day.
123              
124             =head1 CONTRIBUTORS
125              
126             Perl-ified and maintained by Jon Portnoy
127              
128             This Perl implementation is based on JavaScript written by B, whose
129             real name I'll put here if he ever trusts me enough to tell me.
130              
131             =head1 LICENSE
132              
133             Licensed under the same terms as Perl.
134              
135             =cut