| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Markdent/Role/DebugPrinter.pm |
| Statements | Executed 20 statements in 1.61ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 76µs | 14.9ms | Markdent::Role::DebugPrinter::BEGIN@12 |
| 1 | 1 | 1 | 55µs | 124µs | Markdent::Role::DebugPrinter::BEGIN@7 |
| 1 | 1 | 1 | 51µs | 51µs | Markdent::Role::DebugPrinter::BEGIN@2 |
| 1 | 1 | 1 | 47µs | 15.4ms | Markdent::Role::DebugPrinter::BEGIN@9 |
| 1 | 1 | 1 | 45µs | 223µs | Markdent::Role::DebugPrinter::BEGIN@11 |
| 1 | 1 | 1 | 39µs | 56µs | Markdent::Role::DebugPrinter::BEGIN@6 |
| 0 | 0 | 0 | 0s | 0s | Markdent::Role::DebugPrinter::_debug_parse_result |
| 0 | 0 | 0 | 0s | 0s | Markdent::Role::DebugPrinter::_print_debug |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Markdent::Role::DebugPrinter; | ||||
| 2 | # spent 51µs within Markdent::Role::DebugPrinter::BEGIN@2 which was called:
# once (51µs+0s) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 4 | ||||
| 3 | 1 | 31µs | $Markdent::Role::DebugPrinter::VERSION = '0.17'; | ||
| 4 | 1 | 78µs | 1 | 51µs | } # spent 51µs making 1 call to Markdent::Role::DebugPrinter::BEGIN@2 |
| 5 | |||||
| 6 | 3 | 94µs | 2 | 73µs | # spent 56µs (39+17) within Markdent::Role::DebugPrinter::BEGIN@6 which was called:
# once (39µs+17µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 6 # spent 56µs making 1 call to Markdent::Role::DebugPrinter::BEGIN@6
# spent 17µs making 1 call to strict::import |
| 7 | 3 | 136µs | 2 | 192µs | # spent 124µs (55+69) within Markdent::Role::DebugPrinter::BEGIN@7 which was called:
# once (55µs+69µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 7 # spent 124µs making 1 call to Markdent::Role::DebugPrinter::BEGIN@7
# spent 68µs making 1 call to warnings::import |
| 8 | |||||
| 9 | 3 | 144µs | 2 | 30.7ms | # spent 15.4ms (47µs+15.3) within Markdent::Role::DebugPrinter::BEGIN@9 which was called:
# once (47µs+15.3ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 9 # spent 15.4ms making 1 call to Markdent::Role::DebugPrinter::BEGIN@9
# spent 15.3ms making 1 call to MooseX::Types::Combine::import |
| 10 | |||||
| 11 | 3 | 103µs | 2 | 402µs | # spent 223µs (45+179) within Markdent::Role::DebugPrinter::BEGIN@11 which was called:
# once (45µs+179µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 11 # spent 223µs making 1 call to Markdent::Role::DebugPrinter::BEGIN@11
# spent 179µs making 1 call to namespace::autoclean::import |
| 12 | 3 | 856µs | 2 | 29.7ms | # spent 14.9ms (76µs+14.8) within Markdent::Role::DebugPrinter::BEGIN@12 which was called:
# once (76µs+14.8ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 12 # spent 14.9ms making 1 call to Markdent::Role::DebugPrinter::BEGIN@12
# spent 14.8ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 13 | |||||
| 14 | 1 | 26µs | 2 | 1.07ms | has debug => ( # spent 723µs making 1 call to Moose::Role::has
# spent 345µs making 1 call to __TYPE__::Bool |
| 15 | is => 'rw', | ||||
| 16 | isa => Bool, | ||||
| 17 | default => $ENV{MARKDENT_DEBUG} || 0, | ||||
| 18 | ); | ||||
| 19 | |||||
| 20 | 1 | 7µs | my $HR1 = q{=} x 70; | ||
| 21 | 1 | 5µs | my $HR2 = q{-} x 70; | ||
| 22 | |||||
| 23 | sub _debug_parse_result { | ||||
| 24 | my $self = shift; | ||||
| 25 | my $text = shift; | ||||
| 26 | my $type = shift; | ||||
| 27 | my $extra = shift || []; | ||||
| 28 | |||||
| 29 | my $msg = '[' . $text . "]\n" . $HR2 . "\n" . ' - ' . $type . "\n"; | ||||
| 30 | while ( @{$extra} ) { | ||||
| 31 | my ( $key, $value ) = splice @{$extra}, 0, 2; | ||||
| 32 | $msg .= sprintf( ' - %-10s : %s', $key, $value ); | ||||
| 33 | $msg .= "\n"; | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | $self->_print_debug($msg); | ||||
| 37 | } | ||||
| 38 | |||||
| 39 | sub _print_debug { | ||||
| 40 | warn $HR1 . "\n" . ( ref $_[0] ) . "\n" . $_[1] . "\n"; | ||||
| 41 | } | ||||
| 42 | |||||
| 43 | 1 | 64µs | 1; | ||
| 44 | |||||
| 45 | # ABSTRACT: A role for classes which output debugging information | ||||
| 46 | |||||
| - - | |||||
| 49 | =pod | ||||
| 50 | |||||
| - - | |||||
| 107 | 1 | 62µs | 1 | 19.9ms | __END__ # spent 19.9ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26] |