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

Comparing Net-Knuddels/Net/Knuddels.pm (file contents):
Revision 1.4 by root, Wed Jan 12 04:34:52 2005 UTC vs.
Revision 1.5 by root, Wed Jan 12 19:26:51 2005 UTC

45 $i ^= $j; 45 $i ^= $j;
46 46
47 ($i & 0xffffff) ^ ($i >> 24); 47 ($i & 0xffffff) ^ ($i >> 24);
48} 48}
49 49
50package Net::Knuddels::Receiver; 50package Net::Knuddels::Protocol;
51
52=head2 CLASS Net::Knuddels::Protocol
53
54You B<must> call the C<destroy> method of this class when you no longer
55use it, as circular references will keep the object alive otherwise.
56
57=cut
51 58
52sub new { 59sub new {
53 my $class = shift; 60 my $class = shift;
54 61
55 my %data; 62 my %data;
134 my ($self, $type, $cb) = @_; 141 my ($self, $type, $cb) = @_;
135 142
136 $self->{cb}{$type}{$cb} = $cb; 143 $self->{cb}{$type}{$cb} = $cb;
137} 144}
138 145
146sub destroy {
147 my ($self) = @_;
148
149 delete $self->{cb};
150}
151
1391; 1521;
140 153

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines