Skip to content

Commit d014f94

Browse files
committed
Work around a MAIN bug.
1 parent 9ace6d6 commit d014f94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Regex/P6Regex/Compiler.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
class Regex::P6Regex::Compiler is HLL::Compiler {
22
}
33

4-
sub MAIN(@ARGS) {
4+
sub MAIN(@ARGS?) {
5+
if @ARGS {
56
my $p6regex := Regex::P6Regex::Compiler.new();
67
$p6regex.language('Regex::P6Regex');
78
$p6regex.parsegrammar(Regex::P6Regex::Grammar);
89
$p6regex.parseactions(Regex::P6Regex::Actions);
910
$p6regex.command_line(@ARGS, :encoding('utf8'), :transcode('ascii iso-8859-1'));
11+
}
1012
}

0 commit comments

Comments
 (0)