Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

SMS::Handler::Invoke
Invoke a user-supplied method on a SMA

SMS::Handler::Invoke - Invoke a user-supplied method on a SMA



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

the SMS::Handler manpage, the Queue::Dir manpage, perl(1).

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy