From: Davide P.C. <dp...@un...> - 2005-07-06 16:59:44
|
>> I notice in PGanswermacros.pl that in addition to setting the >> filters, they also set a type flag. Do you want that to be included >> in the conversion? That is, should >> >> strict_str_cmp("foobar") >> >> produce >> >> str_cmp("foobar",filters=>'trim_whitespace') >> or >> str_cmp("foobar",filters=>'trim_whitespace', type=>'strict_str_cmp') >> >> I think it should be the former, but I don't know how the type flag >> might be used later on, if at all. I suspect it is just >> informational and can be ignored. >> > I think the former is best as well. OK, that's been added. >> Also, do you prefer >> >> str_cmp("foobar",filters=>'trim_whitespace') >> >> or just >> >> str_cmp("foobar",'trim_whitespace') >> >> as the result? >> > As long as we are converting I think I prefer > str_cmp("foobar", filters=>['trim_whitespace']) OK, no problem. I've put brackets around singleton lists as you requested. I'm attaching the modified version. It should do as you asked, but I did make two changes that you might or might no like: 1. I added "remove_whitespace" to the unordered_* filters, since that seems to be the behavior documented in several locations (even though they are not actually present in the code). 2. I added "trim_whitespace" to the std_cs_str* filters, since this is present in the std_str* ones and the implication is that case-sensitivity is the only difference. You can remove these from the %function hash at the top of the file if you don't want that behavior. Davide |