Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active December 15, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/5fe2eb96e2515bf02a14 to your computer and use it in GitHub Desktop.
Save FROGGS/5fe2eb96e2515bf02a14 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm
index abf96b7..b9b3f54 100644
--- a/src/Perl6/Grammar.pm
+++ b/src/Perl6/Grammar.pm
@@ -1156,7 +1156,12 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
$<doc>=[ 'DOC' \h+ ]?
<sym> <.ws>
[
- | <version>
+ | <version> <?{ ~$<version><vnum>[0] ne '5' }>
+ | 'v'? <?before '5'> {} $<vstr>=[<vnum>+ % '.' '+'?] {
+ my $module := $*W.load_module($/, 'Perl5', $*GLOBALish);
+ do_import($/, $module, 'Perl5');
+ $/.CURSOR.import_EXPORTHOW($module);
+ }
| <module_name>
{
$longname := $<module_name><longname>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment