File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 11Revision history for SMS-API-CMTelecom
22
3- 0.01 Date/time
3+ 0.02 2017-04-29
4+ Added a driver for SMS::Send.
5+
6+ 0.01 2017-04-29
47 First version, released on an unsuspecting world.
58
Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ RUN cpanm LWP::UserAgent
44RUN cpanm LWP::Protocol::https
55RUN cpanm JSON
66RUN cpanm Test::CheckManifest Test::Pod::Coverage Test::Pod
7+ RUN cpanm SMS::Send
78
89WORKDIR /app
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ WriteMakefile(
1919 ' Test::CheckManifest' => 0,
2020 ' Test::Pod::Coverage' => 0,
2121 ' Test::Pod' => 0,
22+ ' SMS::Send' => 0,
2223 },
2324 PREREQ_PM => {
2425 ' LWP::UserAgent' => 0,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Version 0.01
1616
1717=cut
1818
19- our $VERSION = ' 0.01 ' ;
19+ our $VERSION = ' 0.02 ' ;
2020
2121
2222=head1 SYNOPSIS
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ subtest simple_message => sub {
4040 is_deeply $res , {
4141 messages => [
4242 {
43- to => $phone_number ,
43+ to => clean_number( $phone_number ) ,
4444 parts => 1,
4545 reference => undef ,
4646 messageDetails => undef ,
@@ -72,7 +72,7 @@ subtest simple_message_with_reference => sub {
7272 is_deeply $res , {
7373 messages => [
7474 {
75- to => $phone_number ,
75+ to => clean_number( $phone_number ) ,
7676 parts => 1,
7777 reference => $reference ,
7878 messageDetails => undef ,
@@ -83,3 +83,8 @@ subtest simple_message_with_reference => sub {
8383 is $sms -> error_message, undef , ' error message is empty' ;
8484};
8585
86+ sub clean_number {
87+ my $num = shift ;
88+ $num =~ s /\D // g ;
89+ return $num ;
90+ }
You can’t perform that action at this time.
0 commit comments