| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Token/Cast.pm |
| Statements | Executed 70 statements in 409µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 61 | 1 | 1 | 392µs | 654µs | PPI::Token::Cast::__TOKENIZER__on_char |
| 1 | 1 | 1 | 11µs | 23µs | PPI::Token::Cast::BEGIN@34 |
| 1 | 1 | 1 | 8µs | 8µs | PPI::Token::Cast::BEGIN@38 |
| 1 | 1 | 1 | 6µs | 34µs | PPI::Token::Cast::BEGIN@37 |
| 1 | 1 | 1 | 3µs | 3µs | PPI::Token::Cast::BEGIN@35 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package PPI::Token::Cast; | ||||
| 2 | |||||
| 3 | =pod | ||||
| 4 | |||||
| 5 | =head1 NAME | ||||
| 6 | |||||
| 7 | PPI::Token::Cast - A prefix which forces a value into a different context | ||||
| 8 | |||||
| 9 | =head1 INHERITANCE | ||||
| 10 | |||||
| 11 | PPI::Token::Cast | ||||
| 12 | isa PPI::Token | ||||
| 13 | isa PPI::Element | ||||
| 14 | |||||
| 15 | =head1 DESCRIPTION | ||||
| 16 | |||||
| 17 | A "cast" in PPI terms is one of more characters used as a prefix which force | ||||
| 18 | a value into a different class or context. | ||||
| 19 | |||||
| 20 | This includes referencing, dereferencing, and a few other minor cases. | ||||
| 21 | |||||
| 22 | For expressions such as C<@$foo> or C<@{ $foo{bar} }> the C<@> in both cases | ||||
| 23 | represents a cast. In this case, an array dereference. | ||||
| 24 | |||||
| 25 | =head1 METHODS | ||||
| 26 | |||||
| 27 | There are no additional methods beyond those provided by the parent | ||||
| 28 | L<PPI::Token> and L<PPI::Element> classes. | ||||
| 29 | |||||
| 30 | Got any ideas for methods? Submit a report to rt.cpan.org! | ||||
| 31 | |||||
| 32 | =cut | ||||
| 33 | |||||
| 34 | 2 | 28µs | 2 | 35µs | # spent 23µs (11+12) within PPI::Token::Cast::BEGIN@34 which was called:
# once (11µs+12µs) by PPI::Token::BEGIN@67 at line 34 # spent 23µs making 1 call to PPI::Token::Cast::BEGIN@34
# spent 12µs making 1 call to strict::import |
| 35 | 2 | 19µs | 1 | 3µs | # spent 3µs within PPI::Token::Cast::BEGIN@35 which was called:
# once (3µs+0s) by PPI::Token::BEGIN@67 at line 35 # spent 3µs making 1 call to PPI::Token::Cast::BEGIN@35 |
| 36 | |||||
| 37 | 2 | 36µs | 2 | 62µs | # spent 34µs (6+28) within PPI::Token::Cast::BEGIN@37 which was called:
# once (6µs+28µs) by PPI::Token::BEGIN@67 at line 37 # spent 34µs making 1 call to PPI::Token::Cast::BEGIN@37
# spent 28µs making 1 call to vars::import |
| 38 | # spent 8µs within PPI::Token::Cast::BEGIN@38 which was called:
# once (8µs+0s) by PPI::Token::BEGIN@67 at line 41 | ||||
| 39 | 1 | 300ns | $VERSION = '1.215'; | ||
| 40 | 1 | 8µs | @ISA = 'PPI::Token'; | ||
| 41 | 1 | 45µs | 1 | 8µs | } # spent 8µs making 1 call to PPI::Token::Cast::BEGIN@38 |
| 42 | |||||
| - - | |||||
| 46 | ##################################################################### | ||||
| 47 | # Tokenizer Methods | ||||
| 48 | |||||
| 49 | # A cast is either % @ $ or $# | ||||
| 50 | # spent 654µs (392+262) within PPI::Token::Cast::__TOKENIZER__on_char which was called 61 times, avg 11µs/call:
# 61 times (392µs+262µs) by PPI::Tokenizer::_process_next_char at line 554 of PPI/Tokenizer.pm, avg 11µs/call | ||||
| 51 | 61 | 271µs | 122 | 262µs | $_[1]->_finalize_token->__TOKENIZER__on_char( $_[1] ); # spent 137µs making 61 calls to PPI::Token::Whitespace::__TOKENIZER__on_char, avg 2µs/call
# spent 125µs making 61 calls to PPI::Tokenizer::_finalize_token, avg 2µs/call |
| 52 | } | ||||
| 53 | |||||
| 54 | 1 | 2µs | 1; | ||
| 55 | |||||
| 56 | =pod | ||||
| 57 | |||||
| 58 | =head1 SUPPORT | ||||
| 59 | |||||
| 60 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
| 61 | |||||
| 62 | =head1 AUTHOR | ||||
| 63 | |||||
| 64 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
| 65 | |||||
| 66 | =head1 COPYRIGHT | ||||
| 67 | |||||
| 68 | Copyright 2001 - 2011 Adam Kennedy. | ||||
| 69 | |||||
| 70 | This program is free software; you can redistribute | ||||
| 71 | it and/or modify it under the same terms as Perl itself. | ||||
| 72 | |||||
| 73 | The full text of the license can be found in the | ||||
| 74 | LICENSE file included with this module. | ||||
| 75 | |||||
| 76 | =cut |