Fix point without conditions
This commit is contained in:
parent
b3f61617f3
commit
9fe8a83c2e
@ -253,7 +253,7 @@ sub compute ($$$;$$)
|
||||
$res = reduce {
|
||||
$cpt->share('$a');
|
||||
$cpt->share('$b');
|
||||
$cpt->reval($operators->{ $operator }) or die $@;
|
||||
$cpt->reval($operators->{ $operator }) or die "Safe alert: $@";
|
||||
}
|
||||
@current;
|
||||
}
|
||||
@ -315,7 +315,7 @@ sub getValue ($$;$)
|
||||
my $ids = shift;
|
||||
my $justMatch = shift;
|
||||
|
||||
if (!$justMatch && !$ids->{ $self->{ref} } // 0) {
|
||||
if ($self->{ref} && !$justMatch && !$ids->{ $self->{ref} } // 0) {
|
||||
return 0;
|
||||
}
|
||||
elsif ($self->{value} eq "") {
|
||||
@ -337,7 +337,8 @@ sub compute ($$$;$$)
|
||||
$ret = $self->getValue( $ids );
|
||||
}
|
||||
|
||||
if ($self->{not}) {
|
||||
if ($self->{not})
|
||||
{
|
||||
if ($ret) {
|
||||
$ret = undef;
|
||||
} else {
|
||||
|
@ -34,7 +34,9 @@ else {
|
||||
open $xmlgrading, "<", shift or die $!;
|
||||
}
|
||||
binmode $xmlgrading;
|
||||
my $grade = Grading->new($xmlgrading);
|
||||
my $str;
|
||||
$str .= $_ while(<$xmlgrading>);
|
||||
my $grade = Grading->new($str);
|
||||
close $xmlgrading unless $xmlgrading eq *STDIN;
|
||||
|
||||
my $who = "";
|
||||
|
Reference in New Issue
Block a user