commit 9f1cf4cd2148fe6836c79c87a4ea393a9d2b8415
parent 488d8f65da6c2cdadc0478d6f17bab1973eb6952
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sun, 29 Mar 2015 21:43:31 -0600
gen_static: convert or's to ||
Diffstat:
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/gen_static b/gen_static
@@ -57,7 +57,7 @@ for my $manufacturer (@$manufacturers) {
};
$template->process("chart_list.tt", $vars,
"manufacturers/$manufacturer_lc.html")
- or die "template: " . $template->error() . "\n";
+ || die "template: " . $template->error() . "\n";
}
#
@@ -67,7 +67,7 @@ print "info: gen manufacturers.html\n" if ($args{v});
my $vars = { name => "Manufacturers", num => $m, links => $manufacturers };
$template->process("link_list.tt", $vars, "manufacturers.html")
- or die "template: " . $template->error() . "\n";
+ || die "template: " . $template->error() . "\n";
#
# retailers/*
@@ -94,7 +94,7 @@ for my $retailer (@$retailers) {
};
$template->process("chart_list.tt", $vars, "retailers/$retailer_lc.html")
- or die "template: " . $template->error() . "\n";
+ || die "template: " . $template->error() . "\n";
}
#
@@ -104,7 +104,7 @@ print "info: gen retailers.html\n" if ($args{v});
$vars = { name => "Retailers", num => $v, links => $retailers };
$template->process("link_list.tt", $vars, "retailers.html")
- or die "template: " . $template->error() . "\n";
+ || die "template: " . $template->error() . "\n";
#
# products/*
@@ -141,7 +141,7 @@ $vars = {
};
print "info: gen index.html\n";
$template->process("index.tt", $vars, "index.html")
- or die "template: " . $template->error() . "\n";
+ || die "template: " . $template->error() . "\n";
$dbh->disconnect();
diff --git a/pc_fcgi b/pc_fcgi
@@ -99,7 +99,8 @@ while ($request->Accept() >= 0) {
results => $products
};
- $template->process("search.tt", $vars) or print "template: " . $template->error();
+ $template->process("search.tt", $vars)
+ || print "template: " . $template->error();
}
syslog(LOG_INFO, "shutdown");
closelog();