Hi,
I came across the new Perl 5.10 // defined-or operator in Koha code. (See below)
The INSTALL doc says that we still run under Perl 5.8.8.
Should we still refrain from using it?
Regards,
Marcel
For instance in commit 8e5ee007db451f62fe17c456215013e422f25bec
Author: Robin Sheat
robin@catalyst.net.nz
Bug 5186 - allow tax rates to be set to zero (master)
Two examples:
--- a/acqui/addorderiso2709.pl
+++ b/acqui/addorderiso2709.pl
- my $gst = $bookseller->{gstrate} || C4::Context->preference("
+ # '//' is like '||' but tests for defined, rather than true
+ my $gst = $bookseller->{gstrate} // C4::Context->preference("
--- a/acqui/basketgroup.pl
+++ b/acqui/basketgroup.pl
@@ -137,8 +137,8 @@ sub BasketTotal {
my @orders = GetOrders($basketno);
for my $order (@orders){
$total = $total + ( $order->{ecost} * $order->{quantity} );
- if ($bookseller->{invoiceincgst} && ! $bookseller->{listincgst} && ( $b
- my $gst = $bookseller->{gstrate} || C4::Context->preference("gist")
+ if ($bookseller->{invoiceincgst} && ! $bookseller->{listincgst} && ( $b
+ my $gst = $bookseller->{gstrate} // C4::Context->preference("gist")