[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] bareword error in perl
Hi
I am trying to install a usertag but am getting a bareword error:
------------------------
Bareword "products" not allowed while "strict subs" in use at (eval 138)
line 27, <CONFIG> line 46.
In line 46 of the configuration file 'etc/after2.cfg':
UserTag im_onfly Routine <<EOR
------------------------
This is the area in question:
21 $base_sku =~ s/^\s+|\s+$//g;
22 $append =~ s/^\s+|\s+$//g;
23 return {} unless ($base_sku && $append);
24
25 my $query = qq{
26 SELECT pp.price, pp.download, pp.weight, pd.title, pd.description
27-> FROM products pd, properties pp
28 WHERE pd.cap_group = pp.cap_group
29 AND pd.code = '$base_sku'
30 AND pp.append = '$append'
31 };
32 my $db = ::database_exists_ref(products) or die 'Bad products table';
33 my $resultset = $db->query($query);
34 return {} unless scalar @$resultset;
How would I go about correcting this? I have tried surrounding the query
with
qq`[sql]...[/sql]`; instead, but doesn't help.
TIA
Paul