Pistachio::Token - expresses a single source code language token as an object
version 0.01
use Pistachio::Token; my $type = 'Word::Package'; my $value = 'package'; my $token = Pistachio::Token->new($type, $value); print $token->type; # Word::Package print $token->value; # package print $token->whitespace; # 0 print $token->match('Whitespace'); # 0 print $token->match('Word::Package'); # 1 my $cmp_type = 'Word::Package'; my $cmp_val = sub {$_[0] eq 'package'}; print $token->match($cmp_type, $cmp_val); # 1
Joel Dalley <joeldalley@gmail.com>
This software is copyright (c) 2013 by Joel Dalley.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Pistachio, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pistachio
CPAN shell
perl -MCPAN -e shell install Pistachio
For more information on module installation, please visit the detailed CPAN module installation guide.