SMS::Handler::Invoke - Invoke a user-supplied method on a SMA
use SMS::Handler::Invoke; my $h = new SMS::Handler::Invoke sub { ... }; $h->handle({ ... });
Invokes the method passed as the only argument to the ->new() method, passing the SMS sent to its ->handle() method. This is useful to implement quick transforms in the source or destination numbers, or implementing custom message handling.
->new()
->handle()
The supplied sub will receive as its only argument, the SMS reference passed to the ->handle() method. Its return value will be returned by the ->handle() method.
Creates a new SMS::Handler::Invoke object.
SMS::Handler::Invoke
Invokes the user supplied sub on the SMS reference. Returns whatever the user-supplied sub returns.
None by default.
This code comes with no warranty of any kind. The author cannot be held liable for anything arising of the use of this code under no circumstances.
This code is released under the terms and conditions of the GPL. Please see the file LICENSE that accompains this distribution for more specific information.
This code is (c) 2002 Luis E. Muñoz.
$Log: Invoke.pm,v $ Revision 1.2 2002/12/22 19:03:02 lem Set license GPL
Revision 1.1 2002/12/22 18:43:03 lem Added ::Invoke and its tests
Luis E. Muñoz <luismunoz@cpan.org>
SMS::Handler, Queue::Dir, perl(1).
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
Non-ASCII character seen before =encoding in 'Muñoz.'. Assuming CP1252
To install SMS::Handler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SMS::Handler
CPAN shell
perl -MCPAN -e shell install SMS::Handler
For more information on module installation, please visit the detailed CPAN module installation guide.