]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blob - lib/IPC/MorseSignals.pm
8389e5aa1d1fe6b3c0e8d82b59f829bb9868a516
[perl/modules/IPC-MorseSignals.git] / lib / IPC / MorseSignals.pm
1 package IPC::MorseSignals;
2
3 use strict;
4 use warnings;
5
6 =head1 NAME
7
8 IPC::MorseSignals - Communicate between processes with Morse signals.
9
10 =head1 VERSION
11
12 Version 0.10
13
14 =cut
15
16 our $VERSION = '0.10';
17
18 =head1 SYNOPSIS
19
20     # In the sender process
21     use IPC::MorseSignals::Emitter;
22
23     my $deuce = new IPC::MorseSignals::Emitter speed => 1024;
24     $deuce->post('HLAGH') for 1 .. 3;
25     $deuce->send($pid);
26
27     ...
28
29     # In the receiver process
30     use IPC::MorseSignals::Receiver;
31
32     local %SIG;
33     my $pants = new IPC::MorseSignals::Receiver \%SIG, done => sub {
34      print STDERR "GOT $_[1]\n";
35     };
36
37 head1 DESCRIPTION
38
39 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.
40
41 =over 4
42
43 =item L<IPC::MorseSignals::Emitter> is a base class for emitters ;
44
45 =item L<IPC::MorseSignals::Receiver> is a base class for receivers ;
46
47 =back
48
49 But, seriously, use something else for your IPC. :)
50
51 =head1 DEPENDENCIES
52
53 You need the complete L<Bit::MorseSignals> distribution.
54
55 L<Carp> (standard since perl 5), L<POSIX> (idem) and L<Time::HiRes> (since perl 5.7.3) are also required.
56
57 =head1 SEE ALSO
58
59 L<IPC::MorseSignals::Emitter>, L<IPC::MorseSignals::Receiver>.
60
61 L<Bit::MorseSignals>, L<Bit::MorseSignals::Emitter>, L<Bit::MorseSignals::Receiver>.
62
63 L<perlipc> for information about signals in perl.
64
65 For truly useful IPC, search for shared memory, pipes and semaphores.
66
67 =head1 AUTHOR
68
69 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
70
71 You can contact me by mail or on #perl @ FreeNode (vincent or Prof_Vince).
72
73 =head1 BUGS
74
75 Please report any bugs or feature requests to C<bug-ipc-morsesignals at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IPC-MorseSignals>.  I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
76
77 =head1 SUPPORT
78
79 You can find documentation for this module with the perldoc command.
80
81     perldoc IPC::MorseSignals
82
83 =head1 ACKNOWLEDGEMENTS
84
85 Thanks for the inspiration, mofino ! I hope this module will fill all your IPC needs. :)
86
87 =head1 COPYRIGHT & LICENSE
88
89 Copyright 2007-2008 Vincent Pit, all rights reserved.
90
91 This program is free software; you can redistribute it and/or modify it
92 under the same terms as Perl itself.
93
94 =cut
95
96 1; # End of IPC::MorseSignals