| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Token/_QuoteEngine/Simple.pm |
| Statements | Executed 21875 statements in 41.5ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1682 | 1 | 1 | 18.3ms | 23.6ms | PPI::Token::_QuoteEngine::Simple::new |
| 1682 | 1 | 1 | 15.6ms | 61.4ms | PPI::Token::_QuoteEngine::Simple::_fill |
| 1 | 1 | 1 | 687µs | 739µs | PPI::Token::_QuoteEngine::Simple::BEGIN@6 |
| 1 | 1 | 1 | 11µs | 22µs | PPI::Token::_QuoteEngine::Simple::BEGIN@5 |
| 1 | 1 | 1 | 8µs | 8µs | PPI::Token::_QuoteEngine::Simple::BEGIN@9 |
| 1 | 1 | 1 | 7µs | 36µs | PPI::Token::_QuoteEngine::Simple::BEGIN@8 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package PPI::Token::_QuoteEngine::Simple; | ||||
| 2 | |||||
| 3 | # Simple quote engine | ||||
| 4 | |||||
| 5 | 2 | 19µs | 2 | 34µs | # spent 22µs (11+12) within PPI::Token::_QuoteEngine::Simple::BEGIN@5 which was called:
# once (11µs+12µs) by PPI::Token::Quote::Double::BEGIN@37 at line 5 # spent 22µs making 1 call to PPI::Token::_QuoteEngine::Simple::BEGIN@5
# spent 12µs making 1 call to strict::import |
| 6 | 2 | 98µs | 1 | 739µs | # spent 739µs (687+52) within PPI::Token::_QuoteEngine::Simple::BEGIN@6 which was called:
# once (687µs+52µs) by PPI::Token::Quote::Double::BEGIN@37 at line 6 # spent 739µs making 1 call to PPI::Token::_QuoteEngine::Simple::BEGIN@6 |
| 7 | |||||
| 8 | 2 | 29µs | 2 | 65µs | # spent 36µs (7+29) within PPI::Token::_QuoteEngine::Simple::BEGIN@8 which was called:
# once (7µs+29µs) by PPI::Token::Quote::Double::BEGIN@37 at line 8 # spent 36µs making 1 call to PPI::Token::_QuoteEngine::Simple::BEGIN@8
# spent 29µs making 1 call to vars::import |
| 9 | # spent 8µs within PPI::Token::_QuoteEngine::Simple::BEGIN@9 which was called:
# once (8µs+0s) by PPI::Token::Quote::Double::BEGIN@37 at line 12 | ||||
| 10 | 1 | 300ns | $VERSION = '1.215'; | ||
| 11 | 1 | 9µs | @ISA = 'PPI::Token::_QuoteEngine'; | ||
| 12 | 1 | 108µs | 1 | 8µs | } # spent 8µs making 1 call to PPI::Token::_QuoteEngine::Simple::BEGIN@9 |
| 13 | |||||
| 14 | # spent 23.6ms (18.3+5.37) within PPI::Token::_QuoteEngine::Simple::new which was called 1682 times, avg 14µs/call:
# 1682 times (18.3ms+5.37ms) by PPI::Tokenizer::_new_token at line 623 of PPI/Tokenizer.pm, avg 14µs/call | ||||
| 15 | 1682 | 506µs | my $class = shift; | ||
| 16 | 1682 | 541µs | my $separator = shift or return undef; | ||
| 17 | |||||
| 18 | # Create a new token containing the separator | ||||
| 19 | ### This manual SUPER'ing ONLY works because none of | ||||
| 20 | ### Token::Quote, Token::QuoteLike and Token::Regexp | ||||
| 21 | ### implement a new function of their own. | ||||
| 22 | 1682 | 7.49ms | 3364 | 5.37ms | my $self = PPI::Token::new( $class, $separator ) or return undef; # spent 4.04ms making 1682 calls to PPI::Token::new, avg 2µs/call
# spent 1.33ms making 1682 calls to PPI::Util::TRUE, avg 788ns/call |
| 23 | 1682 | 1.49ms | $self->{separator} = $separator; | ||
| 24 | |||||
| 25 | 1682 | 9.57ms | $self; | ||
| 26 | } | ||||
| 27 | |||||
| 28 | # spent 61.4ms (15.6+45.8) within PPI::Token::_QuoteEngine::Simple::_fill which was called 1682 times, avg 37µs/call:
# 1682 times (15.6ms+45.8ms) by PPI::Token::_QuoteEngine::__TOKENIZER__on_char at line 51 of PPI/Token/_QuoteEngine.pm, avg 37µs/call | ||||
| 29 | 1682 | 365µs | my $class = shift; | ||
| 30 | 1682 | 181µs | my $t = shift; | ||
| 31 | 1682 | 4.76ms | 1682 | 890µs | my $self = $t->{token} or return undef; # spent 890µs making 1682 calls to PPI::Util::TRUE, avg 529ns/call |
| 32 | |||||
| 33 | # Scan for the end separator | ||||
| 34 | 1682 | 3.60ms | 1682 | 44.9ms | my $string = $self->_scan_for_unescaped_character( $t, $self->{separator} ); # spent 44.9ms making 1682 calls to PPI::Token::_QuoteEngine::_scan_for_unescaped_character, avg 27µs/call |
| 35 | 1682 | 321µs | return undef unless defined $string; | ||
| 36 | 1682 | 523µs | if ( ref $string ) { | ||
| 37 | # End of file | ||||
| 38 | $self->{content} .= $$string; | ||||
| 39 | return 0; | ||||
| 40 | } else { | ||||
| 41 | # End of string | ||||
| 42 | 1682 | 1.22ms | $self->{content} .= $string; | ||
| 43 | 1682 | 10.7ms | return $self; | ||
| 44 | } | ||||
| 45 | } | ||||
| 46 | |||||
| 47 | 1 | 2µs | 1; | ||
| 48 | |||||
| 49 | =pod | ||||
| 50 | |||||
| 51 | =head1 SUPPORT | ||||
| 52 | |||||
| 53 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
| 54 | |||||
| 55 | =head1 AUTHOR | ||||
| 56 | |||||
| 57 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
| 58 | |||||
| 59 | =head1 COPYRIGHT | ||||
| 60 | |||||
| 61 | Copyright 2001 - 2011 Adam Kennedy. | ||||
| 62 | |||||
| 63 | This program is free software; you can redistribute | ||||
| 64 | it and/or modify it under the same terms as Perl itself. | ||||
| 65 | |||||
| 66 | The full text of the license can be found in the | ||||
| 67 | LICENSE file included with this module. | ||||
| 68 | |||||
| 69 | =cut |