Skip to content

Commit

Permalink
comment out version check that dies on "use v6;"
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jun 5, 2011
1 parent 59611dc commit 0462779
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Perl6/Actions.pm
Expand Up @@ -470,16 +470,18 @@ class Perl6::Actions is HLL::Actions {
method statement_control:sym<use>($/) {
my $past := PAST::Stmts.new( :node($/) );
if $<version> {
my $i := -1;
for $<version><vnum> {
++$i;
if $_ ne '*' && $_ < @MAX_PERL_VERSION[$i] {
last;
} elsif $_ > @MAX_PERL_VERSION[$i] {
my $mpv := pir::join('.', @MAX_PERL_VERSION);
$/.CURSOR.panic("Perl $<version> required--this is only v$mpv")
}
}
# TODO: replace this by code that doesn't always die with
# a useless error message
# my $i := -1;
# for $<version><vnum> {
# ++$i;
# if $_ ne '*' && $_ < @MAX_PERL_VERSION[$i] {
# last;
# } elsif $_ > @MAX_PERL_VERSION[$i] {
# my $mpv := pir::join('.', @MAX_PERL_VERSION);
# $/.CURSOR.panic("Perl $<version> required--this is only v$mpv")
# }
# }
} elsif $<module_name> {
if ~$<module_name> eq 'fatal' {
declare_variable($/, PAST::Stmts.new(), '$', '*', 'FATAL', 0);
Expand Down

0 comments on commit 0462779

Please sign in to comment.