1 package PPI::Token::Data;
7 PPI::Token::Data - The actual data in the __DATA__ section of a file
17 The C<PPI::Token::Data> class is used to represent the actual data inside
18 a file's C<__DATA__> section.
20 One C<PPI::Token::Data> object is used to represent the entire of the data,
21 primarily so that it can provide a convenient handle directly to the data.
25 C<PPI::Token::Data> provides one method in addition to those provided by
26 our parent L<PPI::Token> and L<PPI::Element> classes.
34 use vars qw{$VERSION @ISA};
44 #####################################################################
51 The C<handle> method returns a L<IO::String> handle that allows you
52 to do all the normal handle-y things to the contents of the __DATA__
55 Unlike in perl itself, this means you can also do things like C<print>
56 new data onto the end of the __DATA__ section, or modify it with
57 any other process that can accept an L<IO::Handle> as input or output.
59 Returns an L<IO::String> object.
65 IO::String->new( \$self->{content} );
68 sub __TOKENIZER__on_char { 1 }
76 See the L<support section|PPI/SUPPORT> in the main module.
80 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
84 Copyright 2001 - 2009 Adam Kennedy.
86 This program is free software; you can redistribute
87 it and/or modify it under the same terms as Perl itself.
89 The full text of the license can be found in the
90 LICENSE file included with this module.