Someone sent me an email asking how to tell if your Perl is compiled with threads. I replied:
ovid $ perl -V|grep -i thread usethreads=undef use5005threads=undef useithreads=undef
That's when I noticed I forgot to enable thread support the last time I recompiled Perl. Crap.
which pulls just that value from the config, and in a way that you can use it with an sh eval:perl -V:usethreads
eval `perl -V:usethreads`;
case $usethreads in define)... ;; undef) ... ;; esac
Re:another faster way sans grep
Ovid on 2005-08-25T07:06:45
Sweet! A new tip. Thanks.
Re:another faster way sans grep
rafael on 2005-08-25T07:29:55
And regexps work !perl -V:use.*threads
Re:better off without them
Ovid on 2005-08-25T15:26:29
I need it for some of my side projects. Specifically, Language::Prolog::Yaswi requires a threaded Perl if my SWI-Prolog is threaded (which it is).