line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Monad::Singleton; |
2
|
1
|
|
|
1
|
|
383
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
438
|
use parent qw/Data::Monad::Base::Monad/; |
|
1
|
|
|
|
|
312
|
|
|
1
|
|
|
|
|
4
|
|
5
|
1
|
|
|
1
|
|
40
|
use Exporter qw/import/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
93
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw/singleton/; |
8
|
|
|
|
|
|
|
|
9
|
19
|
|
|
19
|
1
|
1849
|
sub singleton { __PACKAGE__->new } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $instance = bless \(my $x = '*'), __PACKAGE__; |
12
|
19
|
|
|
19
|
1
|
76
|
sub new { $instance } |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
1
|
4
|
sub unit { singleton } |
15
|
|
|
|
|
|
|
|
16
|
8
|
|
|
8
|
1
|
11
|
sub flat_map { singleton } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__END__ |