| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPI/Token/QuoteLike/Regexp.pm |
| Statements | Executed 11 statements in 212µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 11µs | 22µs | PPI::Token::QuoteLike::Regexp::BEGIN@32 |
| 1 | 1 | 1 | 10µs | 10µs | PPI::Token::QuoteLike::Regexp::BEGIN@37 |
| 1 | 1 | 1 | 6µs | 33µs | PPI::Token::QuoteLike::Regexp::BEGIN@36 |
| 1 | 1 | 1 | 3µs | 3µs | PPI::Token::QuoteLike::Regexp::BEGIN@33 |
| 1 | 1 | 1 | 3µs | 3µs | PPI::Token::QuoteLike::Regexp::BEGIN@34 |
| 0 | 0 | 0 | 0s | 0s | PPI::Token::QuoteLike::Regexp::get_delimiters |
| 0 | 0 | 0 | 0s | 0s | PPI::Token::QuoteLike::Regexp::get_match_string |
| 0 | 0 | 0 | 0s | 0s | PPI::Token::QuoteLike::Regexp::get_modifiers |
| 0 | 0 | 0 | 0s | 0s | PPI::Token::QuoteLike::Regexp::get_substitute_string |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package PPI::Token::QuoteLike::Regexp; | ||||
| 2 | |||||
| 3 | =pod | ||||
| 4 | |||||
| 5 | =head1 NAME | ||||
| 6 | |||||
| 7 | PPI::Token::QuoteLike::Regexp - Regexp constructor quote-like operator | ||||
| 8 | |||||
| 9 | =head1 INHERITANCE | ||||
| 10 | |||||
| 11 | PPI::Token::QuoteLike::Regexp | ||||
| 12 | isa PPI::Token::QuoteLike | ||||
| 13 | isa PPI::Token | ||||
| 14 | isa PPI::Element | ||||
| 15 | |||||
| 16 | =head1 DESCRIPTION | ||||
| 17 | |||||
| 18 | A C<PPI::Token::QuoteLike::Regexp> object represents the quote-like | ||||
| 19 | operator used to construct anonymous L<Regexp> objects, as follows. | ||||
| 20 | |||||
| 21 | # Create a Regexp object for a module filename | ||||
| 22 | my $module = qr/\.pm$/; | ||||
| 23 | |||||
| 24 | =head1 METHODS | ||||
| 25 | |||||
| 26 | The following methods are provided by this class, | ||||
| 27 | beyond those provided by the parent L<PPI::Token::QuoteLike>, | ||||
| 28 | L<PPI::Token> and L<PPI::Element> classes. | ||||
| 29 | |||||
| 30 | =cut | ||||
| 31 | |||||
| 32 | 2 | 39µs | 2 | 34µs | # spent 22µs (11+11) within PPI::Token::QuoteLike::Regexp::BEGIN@32 which was called:
# once (11µs+11µs) by PPI::Token::BEGIN@60 at line 32 # spent 22µs making 1 call to PPI::Token::QuoteLike::Regexp::BEGIN@32
# spent 11µs making 1 call to strict::import |
| 33 | 2 | 18µs | 1 | 3µs | # spent 3µs within PPI::Token::QuoteLike::Regexp::BEGIN@33 which was called:
# once (3µs+0s) by PPI::Token::BEGIN@60 at line 33 # spent 3µs making 1 call to PPI::Token::QuoteLike::Regexp::BEGIN@33 |
| 34 | 2 | 19µs | 1 | 3µs | # spent 3µs within PPI::Token::QuoteLike::Regexp::BEGIN@34 which was called:
# once (3µs+0s) by PPI::Token::BEGIN@60 at line 34 # spent 3µs making 1 call to PPI::Token::QuoteLike::Regexp::BEGIN@34 |
| 35 | |||||
| 36 | 2 | 28µs | 2 | 61µs | # spent 33µs (6+27) within PPI::Token::QuoteLike::Regexp::BEGIN@36 which was called:
# once (6µs+27µs) by PPI::Token::BEGIN@60 at line 36 # spent 33µs making 1 call to PPI::Token::QuoteLike::Regexp::BEGIN@36
# spent 27µs making 1 call to vars::import |
| 37 | # spent 10µs within PPI::Token::QuoteLike::Regexp::BEGIN@37 which was called:
# once (10µs+0s) by PPI::Token::BEGIN@60 at line 43 | ||||
| 38 | 1 | 400ns | $VERSION = '1.215'; | ||
| 39 | 1 | 10µs | @ISA = qw{ | ||
| 40 | PPI::Token::_QuoteEngine::Full | ||||
| 41 | PPI::Token::QuoteLike | ||||
| 42 | }; | ||||
| 43 | 1 | 96µs | 1 | 10µs | } # spent 10µs making 1 call to PPI::Token::QuoteLike::Regexp::BEGIN@37 |
| 44 | |||||
| - - | |||||
| 49 | ##################################################################### | ||||
| 50 | # PPI::Token::QuoteLike::Regexp Methods | ||||
| 51 | |||||
| 52 | =pod | ||||
| 53 | |||||
| 54 | =head2 get_match_string | ||||
| 55 | |||||
| 56 | The C<get_match_string> method returns the portion of the string that | ||||
| 57 | will be compiled into the match portion of the regexp. | ||||
| 58 | |||||
| 59 | =cut | ||||
| 60 | |||||
| 61 | sub get_match_string { | ||||
| 62 | return $_[0]->_section_content( 0 ); | ||||
| 63 | } | ||||
| 64 | |||||
| 65 | =pod | ||||
| 66 | |||||
| 67 | =head2 get_substitute_string | ||||
| 68 | |||||
| 69 | The C<get_substitute_string> method always returns C<undef>, since | ||||
| 70 | the C<qr{}> construction provides no substitution string. This method | ||||
| 71 | is provided for orthogonality with C<PPI::Token::Regexp>. | ||||
| 72 | |||||
| 73 | =cut | ||||
| 74 | |||||
| 75 | sub get_substitute_string { | ||||
| 76 | return undef; | ||||
| 77 | } | ||||
| 78 | |||||
| 79 | =pod | ||||
| 80 | |||||
| 81 | =head2 get_modifiers | ||||
| 82 | |||||
| 83 | The C<get_modifiers> method returns the modifiers that will be | ||||
| 84 | compiled into the regexp. | ||||
| 85 | |||||
| 86 | =cut | ||||
| 87 | |||||
| 88 | sub get_modifiers { | ||||
| 89 | return $_[0]->_modifiers(); | ||||
| 90 | } | ||||
| 91 | |||||
| 92 | =pod | ||||
| 93 | |||||
| 94 | =head2 get_delimiters | ||||
| 95 | |||||
| 96 | The C<get_delimiters> method returns the delimiters of the string as an | ||||
| 97 | array. The first and only element is the delimiters of the string to be | ||||
| 98 | compiled into a match string. | ||||
| 99 | |||||
| 100 | =cut | ||||
| 101 | |||||
| 102 | sub get_delimiters { | ||||
| 103 | return $_[0]->_delimiters(); | ||||
| 104 | } | ||||
| 105 | |||||
| 106 | 1 | 2µs | 1; | ||
| 107 | |||||
| 108 | =pod | ||||
| 109 | |||||
| 110 | =head1 SUPPORT | ||||
| 111 | |||||
| 112 | See the L<support section|PPI/SUPPORT> in the main module. | ||||
| 113 | |||||
| 114 | =head1 AUTHOR | ||||
| 115 | |||||
| 116 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
| 117 | |||||
| 118 | =head1 COPYRIGHT | ||||
| 119 | |||||
| 120 | Copyright 2001 - 2011 Adam Kennedy. | ||||
| 121 | |||||
| 122 | This program is free software; you can redistribute | ||||
| 123 | it and/or modify it under the same terms as Perl itself. | ||||
| 124 | |||||
| 125 | The full text of the license can be found in the | ||||
| 126 | LICENSE file included with this module. | ||||
| 127 | |||||
| 128 | =cut |