--- Coro/Coro.pm 2001/07/21 02:49:09 1.18 +++ Coro/Coro.pm 2001/07/21 03:44:06 1.19 @@ -35,7 +35,7 @@ $VERSION = 0.09; -@EXPORT = qw(async yield schedule terminate); +@EXPORT = qw(async yield schedule terminate current); @EXPORT_OK = qw($current); { @@ -74,7 +74,7 @@ our $main = new Coro; -=item $current +=item $current (or as function: current) The current coroutine (the last coroutine switched to). The initial value is C<$main> (of course). @@ -87,6 +87,8 @@ our $current = $main; +sub current() { $current } + =item $idle The coroutine to switch to when no other coroutine is running. The default