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