1 package PPI::Token::ArrayIndex;
7 PPI::Token::ArrayIndex - Token getting the last index for an array
11 PPI::Token::ArrayIndex
17 The C<PPI::Token::ArrayIndex> token represents an attempt to get the
18 last index of an array, such as C<$#array>.
22 There are no additional methods beyond those provided by the parent
23 L<PPI::Token> and L<PPI::Element> classes.
25 Got any ideas for methods? Submit a report to rt.cpan.org!
32 use vars qw{$VERSION @ISA};
42 #####################################################################
45 sub __TOKENIZER__on_char {
48 # Suck in till the end of the arrayindex
49 my $line = substr( $t->{line}, $t->{line_cursor} );
50 if ( $line =~ /^([\w:']+)/ ) {
51 $t->{token}->{content} .= $1;
52 $t->{line_cursor} += length $1;
56 $t->_finalize_token->__TOKENIZER__on_char( $t );
65 See the L<support section|PPI/SUPPORT> in the main module.
69 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
73 Copyright 2001 - 2009 Adam Kennedy.
75 This program is free software; you can redistribute
76 it and/or modify it under the same terms as Perl itself.
78 The full text of the license can be found in the
79 LICENSE file included with this module.