| Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/MooseX/Log/Log4perl.pm |
| Statements | Executed 12 statements in 427µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 2.49ms | 27.8ms | MooseX::Log::Log4perl::BEGIN@5 |
| 1 | 1 | 1 | 1.04ms | 8.30ms | MooseX::Log::Log4perl::BEGIN@4 |
| 1 | 1 | 1 | 26µs | 26µs | MooseX::Log::Log4perl::BEGIN@3 |
| 0 | 0 | 0 | 0s | 0s | MooseX::Log::Log4perl::__ANON__[:13] |
| 0 | 0 | 0 | 0s | 0s | MooseX::Log::Log4perl::log |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package MooseX::Log::Log4perl; | ||||
| 2 | |||||
| 3 | 3 | 35µs | 1 | 26µs | # spent 26µs within MooseX::Log::Log4perl::BEGIN@3 which was called:
# once (26µs+0s) by Module::Runtime::require_module at line 3 # spent 26µs making 1 call to MooseX::Log::Log4perl::BEGIN@3 |
| 4 | 3 | 114µs | 2 | 15.5ms | # spent 8.30ms (1.04+7.25) within MooseX::Log::Log4perl::BEGIN@4 which was called:
# once (1.04ms+7.25ms) by Module::Runtime::require_module at line 4 # spent 8.30ms making 1 call to MooseX::Log::Log4perl::BEGIN@4
# spent 7.15ms making 1 call to Any::Moose::import |
| 5 | 3 | 268µs | 2 | 27.8ms | # spent 27.8ms (2.49+25.3) within MooseX::Log::Log4perl::BEGIN@5 which was called:
# once (2.49ms+25.3ms) by Module::Runtime::require_module at line 5 # spent 27.8ms making 1 call to MooseX::Log::Log4perl::BEGIN@5
# spent 9µs making 1 call to Log::Log4perl::import |
| 6 | |||||
| 7 | 1 | 500ns | our $VERSION = '0.45'; | ||
| 8 | |||||
| 9 | has 'logger' => ( | ||||
| 10 | is => 'rw', | ||||
| 11 | isa => 'Log::Log4perl::Logger', | ||||
| 12 | lazy => 1, | ||||
| 13 | default => sub { return Log::Log4perl->get_logger(ref($_[0])) } | ||||
| 14 | 1 | 5µs | 1 | 262µs | ); # spent 262µs making 1 call to Moose::Role::has |
| 15 | |||||
| 16 | sub log { | ||||
| 17 | my $self = shift; | ||||
| 18 | my $cat = shift; | ||||
| 19 | if ($cat && $cat =~ m/^(\.|::)/) { | ||||
| 20 | return Log::Log4perl->get_logger(ref($self) . $cat); | ||||
| 21 | } elsif($cat) { | ||||
| 22 | return Log::Log4perl->get_logger($cat); | ||||
| 23 | } else { | ||||
| 24 | return $self->logger; | ||||
| 25 | } | ||||
| 26 | } | ||||
| 27 | |||||
| 28 | 1 | 4µs | 1; | ||
| 29 | |||||
| 30 | __END__ |