in reply to How to Optionally enable threads in Perl 5.10.0
$ /usr/bin/perl -v This is perl, v5.10.0 built for i486-linux-gnu-thread-multi ... $ perl -e'eval "use threads; async { print qq{ok\n} }->join;"' ok
Maybe it's referring to symbol import? That passage is not present in newer version of Perl.
Mind you, it doesn't really make much sense to load threads conditionally. It seems to me it would make more sense to choose which module to use conditionally, one that uses uses threads, one that doesn't.
my $engine; if ($use_threads) { require Engine::Threaded; $engine = Engine::Threaded->new(); } else { require Engine::Fallback; $engine = Engine::Fallback->new(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to Optionally enable threads in Perl 5.10.0
by DrWhy (Chaplain) on Aug 09, 2010 at 18:27 UTC |