=head1 VERSION
-Version 0.07
+Version 0.08
=cut
-our $VERSION = '0.07';
+our $VERSION = '0.08';
=head1 SYNOPSIS
use Bit::MorseSignals::Receiver;
- my $pants = Bit::MorseSignals::Receiver->new(done => sub { print "received $_[1]!\n" });
+ my $pants = Bit::MorseSignals::Receiver->new(
+ done => sub { print "received $_[1]!\n" },
+ );
while (...) {
my $bit = comes_from_somewhere_lets_say_signals();
$pants->push($bit);
=head1 DESCRIPTION
-Base class for L<Bit::MorseSignals> receivers. Please refer to this module for more general information about the protocol.
+Base class for L<Bit::MorseSignals> receivers.
+Please refer to this module for more general information about the protocol.
Given a sequence of bits coming from the L<Bit::MorseSignals> protocol, the receiver object detects when a packet has been completed and then reconstructs the original message depending of the datatype specified in the header.
=head1 METHODS
-=head2 C<< new < done => $cb > >>
+=head2 C<new>
-L<Bit::MorseSignals::Receiver> object constructor. With the C<'done'> option, you can specify a callback that will be triggered every time a message is completed, and in which C<$_[0]> will be the receiver object and C<$_[1]> the message received.
+ my $bmr = Bit::MorseSignals::Receiver->new(done => $cb);
+
+L<Bit::MorseSignals::Receiver> object constructor.
+With the C<'done'> option, you can specify a callback that will be triggered every time a message is completed, and in which C<$_[0]> will be the receiver object and C<$_[1]> the message received.
=cut
return $self;
}
-=head2 C<push $bit>
+=head2 C<push>
+
+ $bmr->push($bit);
-Tells the receiver that you have received the bit C<$bit>. Returns true while the message isn't completed, and C<undef> as soon as it is.
+Tells the receiver that you have received the bit C<$bit>.
+Returns true while the message isn't completed, and C<undef> as soon as it is.
=cut
=head1 DEPENDENCIES
-L<Carp> (standard since perl 5), L<Encode> (since perl 5.007003), L<Storable> (idem).
+L<Carp> (standard since perl 5), L<Encode> (since perl 5.7.3), L<Storable> (idem).
=head1 SEE ALSO
=head1 BUGS
-Please report any bugs or feature requests to C<bug-bit-morsesignals-receiver at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bit-MorseSignals>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
+Please report any bugs or feature requests to C<bug-bit-morsesignals-receiver at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bit-MorseSignals>.
+I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT