line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pointy::Counter; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
110654
|
use 5.006; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
145
|
|
4
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
492
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our (@EXPORT, @ISA); |
7
|
|
|
|
|
|
|
BEGIN |
8
|
|
|
|
|
|
|
{ |
9
|
4
|
|
|
4
|
|
20
|
require Exporter; |
10
|
4
|
|
|
|
|
66
|
@ISA = qw/Exporter/; |
11
|
4
|
|
|
|
|
12
|
@EXPORT = qw/counter/; |
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
|
|
7
|
$Pointy::Counter::AUTHORITY = 'cpan:TOBYINK'; |
14
|
4
|
|
|
|
|
6
|
$Pointy::Counter::VERSION = '0.001'; |
15
|
|
|
|
|
|
|
|
16
|
4
|
0
|
|
|
|
12
|
eval { require Object::AUTHORITY and import Object::AUTHORITY }; |
|
4
|
|
|
|
|
2414
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use overload |
20
|
26
|
|
|
26
|
|
13076
|
'--' => sub { my ($self) = @_; $$self++ }, |
|
26
|
|
|
|
|
109
|
|
21
|
23
|
|
|
23
|
|
32
|
'>' => sub { my ($self, $other) = @_; $$self < $other }, |
|
23
|
|
|
|
|
60
|
|
22
|
20
|
|
|
20
|
|
2205
|
'""' => sub { my ($self) = @_; $$self }, |
|
20
|
|
|
|
|
168
|
|
23
|
0
|
|
|
0
|
|
0
|
'+0' => sub { my ($self) = @_; $$self }, |
|
0
|
|
|
|
|
0
|
|
24
|
4
|
|
|
|
|
54
|
fallback => 1, |
25
|
4
|
|
|
4
|
|
7148
|
; |
|
4
|
|
|
|
|
4905
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new |
28
|
|
|
|
|
|
|
{ |
29
|
5
|
|
|
5
|
1
|
24
|
my ($class, $initial) = @_; |
30
|
5
|
100
|
|
|
|
22
|
$initial = 0 unless defined $initial; |
31
|
5
|
|
|
|
|
23
|
bless \$initial, $class; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub counter |
35
|
|
|
|
|
|
|
{ |
36
|
4
|
|
|
4
|
1
|
65
|
__PACKAGE__->new(@_); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub continue |
40
|
|
|
|
|
|
|
{ |
41
|
1
|
|
|
1
|
1
|
7
|
my ($self) = @_; |
42
|
1
|
|
|
|
|
3
|
--$$self; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub value :lvalue |
46
|
|
|
|
|
|
|
{ |
47
|
8
|
|
|
8
|
1
|
24
|
my ($self) = shift; |
48
|
8
|
100
|
|
|
|
21
|
$$self = shift if scalar @_; |
49
|
8
|
|
|
|
|
99
|
$$self; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__FILE__ |
53
|
|
|
|
|
|
|
__END__ |