Skip to content

Commit

Permalink
Perlito5 - parser - "use $version" loads feature.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Apr 1, 2019
1 parent a37bc9f commit d6bb8c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src5/lib/Perlito5/Grammar/Use.pm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ token stmt_use {
my $version = $MATCH->{"version_string"}{capture}{buf};
$version = Perlito5::test_perl_version($version);

# load feature.pm
parse_time_eval(
{
mod => "feature",
code => "use",
arguments => [], # skip import
}
);

my $code = feature->can('unimport');
if (defined($code)) {
# no feature ':all';
Expand Down

0 comments on commit d6bb8c8

Please sign in to comment.