line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Print::Indented; |
2
|
1
|
|
|
1
|
|
749
|
use 5.008005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
13
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
5
|
1
|
|
|
1
|
|
461
|
use Print::Indented::Handle; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
183
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
1
|
|
|
1
|
|
11
|
my $class = shift; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
3
|
my ($pkg) = caller; |
13
|
1
|
50
|
|
|
|
6
|
undef $pkg if $pkg eq 'main'; |
14
|
1
|
50
|
|
|
|
3
|
undef $pkg if grep /^:all$/, @_; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
33
|
|
|
6
|
our $STDOUT ||= Print::Indented::Handle->new(\*STDOUT); |
17
|
1
|
|
33
|
|
|
7
|
our $STDERR ||= Print::Indented::Handle->new(\*STDERR); |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
5
|
my $pkg_re = defined $pkg ? qr/^\Q$pkg\E$/ : qr//; |
20
|
1
|
|
|
|
|
4
|
$_->add_package_re($pkg_re) for $STDOUT, $STDERR; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |