package Parse::Keyword; use strict; use warnings; use 5.014; # ABSTRACT: write syntax extensions in perl use Devel::CallParser; use XSLoader; XSLoader::load( __PACKAGE__, exists $Parse::Keyword::{VERSION} ? ${ $Parse::Keyword::{VERSION} } : (), ); =head1 SYNOPSIS =head1 DESCRIPTION =cut =func lex_peek =func lex_read =func lex_read_space =func parse_block =func compiling_package =cut sub import { my $package = shift; my ($keywords) = @_; my $caller = caller; for my $keyword (keys %$keywords) { my $sub = do { no strict 'refs'; \&{ $caller . '::' . $keyword }; }; install_keyword_handler($sub, $keywords->{$keyword}); } my @helpers = qw( lex_peek lex_read_space lex_read parse_block compiling_package ); for my $helper (@helpers) { no strict 'refs'; *{ $caller . '::' . $helper } = \&{ __PACKAGE__ . '::' . $helper }; } } =head1 BUGS No known bugs. Please report any bugs to GitHub Issues at L. =head1 SEE ALSO L L =head1 SUPPORT You can find this documentation for this module with the perldoc command. perldoc Parse::Keyword You can also look for information at: =over 4 =item * MetaCPAN L =item * RT: CPAN's request tracker L =item * Github L =item * CPAN Ratings L =back =begin Pod::Coverage install_keyword_handler =end Pod::Coverage =cut 1;