logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SMS::Send::Driver - Base class for SMS::Send drivers

Author

       Adam Kennedy <adamk@cpan.org>

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.

Name

       SMS::Send::Driver - Base class for SMS::Send drivers

Support

       Bugs should be reported via the CPAN bug tracker at

       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send>

       For other issues, contact the author.

See Also