← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:14 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/PPIx/Regexp/Token/Whitespace.pm
StatementsExecuted 10 statements in 197µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11112µs24µsPPIx::Regexp::Token::Whitespace::::BEGIN@35PPIx::Regexp::Token::Whitespace::BEGIN@35
11111µs16µsPPIx::Regexp::Token::Whitespace::::BEGIN@36PPIx::Regexp::Token::Whitespace::BEGIN@36
1117µs30µsPPIx::Regexp::Token::Whitespace::::BEGIN@40PPIx::Regexp::Token::Whitespace::BEGIN@40
1117µs60µsPPIx::Regexp::Token::Whitespace::::BEGIN@38PPIx::Regexp::Token::Whitespace::BEGIN@38
0000s0sPPIx::Regexp::Token::Whitespace::::__PPIX_TOKEN__post_makePPIx::Regexp::Token::Whitespace::__PPIX_TOKEN__post_make
0000s0sPPIx::Regexp::Token::Whitespace::::can_be_quantifiedPPIx::Regexp::Token::Whitespace::can_be_quantified
0000s0sPPIx::Regexp::Token::Whitespace::::perl_version_introducedPPIx::Regexp::Token::Whitespace::perl_version_introduced
0000s0sPPIx::Regexp::Token::Whitespace::::significantPPIx::Regexp::Token::Whitespace::significant
0000s0sPPIx::Regexp::Token::Whitespace::::whitespacePPIx::Regexp::Token::Whitespace::whitespace
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1=head1 NAME
2
3PPIx::Regexp::Token::Whitespace - Represent whitespace
4
5=head1 SYNOPSIS
6
7 use PPIx::Regexp::Dumper;
8 PPIx::Regexp::Dumper->new( 'qr{ foo }smx' )
9 ->print();
10
11=head1 INHERITANCE
12
13C<PPIx::Regexp::Token::Whitespace> is a
14L<PPIx::Regexp::Token|PPIx::Regexp::Token>.
15
16C<PPIx::Regexp::Token::Whitespace> has no descendants.
17
18=head1 DESCRIPTION
19
20This class represents whitespace. It will appear inside the regular
21expression only if the /x modifier is present, but it may also appear
22between the type and the opening delimiter (e.g. C<qr {foo}>) or after
23the regular expression in a bracketed substitution (e.g. C<s{foo}
24{bar}>).
25
26=head1 METHODS
27
28This class provides no public methods beyond those provided by its
29superclass.
30
31=cut
32
33package PPIx::Regexp::Token::Whitespace;
34
35220µs236µs
# spent 24µs (12+12) within PPIx::Regexp::Token::Whitespace::BEGIN@35 which was called: # once (12µs+12µs) by PPIx::Regexp::Tokenizer::BEGIN@41 at line 35
use strict;
# spent 24µs making 1 call to PPIx::Regexp::Token::Whitespace::BEGIN@35 # spent 12µs making 1 call to strict::import
36221µs221µs
# spent 16µs (11+5) within PPIx::Regexp::Token::Whitespace::BEGIN@36 which was called: # once (11µs+5µs) by PPIx::Regexp::Tokenizer::BEGIN@41 at line 36
use warnings;
# spent 16µs making 1 call to PPIx::Regexp::Token::Whitespace::BEGIN@36 # spent 5µs making 1 call to warnings::import
37
38226µs2112µs
# spent 60µs (7+53) within PPIx::Regexp::Token::Whitespace::BEGIN@38 which was called: # once (7µs+53µs) by PPIx::Regexp::Tokenizer::BEGIN@41 at line 38
use base qw{ PPIx::Regexp::Token };
# spent 60µs making 1 call to PPIx::Regexp::Token::Whitespace::BEGIN@38 # spent 53µs making 1 call to base::import
39
402127µs253µs
# spent 30µs (7+23) within PPIx::Regexp::Token::Whitespace::BEGIN@40 which was called: # once (7µs+23µs) by PPIx::Regexp::Tokenizer::BEGIN@41 at line 40
use PPIx::Regexp::Constant qw{ COOKIE_REGEX_SET MINIMUM_PERL };
# spent 30µs making 1 call to PPIx::Regexp::Token::Whitespace::BEGIN@40 # spent 23µs making 1 call to Exporter::import
41
421600nsour $VERSION = '0.036';
43
44sub perl_version_introduced {
45 my ( $self ) = @_;
46 return $self->{perl_version_introduced};
47}
48
49sub significant {
50 return;
51}
52
53sub whitespace {
54 return 1;
55}
56
57# Return true if the token can be quantified, and false otherwise
58sub can_be_quantified { return };
59
60# Objects of this class are generated either by the tokenizer itself
61# (when scanning for delimiters) or by PPIx::Regexp::Token::Literal (if
62# it hits a match for \s and finds the regular expression has the /x
63# modifier asserted.
64
65=begin comment
66
67sub __PPIX_TOKENIZER__regexp {
68 my ( $class, $tokenizer, $character ) = @_;
69
70 return scalar $tokenizer->find_regexp( qr{ \A \s+ }smx );
71
72}
73
74=end comment
75
76=cut
77
78sub __PPIX_TOKEN__post_make {
79 my ( $self, $tokenizer, $arg ) = @_;
80
81 $self->{perl_version_introduced} = MINIMUM_PERL;
82
83 # RT #91798.
84 # TODO the above needs to be replaced by the following (suitably
85 # modified) when the non-ASCII white space characters are finally
86 # recognized by Perl.
87
88=begin comment
89
90 if ( ord $self->content() < 128 ) {
91 $self->{perl_version_introduced} = MINIMUM_PERL;
92 } elsif ( $tokenizer && $tokenizer->cookie( COOKIE_REGEX_SET ) ) {
93 $self->{perl_version_introduced} = '5.017008';
94 } else {
95 $self->{perl_version_introduced} = '5.017009';
96 }
97
98=end comment
99
100=cut
101
102 return;
103}
104
10512µs1;
106
107__END__