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

NAME

Compiler::Lexer - Lexical Analyzer for Perl5

SYNOPSIS

use Compiler::Lexer;
use Data::Dumper;

my $filename = $ARGV[0];
open(my $fh, "<", $filename) or die("$filename is not found.");
my $script = do { local $/; <$fh> };
my $lexer = Compiler::Lexer->new($filename);
my $tokens = $lexer->tokenize($script);
print Dumper $tokens;
print Dumper $lexer->get_used_modules($script);

DESCRIPTION

Compiler::Lexer is lexical analyzer for perl5.

METHODS

LICENSE

Copyright (C) Masaaki Goshima (goccy).

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Masaaki Goshima (goccy) goccy@cpan.org

SEE ALSO

Compiler::Parser