Revision history for IPC-MorseSignals
+0.12 2008-03-09 10:20 UTC
+ + Doc : POD tweaks.
+ + Fix : Correct Makefile.PL die messages.
+
0.11 2008-03-05 21:05 UTC
+ Doc : POD tweaks.
+ Fix : Bit::MorseSignals is a dependency now.
--- #YAML:1.0
name: IPC-MorseSignals
-version: 0.11
+version: 0.12
abstract: Communicate between processes with Morse signals.
license: perl
author:
BEGIN {
eval { require Config };
- die "You need the Config module to install this distribution, that's what happened" if $@;
- Config->import qw/%Config/;
+ die 'OS unsupported' if $@;
+ Config->import(qw/%Config/);
}
my %sigs;
print "Checking if you have SIG$_... ";
unless (exists $sigs{$_}) {
print "no\n";
- die "Installation stops right here,";
+ die 'OS unsupported' if $@;
}
print "yes\n";
}
IPC::MorseSignals - Communicate between processes with Morse signals.
VERSION
- Version 0.11
+ Version 0.12
SYNOPSIS
# In the sender process
print STDERR "GOT $_[1]\n";
};
- head1 DESCRIPTION
-
+DESCRIPTION
This module implements a rare form of IPC by sending Morse-like signals
through "SIGUSR1" and "SIGUSR2". Both of those signals are used, so you
won't be able to keep them for something else when you use this module.
IPC::MorseSignals::Emitter is a base class for emitters ;
- IPC::MorseSignals::Receiver is a base class for receivers ;
+ IPC::MorseSignals::Receiver is a base class for receivers.
But, seriously, use something else for your IPC. :)
=head1 VERSION
-Version 0.11
+Version 0.12
=cut
-our $VERSION = '0.11';
+our $VERSION = '0.12';
=head1 SYNOPSIS
print STDERR "GOT $_[1]\n";
};
-head1 DESCRIPTION
+=head1 DESCRIPTION
This module implements a rare form of IPC by sending Morse-like signals through C<SIGUSR1> and C<SIGUSR2>. Both of those signals are used, so you won't be able to keep them for something else when you use this module.
=item L<IPC::MorseSignals::Emitter> is a base class for emitters ;
-=item L<IPC::MorseSignals::Receiver> is a base class for receivers ;
+=item L<IPC::MorseSignals::Receiver> is a base class for receivers.
=back
=head1 VERSION
-Version 0.11
+Version 0.12
=cut
-our $VERSION = '0.11';
+our $VERSION = '0.12';
=head1 SYNOPSIS
=head1 DESCRIPTION
-This module sends messages processed by a L<Bit::MorseSignal> emitter to another process as C<SIGUSR1> (for bits 0) and C<SIGUSR2> (for 1) signals.
+This module sends messages processed by an underlying L<Bit::MorseSignal> emitter to another process as a sequence of C<SIGUSR1> (for bits 0) and C<SIGUSR2> (for 1) signals.
=cut
return unless defined $dest;
my @dests = grep $_ > 0, ref $dest eq 'ARRAY' ? map int, grep defined, @$dest
: int $dest;
+ return unless @dests;
while (defined(my $bit = $self->pop)) {
my @sigs = (SIGUSR1, SIGUSR2);
my $d = $self->{delay} * 1_000_000;
$d -= usleep $d while $d > 0;
kill $sigs[$bit] => @dests;
}
- return unless @dests;
}
=head2 C<< delay < $seconds > >>
=head1 VERSION
-Version 0.11
+Version 0.12
=cut
-our $VERSION = '0.11';
+our $VERSION = '0.12';
=head1 SYNOPSIS
=head1 DESCRIPTION
-This module installs C<$SIG{qw/USR1 USR2/}> handlers and forwards the bits received to a L<Bit::MorseSignal> receiver.
+This module installs C<$SIG{qw/USR1 USR2/}> handlers and forwards the bits received to an underlying L<Bit::MorseSignals> receiver.
=head1 METHODS