Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sms::send::test(3pm) [debian man page]

SMS::Send::Test(3pm)					User Contributed Perl Documentation				      SMS::Send::Test(3pm)

NAME
SMS::Send::Test - SMS::Send International-Class Testing Driver SYNOPSIS
# Create a testing sender my $send = SMS::Send->new( 'Test' ); # Clear the message trap $send->clear; # Send a message $send->send_sms( text => 'Hi there', to => '+61(4) 1234 5678', ); # Get the message from the trap my @messages = $send->messages; DESCRIPTION
SMS::Send supports two classes of drivers. An international class named in the format "SMS::Send::Foo", which only accept international numbers in "+1 XXX XXXXX" format, and regional-context drivers in the format "SMS::Send::XX::Foo" which will also accept a non-leading-plus number in the format applicable within that region (in the above case, Australia). SMS::Send::Test is the testing driver for the international class of drivers. Except for the name, it is otherwise identical to SMS::Send::AU::Test. Its two roles are firstly to always exist (be installed) and secondly to act as a "trap" for messages. Messages sent via SMS::Send::Test always succeed, and the messages can be recovered for testing after sending. Note that the trap is done on a per-driver-handle basis, and is not shared between multiple driver handles. METHODS
SMS::Send::Test inherits all the methods of the parent SMS::Send::Driver class, and adds the following. messages The "messages" method retrieves as a list all of the messages in the message trap. clear The "clear" method clears the message trap. This should be done before each chunk of test code to ensure you are starting from a known state. Returns true as a convenience. SUPPORT
Bugs should be reported via the CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send> For other issues, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2005 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.14.2 2011-11-09 SMS::Send::Test(3pm)

Check Out this Related Man Page

SMS::Send::Driver(3pm)					User Contributed Perl Documentation				    SMS::Send::Driver(3pm)

NAME
SMS::Send::Driver - Base class for SMS::Send drivers DESCRIPTION
The "SMS::Send::Driver" class provides an abstract base class for all SMS::Send driver classes. At this time it does not provide any implementation code for drivers (although this may change in the future) with the exception of some methods provided to trigger "does not implement method" errors. However, it does serve as something you should sub-class your driver from to identify it as a SMS::Send driver. Please note that if your driver class not not return true for "$driver-"isa('SMS::Send::Driver')> then the SMS::Send constructor will refuse to use your class as a driver. METHODS
new The "new" constructor is required to be implemented by your driver subclass. It recieves a set of arbitrary paired params. The values of these params are assumed to be driver-specific (this is expected to change). If your driver will need to login to some system, locate hardware, or do some other form of initialisation to validate the SMS delivery mechanism exists, it should do so in "new". Should return a new SMS::Send::Driver-subclass object, or die on error. send_sms The "send_sms" method is required to be implemented by your driver subclass. It recieves a set of param pairs as documented in SMS::Send. Should return true for either success or fire-and-forget with unknown result, defined-but-false ('' or 0) for a failed message send, or die on a fatal error. SUPPORT
Bugs should be reported via the CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send> For other issues, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2005 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.14.2 2011-11-09 SMS::Send::Driver(3pm)
Man Page