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};
$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');