… | |
… | |
58 | my ($noderef, $lreg) = @_; |
58 | my ($noderef, $lreg) = @_; |
59 | |
59 | |
60 | while (my ($k, $v) = each %$lreg) { |
60 | while (my ($k, $v) = each %$lreg) { |
61 | push @{ $greg{$k} }, @$v; |
61 | push @{ $greg{$k} }, @$v; |
62 | } |
62 | } |
|
|
63 | } |
|
|
64 | |
|
|
65 | =item $ports = find $group |
|
|
66 | |
|
|
67 | Returns all the ports currently registered to the given group (as |
|
|
68 | read-only array reference). When the group has no registered members, |
|
|
69 | return C<undef>. |
|
|
70 | |
|
|
71 | =cut |
|
|
72 | |
|
|
73 | sub find($) { |
|
|
74 | @{ $greg{$_[0]} } |
|
|
75 | ? $greg{$_[0]} |
|
|
76 | : undef |
63 | } |
77 | } |
64 | |
78 | |
65 | =item $guard = register $port, $group |
79 | =item $guard = register $port, $group |
66 | |
80 | |
67 | Register the given (local!) port in the named global group C<$group>. |
81 | Register the given (local!) port in the named global group C<$group>. |