| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Markdent/Simple/Document.pm |
| Statements | Executed 29 statements in 11.1ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 7.02ms | 7.16ms | Markdent::Simple::Document::BEGIN@7 |
| 1 | 1 | 1 | 5.23ms | 11.2s | Markdent::Simple::Document::BEGIN@10 |
| 1 | 1 | 1 | 2.14ms | 2.61s | Markdent::Simple::Document::BEGIN@9 |
| 1 | 1 | 1 | 1.59ms | 1.74ms | Markdent::Simple::Document::BEGIN@6 |
| 1 | 1 | 1 | 158µs | 1.18ms | Markdent::Simple::Document::BEGIN@12 |
| 1 | 1 | 1 | 116µs | 308µs | Markdent::Simple::Document::BEGIN@14 |
| 1 | 1 | 1 | 93µs | 93µs | Markdent::Simple::Document::BEGIN@2 |
| 1 | 1 | 1 | 58µs | 17.7ms | Markdent::Simple::Document::BEGIN@11 |
| 1 | 1 | 1 | 47µs | 25.2ms | Markdent::Simple::Document::BEGIN@16 |
| 1 | 1 | 1 | 44µs | 23.3ms | Markdent::Simple::Document::BEGIN@15 |
| 0 | 0 | 0 | 0s | 0s | Markdent::Simple::Document::markdown_to_html |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Markdent::Simple::Document; | ||||
| 2 | # spent 93µs within Markdent::Simple::Document::BEGIN@2 which was called:
# once (93µs+0s) by main::BEGIN@0 at line 4 | ||||
| 3 | 1 | 77µs | $Markdent::Simple::Document::VERSION = '0.17'; | ||
| 4 | 1 | 166µs | 1 | 93µs | } # spent 93µs making 1 call to Markdent::Simple::Document::BEGIN@2 |
| 5 | |||||
| 6 | 3 | 1.53ms | 2 | 1.77ms | # spent 1.74ms (1.59+156µs) within Markdent::Simple::Document::BEGIN@6 which was called:
# once (1.59ms+156µs) by main::BEGIN@0 at line 6 # spent 1.74ms making 1 call to Markdent::Simple::Document::BEGIN@6
# spent 23µs making 1 call to strict::import |
| 7 | 3 | 6.60ms | 2 | 7.24ms | # spent 7.16ms (7.02+147µs) within Markdent::Simple::Document::BEGIN@7 which was called:
# once (7.02ms+147µs) by main::BEGIN@0 at line 7 # spent 7.16ms making 1 call to Markdent::Simple::Document::BEGIN@7
# spent 76µs making 1 call to warnings::import |
| 8 | |||||
| 9 | 3 | 700µs | 1 | 2.61s | # spent 2.61s (2.14ms+2.61) within Markdent::Simple::Document::BEGIN@9 which was called:
# once (2.14ms+2.61s) by main::BEGIN@0 at line 9 # spent 2.61s making 1 call to Markdent::Simple::Document::BEGIN@9 |
| 10 | 3 | 610µs | 1 | 11.2s | # spent 11.2s (5.23ms+11.2) within Markdent::Simple::Document::BEGIN@10 which was called:
# once (5.23ms+11.2s) by main::BEGIN@0 at line 10 # spent 11.2s making 1 call to Markdent::Simple::Document::BEGIN@10 |
| 11 | 3 | 222µs | 2 | 35.4ms | # spent 17.7ms (58µs+17.7) within Markdent::Simple::Document::BEGIN@11 which was called:
# once (58µs+17.7ms) by main::BEGIN@0 at line 11 # spent 17.7ms making 1 call to Markdent::Simple::Document::BEGIN@11
# spent 17.7ms making 1 call to MooseX::Types::Combine::import |
| 12 | 3 | 242µs | 2 | 2.20ms | # spent 1.18ms (158µs+1.02) within Markdent::Simple::Document::BEGIN@12 which was called:
# once (158µs+1.02ms) by main::BEGIN@0 at line 12 # spent 1.18ms making 1 call to Markdent::Simple::Document::BEGIN@12
# spent 1.02ms making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] |
| 13 | |||||
| 14 | 3 | 114µs | 2 | 500µs | # spent 308µs (116+192) within Markdent::Simple::Document::BEGIN@14 which was called:
# once (116µs+192µs) by main::BEGIN@0 at line 14 # spent 308µs making 1 call to Markdent::Simple::Document::BEGIN@14
# spent 192µs making 1 call to namespace::autoclean::import |
| 15 | 3 | 157µs | 2 | 46.5ms | # spent 23.3ms (44µs+23.2) within Markdent::Simple::Document::BEGIN@15 which was called:
# once (44µs+23.2ms) by main::BEGIN@0 at line 15 # spent 23.3ms making 1 call to Markdent::Simple::Document::BEGIN@15
# spent 23.2ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 16 | 3 | 616µs | 2 | 50.3ms | # spent 25.2ms (47µs+25.1) within Markdent::Simple::Document::BEGIN@16 which was called:
# once (47µs+25.1ms) by main::BEGIN@0 at line 16 # spent 25.2ms making 1 call to Markdent::Simple::Document::BEGIN@16
# spent 25.1ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 17 | |||||
| 18 | sub markdown_to_html { | ||||
| 19 | my $self = shift; | ||||
| 20 | my ( $dialect, $title, $markdown ) = validated_list( | ||||
| 21 | \@_, | ||||
| 22 | dialect => { isa => Str, default => 'Standard' }, | ||||
| 23 | title => { isa => Str }, | ||||
| 24 | markdown => { isa => Str }, | ||||
| 25 | ); | ||||
| 26 | |||||
| 27 | my $capture = q{}; | ||||
| 28 | open my $fh, '>', \$capture | ||||
| 29 | or die $!; | ||||
| 30 | |||||
| 31 | my $handler = Markdent::Handler::HTMLStream::Document->new( | ||||
| 32 | title => $title, | ||||
| 33 | output => $fh, | ||||
| 34 | ); | ||||
| 35 | |||||
| 36 | my $parser | ||||
| 37 | = Markdent::Parser->new( dialect => $dialect, handler => $handler ); | ||||
| 38 | |||||
| 39 | $parser->parse( markdown => $markdown ); | ||||
| 40 | |||||
| 41 | return $capture; | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | 1 | 11µs | 1; | ||
| 45 | |||||
| 46 | # ABSTRACT: Convert Markdown to an HTML Document | ||||
| 47 | |||||
| - - | |||||
| 50 | =pod | ||||
| 51 | |||||
| - - | |||||
| 108 | 1 | 58µs | 1 | 18.7ms | __END__ # spent 18.7ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26] |