Weird problem

So tonight we came across a weird problem. This chunk of code in one of the Koha modules was causing a script that called it to hang. Only when called from the web though, it works fine from the command line

my $query =
“Select quantity,datereceived,freight,unitprice,listprice,ecost,quantityreceived
as qrev,subscription,title,itemtype,aqorders.biblionumber,aqorders.booksellerinvoicenumber,
quantity-quantityreceived as tleft,aqorders.ordernumber
as ordnum,entrydate,budgetdate,booksellerid,aqbasket.basketno
from aqorderbreakdown,aqbasket,aqorders
left join biblioitems on biblioitems.biblioitemnumber=aqorders.biblioitemnumber
where bookfundid=? and aqorders.ordernumber=aqorderbreakdown.ordernumber and
aqorders.basketno=aqbasket.basketno and (budgetdate >= ? and budgetdate < ?)
and (datecancellationprinted is NULL or datecancellationprinted='0000-00-00')
";
warn $query;

If the warn is commented out it works fine, I think there is a bug in the apache installed on the machine this was happening on.

Testing the code tag

Just testing out the code tag here. Here is some perl

use Getopt::Long;
my ($input_marc_file,$number,$nowarning) = (”,0);
my $version;
GetOptions(
‘file:s’ => $input_marc_file,
‘n:s’ => $number,
‘v’ => $version,
‘w’ => $nowarning,
);

Here is some ruby

class Foo
def bar
“abcde”
end
end

Here is a snippet of xml

some stuff

Thats really pretty cool, I can see Ill be using it a lot more.