3 package Pod::Simple::PullParserEndToken;
4 use Pod::Simple::PullParserToken ();
5 @ISA = ('Pod::Simple::PullParserToken');
8 sub new { # Class->new(tagname);
10 return bless ['end', @_], ref($class) || $class;
15 sub tagname { (@_ == 2) ? ($_[0][1] = $_[1]) : $_[0][1] }
16 sub tag { shift->tagname(@_) }
19 sub is_tagname { $_[0][1] eq $_[1] }
20 sub is_tag { shift->is_tagname(@_) }
29 Pod::Simple::PullParserEndToken -- end-tokens from Pod::Simple::PullParser
33 (See L<Pod::Simple::PullParser>)
37 When you do $parser->get_token on a L<Pod::Simple::PullParser>, you might
38 get an object of this class.
40 This is a subclass of L<Pod::Simple::PullParserToken> and inherits all its methods,
41 and adds these methods:
47 This returns the tagname for this end-token object.
48 For example, parsing a "=head1 ..." line will give you
49 a start-token with the tagname of "head1", token(s) for its
50 content, and then an end-token with the tagname of "head1".
52 =item $token->tagname(I<somestring>)
54 This changes the tagname for this end-token object.
55 You probably won't need to do this.
57 =item $token->tag(...)
59 A shortcut for $token->tagname(...)
61 =item $token->is_tag(I<somestring>) or $token->is_tagname(I<somestring>)
63 These are shortcuts for C<< $token->tag() eq I<somestring> >>
67 You're unlikely to ever need to construct an object of this class for
68 yourself, but if you want to, call
70 Pod::Simple::PullParserEndToken->new( I<tagname> )
75 L<Pod::Simple::PullParserToken>, L<Pod::Simple>, L<Pod::Simple::Subclassing>
77 =head1 COPYRIGHT AND DISCLAIMERS
79 Copyright (c) 2002 Sean M. Burke. All rights reserved.
81 This library is free software; you can redistribute it and/or modify it
82 under the same terms as Perl itself.
84 This program is distributed in the hope that it will be useful, but
85 without any warranty; without even the implied warranty of
86 merchantability or fitness for a particular purpose.
90 Sean M. Burke C<sburke@cpan.org>