Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / PPI / Token / Data.pm
CommitLineData
3fea05b9 1package PPI::Token::Data;
2
3=pod
4
5=head1 NAME
6
7PPI::Token::Data - The actual data in the __DATA__ section of a file
8
9=head1 INHERITANCE
10
11 PPI::Token::Data
12 isa PPI::Token
13 isa PPI::Element
14
15=head1 DESCRIPTION
16
17The C<PPI::Token::Data> class is used to represent the actual data inside
18a file's C<__DATA__> section.
19
20One C<PPI::Token::Data> object is used to represent the entire of the data,
21primarily so that it can provide a convenient handle directly to the data.
22
23=head1 METHODS
24
25C<PPI::Token::Data> provides one method in addition to those provided by
26our parent L<PPI::Token> and L<PPI::Element> classes.
27
28=cut
29
30use strict;
31use IO::String ();
32use PPI::Token ();
33
34use vars qw{$VERSION @ISA};
35BEGIN {
36 $VERSION = '1.206';
37 @ISA = 'PPI::Token';
38}
39
40
41
42
43
44#####################################################################
45# Methods
46
47=pod
48
49=head2 handle
50
51The C<handle> method returns a L<IO::String> handle that allows you
52to do all the normal handle-y things to the contents of the __DATA__
53section of the file.
54
55Unlike in perl itself, this means you can also do things like C<print>
56new data onto the end of the __DATA__ section, or modify it with
57any other process that can accept an L<IO::Handle> as input or output.
58
59Returns an L<IO::String> object.
60
61=cut
62
63sub handle {
64 my $self = shift;
65 IO::String->new( \$self->{content} );
66}
67
68sub __TOKENIZER__on_char { 1 }
69
701;
71
72=pod
73
74=head1 SUPPORT
75
76See the L<support section|PPI/SUPPORT> in the main module.
77
78=head1 AUTHOR
79
80Adam Kennedy E<lt>adamk@cpan.orgE<gt>
81
82=head1 COPYRIGHT
83
84Copyright 2001 - 2009 Adam Kennedy.
85
86This program is free software; you can redistribute
87it and/or modify it under the same terms as Perl itself.
88
89The full text of the license can be found in the
90LICENSE file included with this module.
91
92=cut