SMS::S...:Driver(3pm)

๐Ÿ“ฆ
version 1.07 ยท 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

๐Ÿ’– SMS::Send::Driver โ€” the 3pm page, but make it cute ๐Ÿ’–

okay bestie, welcome to the SMS::Send::Driver manual page โœจ this is a Perl module, it lives in the 3pm section, and it's filed under User Contributed Perl Documentation ๐ŸŽ€ so you know it's the real deal. sit down, grab a strawberry ๐Ÿ“, and let's get into it.


๐ŸŒธ NAME ๐ŸŒธ

SMS::Send::Driver โ€” the base class for SMS::Send drivers, periodt ๐Ÿ‘‘


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so the tea is this: SMS::Send::Driver is an abstract base class for all the SMS::Send driver classes. every single one. it's giving founding mother ๐Ÿ’…

right now, at this time, it does not provide any implementation code for drivers โ€” like, none โ€” although lowkey this may change in the future ๐Ÿ‘€. the one exception is a couple of methods it hands you specifically to trigger "does not implement method" errors. so if you forgot to write something, it will let you know, and it will not be subtle ๐Ÿ˜ญ

but here's the thing โ€” it still absolutely serves a purpose: it's the thing you should sub-class your driver from, so the universe can tell your driver is a SMS::Send driver. it's the little name tag at the party ๐Ÿท๏ธ

โš ๏ธ super important, no cap: if your driver class does not return true for $driver->isa('SMS::Send::Driver'), then the SMS::Send constructor will straight up refuse to use your class as a driver. it will not negotiate. it will not hear you out. it's giving bouncer at the club ๐Ÿšซ๐Ÿ’€

โœจ METHODS โœจ

๐Ÿ’œ new

the new constructor is required to be implemented by your driver subclass. no new, no vibes, no driver ๐Ÿซถ

it receives a set of arbitrary paired params. the values of these params are assumed to be driver-specific (and yes, this is expected to change ๐Ÿ”ฎ).

if your driver needs to login to some system, locate hardware, or do some other form of initialisation to validate that the SMS delivery mechanism actually exists โ€” it should do that in new. that's the moment. that's the vibe check ๐ŸŒˆ

it should return a new SMS::Send::Driver-subclass object, or die on error ๐Ÿ’€


๐Ÿ’œ send_sms

the send_sms method is also required to be implemented by your driver subclass. yes bestie, both of them. it's a package deal ๐Ÿ’…

it receives a set of param pairs as documented in SMS::Send.

and here's the return value lore, listen closely because it's specific ๐Ÿ‘‘:

  • return true for either success or fire-and-forget with unknown result ๐Ÿ”ฅ
  • return defined-but-false ('' or 0) for a failed message send ๐Ÿ˜ญ
  • or die on a fatal error ๐Ÿ’€

that's the whole contract. memorise it. iykyk โœจ


๐Ÿซถ 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. they're nice, promise ๐ŸŒธ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Adam Kennedy <adamk@cpan.org>

iconic. legendary. ate. ๐Ÿ’…


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 ๐Ÿ“œ


okay that's the whole page, you're basically a SMS::Send driver dev now, no cap ๐Ÿงš๐Ÿ’–

and for the sign-off โ€” this was generated by perl v5.36.0 on 2023-08-18, from the SMS::S...:Driver(3pm) page itself. slay, bye bestie ๐ŸŒˆโญ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from