NAME
SMS::Handler::Invoke - Invoke a user-supplied method on a SMA
SYNOPSIS
use SMS::Handler::Invoke;
my $h = new SMS::Handler::Invoke sub { ... };
$h->handle({ ... });
DESCRIPTION
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.
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.
->new()
-
Creates a new
SMS::Handler::Invoke
object. ->handle()
-
Invokes the user supplied sub on the SMS reference. Returns whatever the user-supplied sub returns.
EXPORT
None by default.
LICENSE AND WARRANTY
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.
HISTORY
$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
AUTHOR
Luis E. Muñoz <luismunoz@cpan.org>
SEE ALSO
SMS::Handler, Queue::Dir, perl(1).
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 80:
You forgot a '=back' before '=head2'
- Around line 95:
Non-ASCII character seen before =encoding in 'Muñoz.'. Assuming CP1252