summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/VNPage.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2012-07-06 13:02:03 +0200
committerYorhel <git@yorhel.nl>2012-07-06 13:13:22 +0200
commitb017974cc80c2e3775fd52631854dc92a9aeab93 (patch)
treeff387b1f6f1f239f0a315d50f7d8adbfb81357d9 /lib/VNDB/Handler/VNPage.pm
parent49d071da55e931b3f47e1d24f9131d360b42d476 (diff)
Handler::VNPage: Compare booleans after negation in releases table
This fixes another (obscure) Perl warning when $rel->{patch} is undef. Perl similar to C when it comes to booleans: Comparing them with == is a recipe for disaster. (Unless you use the C99 'bool' type, but Perl doesn't have such an equivalent)
Diffstat (limited to 'lib/VNDB/Handler/VNPage.pm')
-rw-r--r--lib/VNDB/Handler/VNPage.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm
index 71c62602..f1b4376d 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -301,11 +301,11 @@ sub _compare_rel {
return 1;
} elsif ($variable eq 'type') {
$last_rel->{type} eq $rel->{type} &&
- $last_rel->{patch} == $rel->{patch}
+ !$last_rel->{patch} == !$rel->{patch}
} elsif ($variable eq 'publication') {
- $last_rel->{patch} == $rel->{patch} &&
- $last_rel->{freeware} == $rel->{freeware} &&
- $last_rel->{doujin} == $rel->{doujin}
+ !$last_rel->{patch} == !$rel->{patch} &&
+ !$last_rel->{freeware}== !$rel->{freeware} &&
+ !$last_rel->{doujin} == !$rel->{doujin}
} elsif ($variable eq 'notes') {
$last_rel->{notes} eq $rel->{notes};
} else {