From: Rafał Długołęcki Date: Sun, 6 Jan 2013 00:36:11 +0000 (+0100) Subject: Code formatting. X-Git-Tag: 0.1~2 X-Git-Url: https://git.dlugolecki.net.pl/?p=sms.git;a=commitdiff_plain;h=f66e7c4291181ca98e32636c8d9640b7866a0d45 Code formatting. --- diff --git a/sms.pl b/sms.pl index 647cb34..4104fbc 100755 --- a/sms.pl +++ b/sms.pl @@ -8,17 +8,16 @@ use Mojo::DOM; use Config::General; use Data::Dumper; -#Usage: -# sms.pl MOBILE_NO "TEXT_MESSAGE" +# Usage: +# sms.pl MOBILE_NO "TEXT_MESSAGE" # -# You need to set sms.conf file in the scripts directory and fill it -# like this: -# login LOGIN -# password PASSWORD +# You need to set .smsrc file in the HOME directory and fill it like this: +# login = LOGIN +# password = PASSWORD # # where LOGIN and PASSWORD are your credentials to orange.pl site -my $conf = new Config::General("sms.conf"); +my $conf = new Config::General("$ENV{HOME}/.smsrc"); my %config = $conf->getall; die "No login in config file. Stopped" unless $config{login}; die "No password in config file. Stopped" unless $config{password}; @@ -33,8 +32,8 @@ $mech->get("http://orange.pl"); $mech->submit_form( form_id => 'loginForm', fields => { - '/tp/core/profile/login/ProfileLoginFormHandler.value.login' => $config{login}, - '/tp/core/profile/login/ProfileLoginFormHandler.value.password' => $config{password} + '/tp/core/profile/login/ProfileLoginFormHandler.value.login' => $config{login}, + '/tp/core/profile/login/ProfileLoginFormHandler.value.password' => $config{password} } ); $mech->follow_link( text => 'SMS');