line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MRP::Text; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
377
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = 1.0; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub pretyArray { |
10
|
0
|
|
|
0
|
1
|
|
my $thingy = shift; |
11
|
0
|
|
|
|
|
|
my $array; |
12
|
|
|
|
|
|
|
my $text; |
13
|
|
|
|
|
|
|
|
14
|
0
|
0
|
0
|
|
|
|
if(@_==1 && "$_[0]" =~ /ARRAY/) { |
15
|
0
|
|
|
|
|
|
$array = shift; |
16
|
|
|
|
|
|
|
} else { |
17
|
0
|
|
|
|
|
|
$array = [@_]; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$text = join ', ', @$array; |
21
|
0
|
|
|
|
|
|
return '('.$text.')'; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub pretyHash { |
25
|
0
|
|
|
0
|
1
|
|
my $thingy = shift; |
26
|
0
|
|
|
|
|
|
my $leader = shift; |
27
|
0
|
|
|
|
|
|
my $hash; |
28
|
0
|
|
|
|
|
|
my $text = ""; |
29
|
0
|
|
|
|
|
|
my ($key,$val); |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
0
|
|
|
|
if(@_==1 && (ref $_[0] eq 'HASH' or "$_[0]" =~/HASH/)) { |
|
|
|
0
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$hash = shift; |
33
|
|
|
|
|
|
|
} else { |
34
|
0
|
|
|
|
|
|
$hash = {@_}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
while( ($key,$val) = each %$hash) { |
38
|
0
|
|
|
|
|
|
$text .= "$leader$key\t=> $val,\n"; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
return $text; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$VERSION; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |