line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pinwheel::View::Wrap::Scalar; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
43578
|
use strict; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
322
|
|
4
|
9
|
|
|
9
|
|
48
|
use warnings; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
284
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
47
|
use Carp qw(croak); |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
3674
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTOLOAD; |
9
|
|
|
|
|
|
|
our @WRAP_METHODS = qw(strip upcase downcase length size); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub strip |
13
|
|
|
|
|
|
|
{ |
14
|
5
|
|
|
5
|
0
|
23
|
my $s = $_[1]; |
15
|
5
|
|
|
|
|
25
|
$s =~ s/^\s+|\s+$//g; |
16
|
5
|
|
|
|
|
26
|
return $s; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub upcase |
20
|
|
|
|
|
|
|
{ |
21
|
2
|
|
|
2
|
0
|
488
|
return uc($_[1]); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub downcase |
25
|
|
|
|
|
|
|
{ |
26
|
2
|
|
|
2
|
0
|
9
|
return lc($_[1]); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub length |
30
|
|
|
|
|
|
|
{ |
31
|
9
|
|
|
9
|
0
|
545
|
return CORE::length($_[1]); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
*size = *length; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub AUTOLOAD |
37
|
|
|
|
|
|
|
{ |
38
|
3
|
|
|
3
|
|
1131
|
my ($name); |
39
|
|
|
|
|
|
|
|
40
|
3
|
|
|
|
|
6
|
$name = $AUTOLOAD; |
41
|
3
|
|
|
|
|
16
|
$name =~ s/.*:://; |
42
|
3
|
100
|
|
|
|
397
|
croak "Bad scalar method '$name'" unless $name =~ /[A-Z]/; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |