SMS-Send-AQL-0.04/0000755000175000017500000000000011525341775012713 5ustar davidpdavidpSMS-Send-AQL-0.04/README0000644000175000017500000000217611525340341013565 0ustar davidpdavidpSMS::Send::AQL README =========================== An SMS::Send driver to send messages via AQL (www.aql.com). INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: SMS::AQL USAGE Please see the documentation for SMS::Send for details on how to use SMS::Send to send messages using an SMS::Send driver such as this one. When creating an instance of SMS::Send, you must supply your AQL account username and password, in the parameters _username and _password (alternatively, _login can be used in place of _username, for consistency with the example provided by SMS::Send). There is a simple example usage script distributed with SMS::Send::AQL which you will find in eg/simple-example.pl. COPYRIGHT AND LICENCE Copyright (C) 2008 by David Precious This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available. $Id: README 213 2008-01-19 15:32:33Z davidp $ SMS-Send-AQL-0.04/t/0000755000175000017500000000000011525341775013156 5ustar davidpdavidpSMS-Send-AQL-0.04/t/1-basic.t0000644000175000017500000000103211525340341014542 0ustar davidpdavidp# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1-basic.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 1; BEGIN { use_ok('SMS::Send::AQL') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. # TODO: Add more tests (although this is a very simple module) SMS-Send-AQL-0.04/t/3-pod-coverage.t0000644000175000017500000000045611525340341016047 0ustar davidpdavidp#!/usr/bin/perl # Test POD coverage for Finance::PremiumBonds # # $Id: 3-pod-coverage.t 212 2008-01-19 15:31:33Z davidp $ use strict; use Test::More; eval "use Test::Pod::Coverage 1.00"; plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@; all_pod_coverage_ok();SMS-Send-AQL-0.04/t/2-pod.t0000644000175000017500000000040511525340341014247 0ustar davidpdavidp#!/usr/bin/perl # Test POD correctness for Finance::PremiumBonds # # $Id: 2-pod.t 212 2008-01-19 15:31:33Z davidp $ use strict; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); SMS-Send-AQL-0.04/eg/0000755000175000017500000000000011525341775013306 5ustar davidpdavidpSMS-Send-AQL-0.04/eg/simple-example.pl0000755000175000017500000000072511525340341016560 0ustar davidpdavidp#!/usr/bin/perl # $Id: simple-example.pl 211 2008-01-19 15:30:31Z davidp $ # # A very quick and simple usage example for SMS::Send::AQL use strict; use SMS::Send; my $sender = SMS::Send->new('AQL', _username => 'user', _password => 'pass'); if (!$sender) { die "Failed to create instance of SMS::Send using SMS::Send::AQL driver"; } $sender->send_sms( to => '+447734123456', text => 'Text message content here', ) or die "Failed to send message"; SMS-Send-AQL-0.04/META.yml0000644000175000017500000000064111525340341014151 0ustar davidpdavidp--- #YAML:1.0 name: SMS-Send-AQL abstract: SMS::Send driver to send messages via AQL (www.aql.com) version: 0.03 author: - David Precious license: perl distribution_type: module requires: SMS::AQL: 0 SMS::Send::Driver: 0 perl: 5.005 build_requires: Test: 0 meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: hand SMS-Send-AQL-0.04/lib/0000755000175000017500000000000011525341775013461 5ustar davidpdavidpSMS-Send-AQL-0.04/lib/SMS/0000755000175000017500000000000011525341775014123 5ustar davidpdavidpSMS-Send-AQL-0.04/lib/SMS/Send/0000755000175000017500000000000011525341775015014 5ustar davidpdavidpSMS-Send-AQL-0.04/lib/SMS/Send/AQL.pm0000644000175000017500000000535511525341243015765 0ustar davidpdavidppackage SMS::Send::AQL; # $Id: AQL.pm 281 2008-03-09 01:54:50Z davidp $ use strict; use warnings; use SMS::AQL; our $VERSION = '0.04'; use base 'SMS::Send::Driver'; =head1 NAME SMS::Send::AQL - SMS::Send driver to send messages via AQL (www.aql.com) =head1 SYNOPSIS use SMS::Send; # Create a sender my $sender = SMS::Send->new('AQL', _login => 'your_aql_username', _password => 'your_aql_password', _sender => 'sender number', ); # Send a message my $sent = $sender->send_sms( text => 'This is a test message', to => '+61 (4) 1234 5678', ); if ( $sent ) { print "Message sent ok\n"; } else { print "Failed to send message\n"; } =head1 DESCRIPTION A driver for SMS::Send to send SMS text messages via AQL (www.aql.com) This is not intended to be used directly, but instead called by SMS::Send (see synopsis above for a basic illustration, and see SMS::Send's documentation for further information). =head1 METHODS =over 4 =item new Constructor, takes argument pairs passed by SMS::Send, returns an SMS::Send::AQL object. See usage synopsis for example, and see SMS::Send documentation for further info on using SMS::Send drivers. =cut sub new { my ($class, %args) = @_; my $self = bless { %args }, $class; # Previous versions of this module documented _username as the param name # for the username; unfortunately there's no "standard" for SMS::Send # drivers, but the general concensus seems to be to use _login, but we'll # continue to support _username too. if (!exists $args{_login} && exists $args{_username}) { $args{_login} = delete $args{_username}; } if (grep { ! $args{$_} } qw(_login _password)) { die "_login (or _username) and _password required"; } $self->{aql} = new SMS::AQL({ username => $args{_login}, password => $args{_password}, options => { sender => $args{_sender} || 'SMS::AQL', }, }); return $self; } =item send_sms Send the message - see SMS::Send for details. =cut sub send_sms { my ($self, %args) = @_; # AQL's gateway won't accept numbers in the format +441234567890, # it wants to see 00441234567890 instead: $args{to} =~ s/^\+/00/; return $self->{aql}->send_sms(@args{ qw (to text) }); } =back =head1 AUTHOR David Precious, Edavidp@preshweb.co.ukE =head1 COPYRIGHT AND LICENSE Copyright (C) 2008-2011 by David Precious This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available. =cut 1; __END__ SMS-Send-AQL-0.04/MANIFEST0000644000175000017500000000017711525340341014035 0ustar davidpdavidpChanges Makefile.PL MANIFEST README META.yml eg/simple-example.pl t/1-basic.t t/2-pod.t t/3-pod-coverage.t lib/SMS/Send/AQL.pm SMS-Send-AQL-0.04/Makefile.PL0000644000175000017500000000113311525340341014647 0ustar davidpdavidpuse 5.008000; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'SMS::Send::AQL', VERSION_FROM => 'lib/SMS/Send/AQL.pm', PREREQ_PM => { SMS::AQL => 0, SMS::Send::Driver => 0 }, NO_META => 1, ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/SMS/Send/AQL.pm', AUTHOR => 'David Precious ') : ()), ); # $Id: Makefile.PL 280 2008-03-09 01:53:31Z davidp $ SMS-Send-AQL-0.04/Changes0000644000175000017500000000060011525341477014201 0ustar davidpdavidpRevision history for Perl extension SMS::Send::AQL. 0.04 2011-02-11 - Document _login as correct way to supply username 0.03 2008-03-09 - Kwalitee-boosting (include META.yml with valid licence) 0.02 2008-01-19 - stupidly forgot to declare SMS::Send::Driver as a pre-req 0.01 2008-01-19 - original version $Id: Changes 280 2008-03-09 01:53:31Z davidp $