| Compiler::Lexer(3pm) | User Contributed Perl Documentation | Compiler::Lexer(3pm) |
Compiler::Lexer - Lexical Analyzer for Perl5
use Compiler::Lexer;
use Data::Dumper;
my $filename = $ARGV[0];
open my $fh, '<', $filename or die "Cannot open $filename: $!";
my $script = do { local $/; <$fh> };
my $lexer = Compiler::Lexer->new($filename);
my $tokens = $lexer->tokenize($script);
print Dumper $tokens;
my $modules = $lexer->get_used_modules($script);
print Dumper $modules;
options list
Masaaki Goshima (goccy) <goccy(at)cpan.org>
tokuhirom: Tokuhiro Matsuno
Copyright (c) 2013, Masaaki Goshima (goccy). All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 2020-11-09 | perl v5.32.0 |