| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Catalyst::Model::SMS; |
|
2
|
4
|
|
|
4
|
|
3986730
|
use Moose; |
|
|
4
|
|
|
|
|
732030
|
|
|
|
4
|
|
|
|
|
37
|
|
|
3
|
4
|
|
|
4
|
|
32087
|
use SMS::Send; |
|
|
4
|
|
|
|
|
32606
|
|
|
|
4
|
|
|
|
|
519
|
|
|
4
|
|
|
|
|
|
|
extends 'Catalyst::Model::Adaptor'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Easy SMS sending from Catalyst Apps. |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.4'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->config( class => 'SMS::Send' ); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has driver => ( |
|
13
|
|
|
|
|
|
|
is => 'ro', |
|
14
|
|
|
|
|
|
|
isa => 'Str', |
|
15
|
|
|
|
|
|
|
default => 'Test', |
|
16
|
|
|
|
|
|
|
); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub mangle_arguments { |
|
19
|
2
|
|
|
2
|
1
|
6417
|
my ( $self, $args ) = @_; |
|
20
|
|
|
|
|
|
|
|
|
21
|
2
|
|
33
|
|
|
14
|
my $driver = delete $args->{driver} || $self->driver; |
|
22
|
2
|
|
|
|
|
26
|
return $driver, %$args; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
26
|
|
|
|
|
|
|
1; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Catalyst::Model::SMS - Easy SMS sending from Catalyst Apps. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 0.5 |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# on the shell |
|
50
|
|
|
|
|
|
|
$ script/myapp_create.pl model SMS |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# in myapp.conf |
|
53
|
|
|
|
|
|
|
<Model::SMS> |
|
54
|
|
|
|
|
|
|
driver Test |
|
55
|
|
|
|
|
|
|
<args> |
|
56
|
|
|
|
|
|
|
_login admin |
|
57
|
|
|
|
|
|
|
_password pa55w0rD |
|
58
|
|
|
|
|
|
|
</args> |
|
59
|
|
|
|
|
|
|
</Model::SMS> |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L<Catalyst::Model::SMS> is a thin proxy around SMS::Send. It can |
|
64
|
|
|
|
|
|
|
be initialized using the Catalyst configuration file or method. |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 NAME |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Catalyst::Model::SMS - Catalyst Model for SMS::Send |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 OPTIONS |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 driver |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L<SMS::Send> driver name. You may specify 'Test' if you need a testing driver. |
|
75
|
|
|
|
|
|
|
This module will default to 'Test' if this is not specified. See L<SMS::Send> |
|
76
|
|
|
|
|
|
|
for more information. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 args |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<SMS::Send> arguments specific to the selected driver. These options are |
|
81
|
|
|
|
|
|
|
passed directly to the appropriate L<SMS::Send> driver. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 METHODS |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 mangle_arguments |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
overridden method imported from Catalyst::Model::Adaptor. This method is |
|
88
|
|
|
|
|
|
|
passed the arguments, and returns them in a way suitable for SMS::Send->new |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 AUTHOR |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Martin Atukunda, <matlads@cpan.org> |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Copyright 2013 the above author(s). |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 LICENSE |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This sofware is free software, and is licensed under the same terms as perl itself. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 AUTHOR |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Martin Atukunda <matlads@cpan.org> |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This software is copyright (c) 2013 - 2017 by Martin Atukunda. |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
111
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=cut |