Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / PPI / Token / _QuoteEngine / Simple.pm
CommitLineData
3fea05b9 1package PPI::Token::_QuoteEngine::Simple;
2
3# Simple quote engine
4
5use strict;
6use PPI::Token::_QuoteEngine ();
7
8use vars qw{$VERSION @ISA};
9BEGIN {
10 $VERSION = '1.206';
11 @ISA = 'PPI::Token::_QuoteEngine';
12}
13
14sub new {
15 my $class = shift;
16 my $separator = shift or return undef;
17
18 # Create a new token containing the separator
19 ### This manual SUPER'ing ONLY works because none of
20 ### Token::Quote, Token::QuoteLike and Token::Regexp
21 ### implement a new function of their own.
22 my $self = PPI::Token::new( $class, $separator ) or return undef;
23 $self->{separator} = $separator;
24
25 $self;
26}
27
28sub _fill {
29 my $class = shift;
30 my $t = shift;
31 my $self = $t->{token} or return undef;
32
33 # Scan for the end separator
34 my $string = $self->_scan_for_unescaped_character( $t, $self->{separator} );
35 return undef unless defined $string;
36 if ( ref $string ) {
37 # End of file
38 $self->{content} .= $$string;
39 return 0;
40 } else {
41 # End of string
42 $self->{content} .= $string;
43 return $self;
44 }
45}
46
471;
48
49=pod
50
51=head1 SUPPORT
52
53See the L<support section|PPI/SUPPORT> in the main module.
54
55=head1 AUTHOR
56
57Adam Kennedy E<lt>adamk@cpan.orgE<gt>
58
59=head1 COPYRIGHT
60
61Copyright 2001 - 2009 Adam Kennedy.
62
63This program is free software; you can redistribute
64it and/or modify it under the same terms as Perl itself.
65
66The full text of the license can be found in the
67LICENSE file included with this module.
68
69=cut