| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Markdent/Role/AnyParser.pm |
| Statements | Executed 16 statements in 1.68ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 51µs | 51µs | Markdent::Role::AnyParser::BEGIN@2 |
| 1 | 1 | 1 | 42µs | 14.7ms | Markdent::Role::AnyParser::BEGIN@10 |
| 1 | 1 | 1 | 41µs | 57µs | Markdent::Role::AnyParser::BEGIN@6 |
| 1 | 1 | 1 | 40µs | 145µs | Markdent::Role::AnyParser::BEGIN@7 |
| 1 | 1 | 1 | 39µs | 221µs | Markdent::Role::AnyParser::BEGIN@9 |
| 0 | 0 | 0 | 0s | 0s | Markdent::Role::AnyParser::_debug_look_for |
| 0 | 0 | 0 | 0s | 0s | Markdent::Role::AnyParser::_detab_text |
| 0 | 0 | 0 | 0s | 0s | Markdent::Role::AnyParser::_make_event |
| 0 | 0 | 0 | 0s | 0s | Markdent::Role::AnyParser::_send_event |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Markdent::Role::AnyParser; | ||||
| 2 | # spent 51µs within Markdent::Role::AnyParser::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 | 30µs | $Markdent::Role::AnyParser::VERSION = '0.17'; | ||
| 4 | 1 | 78µs | 1 | 51µs | } # spent 51µs making 1 call to Markdent::Role::AnyParser::BEGIN@2 |
| 5 | |||||
| 6 | 3 | 96µs | 2 | 74µs | # spent 57µs (41+17) within Markdent::Role::AnyParser::BEGIN@6 which was called:
# once (41µ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 57µs making 1 call to Markdent::Role::AnyParser::BEGIN@6
# spent 17µs making 1 call to strict::import |
| 7 | 3 | 103µs | 2 | 250µs | # spent 145µs (40+105) within Markdent::Role::AnyParser::BEGIN@7 which was called:
# once (40µs+105µ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 145µs making 1 call to Markdent::Role::AnyParser::BEGIN@7
# spent 105µs making 1 call to warnings::import |
| 8 | |||||
| 9 | 3 | 102µs | 2 | 402µs | # spent 221µs (39+182) within Markdent::Role::AnyParser::BEGIN@9 which was called:
# once (39µs+182µ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 9 # spent 221µs making 1 call to Markdent::Role::AnyParser::BEGIN@9
# spent 182µs making 1 call to namespace::autoclean::import |
| 10 | 3 | 1.13ms | 2 | 29.3ms | # spent 14.7ms (42µs+14.7) within Markdent::Role::AnyParser::BEGIN@10 which was called:
# once (42µs+14.7ms) 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 10 # spent 14.7ms making 1 call to Markdent::Role::AnyParser::BEGIN@10
# spent 14.7ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 11 | |||||
| 12 | 1 | 18µs | 1 | 60.3ms | with 'Markdent::Role::DebugPrinter'; # spent 60.3ms making 1 call to Moose::Role::with |
| 13 | |||||
| 14 | 1 | 16µs | 1 | 689µs | has handler => ( # spent 689µs making 1 call to Moose::Role::has |
| 15 | is => 'ro', | ||||
| 16 | does => 'Markdent::Role::Handler', | ||||
| 17 | required => 1, | ||||
| 18 | ); | ||||
| 19 | |||||
| 20 | sub _send_event { | ||||
| 21 | my $self = shift; | ||||
| 22 | |||||
| 23 | $self->handler()->handle_event( $self->_make_event(@_) ); | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | sub _make_event { | ||||
| 27 | my $self = shift; | ||||
| 28 | my $class = shift; | ||||
| 29 | |||||
| 30 | my $real_class = $class =~ /::/ ? $class : 'Markdent::Event::' . $class; | ||||
| 31 | |||||
| 32 | return $real_class->new(@_); | ||||
| 33 | } | ||||
| 34 | |||||
| 35 | sub _detab_text { | ||||
| 36 | my $self = shift; | ||||
| 37 | my $text = shift; | ||||
| 38 | |||||
| 39 | # Ripped off from Text::Mardkown | ||||
| 40 | ${$text} =~ s{ ^ | ||||
| 41 | (.*?) | ||||
| 42 | \t | ||||
| 43 | } | ||||
| 44 | { $1 . (q{ } x (4 - length($1) % 4))}xmge; | ||||
| 45 | |||||
| 46 | return; | ||||
| 47 | } | ||||
| 48 | |||||
| 49 | sub _debug_look_for { | ||||
| 50 | my $self = shift; | ||||
| 51 | |||||
| 52 | return unless $self->debug(); | ||||
| 53 | |||||
| 54 | my @look_debug = map { ref $_ ? "$_->[0] ($_->[1])" : $_ } @_; | ||||
| 55 | |||||
| 56 | my $msg = "Looking for the following possible matches:\n"; | ||||
| 57 | $msg .= " - $_\n" for @look_debug; | ||||
| 58 | |||||
| 59 | $self->_print_debug($msg); | ||||
| 60 | } | ||||
| 61 | |||||
| 62 | 1 | 49µs | 1; | ||
| 63 | |||||
| 64 | # ABSTRACT: A role for block and span parsers | ||||
| 65 | |||||
| - - | |||||
| 68 | =pod | ||||
| 69 | |||||
| - - | |||||
| 123 | 1 | 59µs | 1 | 18.6ms | __END__ # spent 18.6ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26] |