package C4::SMS;
+# Copyright 2007 Liblime
+#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 NAME
use warnings;
use C4::Context;
-use SMS::Send;
use vars qw( $VERSION );
BEGIN {
- $VERSION = 0.03;
+ $VERSION = 3.07.00.049;
}
=head1 METHODS
=head2 send_sms
-=over4
-
-=back
-
=cut
sub send_sms {
return unless defined $params->{ $required_parameter };
}
+ eval { require SMS::Send; };
+ if ( $@ ) {
+ # we apparently don't have SMS::Send. Return a failure.
+ return;
+ }
+
# This allows the user to override the driver. See SMS::Send::Test
my $driver = exists $params->{'driver'} ? $params->{'driver'} : $self->driver();
return unless $driver;
=head2 driver
-=over 4
-
-=back
-
=cut
sub driver {