PPI/Token/QuoteLike/Regexp.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 4 / 4 totaltotal 100% 27 / 27 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 63 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 63 ▶use PPI::Token::QuoteLike ();
Subroutine BEGIN: called CC=1 SCAR=0.0
34 63 ▶use PPI::Token::_QuoteEngine::Full ();
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 63 our $VERSION = '1.260'; # VERSION
37  
38 63 our @ISA = qw{
39 PPI::Token::_QuoteEngine::Full
40 PPI::Token::QuoteLike
41 };
42  
43  
44  
45  
46  
47 #####################################################################
48 # PPI::Token::QuoteLike::Regexp Methods
49  
50 =pod
51  
52 =head2 get_match_string
53  
54 The C<get_match_string> method returns the portion of the string that
55 will be compiled into the match portion of the regexp.
56  
57 =cut
58  
59 sub get_match_string {
60 1 ▶ return $_[0]->_section_content( 0 );
Subroutine get_match_string: called CC=1 SCAR=0.0
Pod documented
61 }
62  
63 =pod
64  
65 =head2 get_substitute_string
66  
67 The C<get_substitute_string> method always returns C<undef>, since
68 the C<qr{}> construction provides no substitution string. This method
69 is provided for orthogonality with C<PPI::Token::Regexp>.
70  
71 =cut
72  
73 sub get_substitute_string {
74 1 ▶ return undef;
Subroutine get_substitute_string: called CC=1 SCAR=0.0
Pod documented
75 }
76  
77 =pod
78  
79 =head2 get_modifiers
80  
81 The C<get_modifiers> method returns the modifiers that will be
82 compiled into the regexp.
83  
84 =cut
85  
86 sub get_modifiers {
87 1 ▶ return $_[0]->_modifiers();
Subroutine get_modifiers: called CC=1 SCAR=0.0
Pod documented
88 }
89  
90 =pod
91  
92 =head2 get_delimiters
93  
94 The C<get_delimiters> method returns the delimiters of the string as an
95 array. The first and only element is the delimiters of the string to be
96 compiled into a match string.
97  
98 =cut
99  
100 sub get_delimiters {
101 1 ▶ return $_[0]->_delimiters();
Subroutine get_delimiters: called CC=1 SCAR=0.0
Pod documented
102 }
103  
104 63 1;
105  
106 =pod
107  
108 =head1 SUPPORT
109  
110 See the L<support section|PPI/SUPPORT> in the main module.
111  
112 =head1 AUTHOR
113  
114 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
115  
116 =head1 COPYRIGHT
117  
118 Copyright 2001 - 2011 Adam Kennedy.
119  
120 This program is free software; you can redistribute
121 it and/or modify it under the same terms as Perl itself.
122  
123 The full text of the license can be found in the
124 LICENSE file included with this module.
125  
126 =cut
« PPI/Token/QuoteLike/Readline.pm ↑ Summary PPI/Token/Regexp.pm »