ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro.pm
(Generate patch)

Comparing Coro/Coro.pm (file contents):
Revision 1.92 by root, Fri Dec 1 03:47:55 2006 UTC vs.
Revision 1.93 by root, Fri Dec 1 19:41:06 2006 UTC

57 57
58 # this way of handling attributes simply is NOT scalable ;() 58 # this way of handling attributes simply is NOT scalable ;()
59 sub import { 59 sub import {
60 no strict 'refs'; 60 no strict 'refs';
61 61
62 Coro->export_to_level(1, @_); 62 Coro->export_to_level (1, @_);
63 63
64 my $old = *{(caller)[0]."::MODIFY_CODE_ATTRIBUTES"}{CODE}; 64 my $old = *{(caller)[0]."::MODIFY_CODE_ATTRIBUTES"}{CODE};
65 *{(caller)[0]."::MODIFY_CODE_ATTRIBUTES"} = sub { 65 *{(caller)[0]."::MODIFY_CODE_ATTRIBUTES"} = sub {
66 my ($package, $ref) = (shift, shift); 66 my ($package, $ref) = (shift, shift);
67 my @attrs; 67 my @attrs;
105C<Coro::current> function instead. 105C<Coro::current> function instead.
106 106
107=cut 107=cut
108 108
109# maybe some other module used Coro::Specific before... 109# maybe some other module used Coro::Specific before...
110if ($current) {
111 $main->{specific} = $current->{specific}; 110$main->{specific} = $current->{specific}
112} 111 if $current;
113 112
114$current = $main; 113_set_current $main;
115 114
116sub current() { $current } 115sub current() { $current }
117 116
118=item $idle 117=item $idle
119 118

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines