08. 06. 2022. u 17:43, Alceu Rodrigues de Freitas Junior via
cpan-testers-discuss piše:
I think that
useithreads: undef
should work, using exactly the string which is returned by
perl -V:useithreads
Regards, Slaven
09. 06. 2022. u 21:38, Slaven Rezic piše:
Actually, looking at this distropref file https://github.com/eserte/srezic-cpan-distroprefs/blob/8c3ae5d7b4071f9639ccfcea4f44764c2699e27e/Devel-CallParser.yml#L5 it seems that the value is interepreted as a regexp, so you want to anchor it with ^ and $ for extra safety.
Regards, Slaven
12. 06. 2022. u 20:42, Alceu Rodrigues de Freitas Junior via
cpan-testers-discuss piše:
Hi Alceu,
Kwalify is just a schema for validating data structures and it
does not do any parsing or matching using the distroprefs data.
The latter is done by CPAN::Distroprefs.
That said, I tried "useithreads: undef" and it did not work. So it looks like the matching is not done against what is displayed in "perl -V" (in this case the string "undef"), but what is in the Config data structure (the value undef).
However, the distroprefs code only does regexp matches against the stringified values, so to match the stringified undef (the empty string) one has to use '^$'. Below is a distroprefs file just for demonstration purposes, and it works on my system.
Regards, Slaven
--- match: distribution: Kwalify perlconfig: useithreads: '^$' pl: commandline: "echo unthreaded perl deteted; exit 1" --- match: distribution: Kwalify perlconfig: useithreads: '^define$' pl: commandline: "echo threading perl deteted; exit 1" --- match: distribution: Kwalify pl: commandline: "echo nothing matched; exit 1"