The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Pistachio::Token - expresses a single source code language token as an object

VERSION

version 0.10

SYNOPSIS

 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

AUTHOR

Joel Dalley <joeldalley@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 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.