Revision history for Bit-MorseSignals
+0.05 2008-03-13 23:05 UTC
+ + Add : The len and pos emitter methods.
+ + Fix : The usual set of POD typos.
+ + Fix : Propagate demangler errors as warnings.
+ + Tst : Small improvments.
+
0.04 2008-03-06 14:55 UTC
+ Doc : POD tweaks.
+ Fix : Correct dependencies listing in META.yml.
--- #YAML:1.0
name: Bit-MorseSignals
-version: 0.04
+version: 0.05
abstract: The MorseSignals protocol.
license: perl
author:
- Vincent Pit <perl@profvince.com>
-generated_by: ExtUtils::MakeMaker version 6.44
+generated_by: ExtUtils::MakeMaker version 6.42
distribution_type: module
requires:
Carp: 0
}
WriteMakefile(
- NAME => 'Bit::MorseSignals',
- AUTHOR => 'Vincent Pit <perl@profvince.com>',
- LICENSE => 'perl',
- VERSION_FROM => 'lib/Bit/MorseSignals.pm',
- ABSTRACT_FROM => 'lib/Bit/MorseSignals.pm',
- PL_FILES => {},
- PREREQ_PM => {
- 'Carp' => 0,
- 'Encode' => 0,
- 'Exporter' => 0,
- 'Storable' => 0,
+ NAME => 'Bit::MorseSignals',
+ AUTHOR => 'Vincent Pit <perl@profvince.com>',
+ LICENSE => 'perl',
+ VERSION_FROM => 'lib/Bit/MorseSignals.pm',
+ ABSTRACT_FROM => 'lib/Bit/MorseSignals.pm',
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Carp' => 0,
+ 'Encode' => 0,
+ 'Exporter' => 0,
+ 'Storable' => 0,
},
- dist => {
- PREOP => 'pod2text lib/Bit/MorseSignals.pm > $(DISTVNAME)/README; '
- . build_req,
- COMPRESS => 'gzip -9f', SUFFIX => 'gz'
+ dist => {
+ PREOP => 'pod2text lib/Bit/MorseSignals.pm > $(DISTVNAME)/README; '
+ . build_req,
+ COMPRESS => 'gzip -9f', SUFFIX => 'gz'
},
- clean => { FILES => 'Bit-MorseSignals-*' },
+ clean => { FILES => 'Bit-MorseSignals-*' },
);
Bit::MorseSignals - The MorseSignals protocol.
VERSION
- Version 0.04
+ Version 0.05
SYNOPSIS
use Bit::MorseSignals::Emitter;
An actual implementation is also provided :
Bit::MorseSignals::Emitter is a base class for emitters ;
- Bit::MorseSignals::Receiver is a base class for receivers ;
+ Bit::MorseSignals::Receiver is a base class for receivers.
Go to those pages if you just want the stuff done and don't care about
how it gets there.
=head1 VERSION
-Version 0.04
+Version 0.05
=cut
-our $VERSION = '0.04';
+our $VERSION = '0.05';
=head1 SYNOPSIS
=item L<Bit::MorseSignals::Emitter> is a base class for emitters ;
-=item L<Bit::MorseSignals::Receiver> is a base class for receivers ;
+=item L<Bit::MorseSignals::Receiver> is a base class for receivers.
=back
=head1 VERSION
-Version 0.04
+Version 0.05
=cut
-our $VERSION = '0.04';
+our $VERSION = '0.05';
=head1 SYNOPSIS
return $bit;
}
+=head2 C<len>
+
+The length of the currently posted message.
+
+=cut
+
+sub len {
+ my ($self) = @_;
+ _check_self($self);
+ return $self->{len};
+}
+
+=head2 C<pos>
+
+The number of bits that have already been sent for the current message.
+
+=cut
+
+sub pos {
+ my ($self) = @_;
+ _check_self($self);
+ return $self->{pos};
+}
+
=head2 C<reset>
Cancels the current transfer, but does not empty the queue.
=head1 VERSION
-Version 0.04
+Version 0.05
=cut
-our $VERSION = '0.04';
+our $VERSION = '0.05';
=head1 SYNOPSIS
$self->{msg} = defined $demanglers[$self->{type}]
? do {
my $msg = eval {
+ local $SIG{__DIE__} = sub { warn @_ };
$demanglers[$self->{type}]->($self->{buf})
};
$@ ? undef : $msg;
use strict;
use warnings;
-use Test::More tests => 7 + 5;
+use Test::More tests => 9 + 5;
require Bit::MorseSignals::Emitter;
-for (qw/new post pop reset flush busy queued/) {
+for (qw/new post pop len pos reset flush busy queued/) {
ok(Bit::MorseSignals::Emitter->can($_), 'BME can ' . $_);
}
# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
-plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
- if $@;
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
-plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
- if $@;
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" if $@;
all_pod_coverage_ok(
- also_private => [ qr/^_/ ]
+ { also_private => [ qr/^_/ ] }
);