[CWB] Question about CWB::CQP::More

Scott Sadowsky ssadowsky at gmail.com
Tue Dec 14 17:16:04 CET 2010


On 12/13/2010 01:42 PM, Alberto Simões wrote:

Hi Alberto,

>>> This might be CWB::CQP::More fault. When using it, you should:
>>> use Try::Tiny;
>>
>> I already am, actually.
>
> Hmms, then something weird is going on.
> You can try to print the string after applying the quote, just before
> sending it to the exec command? Probably it can give us some feedback?

The script seems to be dying silently *during* the call to the quote 
function. When I run the following code (the values of $query_type and 
$query_item here are lemma and persona, respectively, with no quotation 
marks)...

print STDOUT "\nBEFORE:\t$query_to_send_to_cqp;
my $query_to_send_to_cqp = "[$query_type = ".$cqp->quote($query_item)."]";
print STDOUT "\nAFTER:\t$query_to_send_to_cqp;

... I get a 0-byte output file (the file is opened earlier in the code, 
so that's why it exists), and the following in the terminal:

BEFORE:

The "BEFORE" value of $query_to_send_to_cqp is indeed and empty string, 
so that's okay. But the "AFTER" value should of course have the quoted 
string. And at the very least, I should see "AFTER:" with nothing after 
it on the terminal. But I don't.

That leads me to conclude that the problem is somewhere in the call to 
the quoting function.

Cheers,
Scott


More information about the CWB mailing list