Coro::Specific - manage coroutone-specific variables.
use Coro::Specific; my $ref = new Coro::Specific; $$ref = 5; print $$ref;
This module can be used to create variables (or better: references to them) that are specific to the currently executing coroutine. This module does not automatically load the Coro module (so the overhead will be small when no coroutines are used).
Create a new coroutine-specific scalar and return a reference to it. The scalar is guarenteed to be "undef". Once such a scalar has been allocated you cannot deallocate it (yet), so allocate only when you must.
The actual coroutine specific values do not automatically get destroyed when the Coro::Specific object gets destroyed.
Marc Lehmann <pcg@goof.com> http://www.goof.com/pcg/marc/
To install Coro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Coro
CPAN shell
perl -MCPAN -e shell install Coro
For more information on module installation, please visit the detailed CPAN module installation guide.