[CWB] Question about CWB::CQP::More
Alberto Simões
ambs at di.uminho.pt
Mon Dec 13 17:29:34 CET 2010
Hello
On 13/12/2010 16:20, Scott Sadowsky wrote:
> (BTW, is there some way to make error messages more common or verbose? I
> rarely see them, but I suspect I *deserve* to be seeing a lot more).
This might be CWB::CQP::More fault. When using it, you should:
use Try::Tiny;
try {
$cqp->exec(...);
} catch {
## error is in $_
}
This is a design feature. If you do not like it, probably you should use
directly CWB::CQP :)
>
> This is my current, functional (but vulnerable) code:
>
> $query_to_send_to_cqp = "QUERY = [$query_type = \"" . $query_item .
> "\"\%$case_diacr_string];";
>
> ($case_diacr_string is either "c", "d" or "cd", of course).
>
> This is how I tried to incorporate the proper quoting function:
>
> $query_to_send_to_cqp = "QUERY = [$query_type = \"" .
> $cqp->quote($query_item) . "\"\%$case_diacr_string];";
That seems OK for me...
Help this helps :D
--
Alberto Simões
More information about the CWB
mailing list