From f66e7c4291181ca98e32636c8d9640b7866a0d45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Sun, 6 Jan 2013 01:36:11 +0100 Subject: [PATCH] Code formatting. --- sms.pl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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'); -- 2.30.2