]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blobdiff - lib/IPC/MorseSignals.pm
Add a caveat about POSIX not guaranteeing that all bits will be received
[perl/modules/IPC-MorseSignals.git] / lib / IPC / MorseSignals.pm
index 89232f3383929e3c520e845da9b3d20f84b9783b..c87322366959d4b055e33b959a1fa80e43fe0ad0 100644 (file)
@@ -20,7 +20,7 @@ our $VERSION = '0.15';
     # In the sender process
     use IPC::MorseSignals::Emitter;
 
-    my $deuce = new IPC::MorseSignals::Emitter speed => 1024;
+    my $deuce = IPC::MorseSignals::Emitter->new(speed => 1024);
     $deuce->post('HLAGH') for 1 .. 3;
     $deuce->send($pid);
 
@@ -30,9 +30,9 @@ our $VERSION = '0.15';
     use IPC::MorseSignals::Receiver;
 
     local %SIG;
-    my $pants = new IPC::MorseSignals::Receiver \%SIG, done => sub {
+    my $pants = IPC::MorseSignals::Receiver->new(\%SIG, done => sub {
      print STDERR "GOT $_[1]\n";
-    };
+    });
 
 =head1 DESCRIPTION
 
@@ -48,6 +48,11 @@ This module implements a rare form of IPC by sending Morse-like signals through
 
 But, seriously, use something else for your IPC. :)
 
+=head1 CAVEATS
+
+When the same signal is sent several times in a row to a process, the POSIX standard does not guarantee that the relevant signal handler will be called for each of the notifications.
+This will result in malformed messages if the transfer speed is so high that the operating system does not have the time to call the signal handler for each bit.
+
 =head1 DEPENDENCIES
 
 You need the complete L<Bit::MorseSignals> distribution.
@@ -86,7 +91,7 @@ Thanks for the inspiration, mofino ! I hope this module will fill all your IPC n
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2007-2008 Vincent Pit, all rights reserved.
+Copyright 2007,2008,2013 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.