X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FBit%2FMorseSignals%2FEmitter.pm;h=54249f2975061998924866f74fa134791c2eaf4c;hb=e37c1ee0be01170c80384463b4b2731aa024985e;hp=441e6e4cc5dd5702f3f4aa4d34c3d5589244578a;hpb=8ce9fd9d5f4e6197d1a33a3fd11953cc1dc3b31f;p=perl%2Fmodules%2FBit-MorseSignals.git diff --git a/lib/Bit/MorseSignals/Emitter.pm b/lib/Bit/MorseSignals/Emitter.pm index 441e6e4..54249f2 100644 --- a/lib/Bit/MorseSignals/Emitter.pm +++ b/lib/Bit/MorseSignals/Emitter.pm @@ -15,11 +15,11 @@ Bit::MorseSignals::Emitter - Base class for Bit::MorseSignals emitters. =head1 VERSION -Version 0.05 +Version 0.06 =cut -our $VERSION = '0.05'; +our $VERSION = '0.06'; =head1 SYNOPSIS @@ -70,7 +70,7 @@ L object constructor. Currently does not take any op sub new { my $class = shift; - $class = ref $class || $class || return; + return unless $class = ref $class || $class; croak 'Optional arguments must be passed as key => value pairs' if @_ % 2; my %opts = @_; my $self = { @@ -128,8 +128,8 @@ sub post { $self->{state} = 2; my $head = ''; - vec($head, 0, 1) = ($type & 2) >> 1; - vec($head, 1, 1) = ($type & 1); + vec($head, 0, 1) = ($type & 1); + vec($head, 1, 1) = ($type & 2) >> 1; vec($head, 2, 1) = 0; my $hlen = 3; @@ -279,6 +279,8 @@ You can find documentation for this module with the perldoc command. perldoc Bit::MorseSignals::Emitter +Tests code coverage report is available at L. + =head1 COPYRIGHT & LICENSE Copyright 2008 Vincent Pit, all rights reserved.