PPI/Token/QuoteLike/Regexp.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 4 / 4 totaltotal 100% 32 / 32 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« PPI/Token/QuoteLike/Readline.pm ↑ Summary PPI/Token/Regexp.pm »
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 62 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 62 ▶use PPI::Token::QuoteLike ();
Subroutine BEGIN: called CC=1 SCAR=0.0
34 62 ▶use PPI::Token::_QuoteEngine::Full ();
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 62 ▶use vars qw{$VERSION @ISA};
Subroutine BEGIN: called CC=1 SCAR=0.0
37 BEGIN {
38 62 ▶ $VERSION = '1.236';
Subroutine BEGIN: called CC=1 SCAR=0.0
39 62 @ISA = qw{
40 PPI::Token::_QuoteEngine::Full
41 PPI::Token::QuoteLike
42 };
43 }
44  
45  
46  
47  
48  
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 1 ▶ return $_[0]->_section_content( 0 );
Subroutine get_match_string: called CC=1 SCAR=0.0
Pod documented
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 1 ▶ return undef;
Subroutine get_substitute_string: called CC=1 SCAR=0.0
Pod documented
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 1 ▶ return $_[0]->_modifiers();
Subroutine get_modifiers: called CC=1 SCAR=0.0
Pod documented
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 1 ▶ return $_[0]->_delimiters();
Subroutine get_delimiters: called CC=1 SCAR=0.0
Pod documented
104 }
105  
106 62 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
« PPI/Token/QuoteLike/Readline.pm ↑ Summary PPI/Token/Regexp.pm »