… | |
… | |
34 | use Coro::State; |
34 | use Coro::State; |
35 | use Coro::Specific; |
35 | use Coro::Specific; |
36 | |
36 | |
37 | use base 'Exporter'; |
37 | use base 'Exporter'; |
38 | |
38 | |
39 | $VERSION = 0.09; |
39 | $VERSION = 0.10; |
40 | @EXPORT = qw(csub result); |
40 | @EXPORT = qw(csub result); |
41 | |
41 | |
42 | { |
42 | { |
43 | use subs 'csub'; |
|
|
44 | |
|
|
45 | my @csub; |
43 | my @csub; |
46 | |
44 | |
47 | # this way of handling attributes simply is NOT scalable ;() |
45 | # this way of handling attributes simply is NOT scalable ;() |
48 | sub import { |
46 | sub import { |
49 | Coro::Cont->export_to_level(1, @_); |
47 | Coro::Cont->export_to_level(1, @_); |
… | |
… | |
77 | # prototypes are currently being ignored |
75 | # prototypes are currently being ignored |
78 | for (@csub) { |
76 | for (@csub) { |
79 | no warnings; |
77 | no warnings; |
80 | my $ref = findsym(@$_) |
78 | my $ref = findsym(@$_) |
81 | or croak "package $package: cannot declare non-global subs as 'Cont'"; |
79 | or croak "package $package: cannot declare non-global subs as 'Cont'"; |
82 | *$ref = csub $_->[1]; |
80 | *$ref = &csub($_->[1]); |
83 | } |
81 | } |
84 | @csub = (); |
82 | @csub = (); |
85 | } |
83 | } |
86 | } |
84 | } |
87 | |
85 | |