1 package PPI::Token::Quote::Interpolate;
7 PPI::Token::Quote::Interpolate - The interpolation quote-like operator
11 PPI::Token::Quote::Interpolate
18 A C<PPI::Token::Quote::Interpolate> object represents a single
19 interpolation quote-like operator, such as C<qq{$foo bar $baz}>.
23 There are no methods available for C<PPI::Token::Quote::Interpolate>
24 beyond those provided by the parent L<PPI::Token::Quote>, L<PPI::Token> and
25 L<PPI::Element> classes.
27 Got any ideas for methods? Submit a report to rt.cpan.org!
32 use PPI::Token::Quote ();
33 use PPI::Token::_QuoteEngine::Full ();
35 use vars qw{$VERSION @ISA};
39 PPI::Token::_QuoteEngine::Full
48 #####################################################################
49 # PPI::Token::Quote Methods
53 =begin testing string 8
55 my $Document = PPI::Document->new( \"print qq{foo}, qq!bar!, qq <foo>;" );
56 isa_ok( $Document, 'PPI::Document' );
57 my $Interpolate = $Document->find('Token::Quote::Interpolate');
58 is( scalar(@$Interpolate), 3, '->find returns three objects' );
59 isa_ok( $Interpolate->[0], 'PPI::Token::Quote::Interpolate' );
60 isa_ok( $Interpolate->[1], 'PPI::Token::Quote::Interpolate' );
61 isa_ok( $Interpolate->[2], 'PPI::Token::Quote::Interpolate' );
62 is( $Interpolate->[0]->string, 'foo', '->string returns as expected' );
63 is( $Interpolate->[1]->string, 'bar', '->string returns as expected' );
64 is( $Interpolate->[2]->string, 'foo', '->string returns as expected' );
72 my @sections = $self->_sections;
73 my $str = $sections[0];
74 substr( $self->{content}, $str->{position}, $str->{size} );
83 See the L<support section|PPI/SUPPORT> in the main module.
87 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
91 Copyright 2001 - 2009 Adam Kennedy.
93 This program is free software; you can redistribute
94 it and/or modify it under the same terms as Perl itself.
96 The full text of the license can be found in the
97 LICENSE file included with this module.