File Coverage

blib/lib/Acme/Tanasinn.pm
Criterion Covered Total %
statement 24 24 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 33 33 100.0


line stmt bran cond sub pod time code
1             package Acme::Tanasinn;
2              
3 1     1   23470 use warnings;
  1         3  
  1         32  
4 1     1   6 use strict;
  1         3  
  1         50  
5              
6 1     1   32 use 5.008;
  1         14  
  1         78  
7              
8              
9             =encoding utf-8
10              
11             =head1 NAME
12              
13             Acme::Tanasinn - Don't think. Feel and you'll be tanasinn.
14              
15             =head1 VERSION
16              
17             Version 0.02
18              
19             =cut
20              
21             our $VERSION = '0.02';
22              
23             =head1 SYNOPSIS
24              
25             use Acme::Tanasinn;
26              
27             my $tanasinn = "Don't think. Feel.\n";
28             print tanasinn($tanasinn);
29              
30             =cut
31              
32             BEGIN
33             {
34 1     1   7 use base 'Exporter';
  1         2  
  1         122  
35 1     1   175 our @EXPORT = ('tanasinn');
36             }
37              
38             =head1 METHODS
39              
40             =head2 tanasinn()
41              
42             tanasinn() will do everything. Leave everything to tanasinn. Tanasinn exports tanasinn.
43              
44             =cut
45              
46             sub tanasinn
47             {
48              
49 1     1 1 208 my $string = shift;
50            
51 1         4 my @replace_range = 1..3;
52              
53 1         3 my $pos = 0;
54 1         2 my $step = '';
55              
56 1         3 while(1)
57             {
58 9 100       28 return $string if $pos >= length($string);
59              
60 8         57 my $count = $replace_range[rand(@replace_range)];
61              
62 8         14 for(1..$count)
63             {
64 14         31 $step .= "\x{2235}";
65             }
66            
67 8         24 substr($string, $pos, length($step), $step);
68              
69 8         19 $pos += length($step) + $replace_range[rand(@replace_range)];
70              
71             }
72              
73             }
74              
75              
76             =head1 AUTHOR
77              
78             The Elitist Superstructure of DQN, L
79              
80             =head1 BUGS
81              
82             P∵∵∵s∵∵∵∵∵r∵∵∵∵b∵∵∵∵∵∵∵∵∵∵∵e∵∵∵∵∵<∵∵∵∵∵∵∵a∵i∵∵∵∵∵∵∵∵∵∵∵o∵∵∵∵∵∵∵∵∵∵∵
83             nt∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵Au∵∵∵∵∵∵g∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵∵. ∵∵∵∵∵∵ n∵∵∵∵∵∵∵d∵∵a∵∵∵∵∵∵ ∵∵∵∵∵∵
84             aut∵∵∵∵∵∵∵∵b∵∵∵∵∵∵∵f∵∵∵∵∵∵s∵∵∵∵∵∵∵∵b∵∵∵∵a∵∵∵∵∵∵∵∵∵∵∵∵∵∵.∵
85              
86             =head1 LICENSE AND COPYRIGHT
87              
88             Copyright 2009 The Elitist Superstructure.
89              
90             This program is free software; you may use this software under the terms of Perl itself,
91             providing you do not affiliate as "Affiliation" carries a connotation that some find unpleasant.
92              
93             =cut
94              
95             1;