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