The unified diff between revisions [de4db4df..] and [9eeb88a3..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'orangelogin.pl'

#
# old_revision [de4db4dfdb5b06db3036c818377dc60413897099]
# new_revision [9eeb88a332c3478da83dc4c56e77bff12f9d4e74]
#
# patch "orangelogin.pl"
#  from [5c2b702d6898933698a423b082a2864756f9737e]
#    to [f8a25254f258fcb8a3de0948fe3815aa6bb4200d]
#
============================================================
--- orangelogin.pl	5c2b702d6898933698a423b082a2864756f9737e
+++ orangelogin.pl	f8a25254f258fcb8a3de0948fe3815aa6bb4200d
@@ -28,13 +28,13 @@ $username = $options{'username'};
 close CONFIG;
 
 $username = $options{'username'};
-die "username not set" unless defined($username);
+error("username not set") unless defined($username);
 
 $password = $options{'password'};
-die "password not set" unless defined($password);
+error("password not set") unless defined($password);
 
 $downloaddir = $options{'downloaddir'};
-die "downloaddir not set" unless defined($downloaddir);
+error("downloaddir not set") unless defined($downloaddir);
 
 print "Fetching homepage\n";
 $mech->get("https://www.orange.co.uk/");
@@ -74,7 +74,6 @@ for $link (@links) {
     my ($invoice) = $url =~ /leg_invoice=(\d+)/;
     my $filename = $downloaddir . '/' . $invoice . ".pdf";
     unless (-e $filename) {
-#	print "Downloading invoice $invoice to $filename from $url\n";
 	print "Downloading invoice $invoice to $filename\n";
         downloadbill($url, $filename);
         #$mech->mirror($url, $filename);
@@ -83,13 +82,6 @@ for $link (@links) {
     }
 }
 
-#$mech->follow_link( text_regex => qr/log out/ );
-
-#print $mech->content();
-
-#$mech->dump_forms( undef, $absolute );
-#$mech->dump_links( undef, $absolute );
-
 sub follow_processing {
     my $url, $attempts;
 
@@ -105,7 +97,6 @@ sub follow_processing {
 
         $url =~ s/&/&/g;
 
-#        print "Attempt $attempts. Found URL: $url\n";
 	print "Waiting for processing. Attempt $attempts.\n";
 
         my $newurl = $mech->uri();
@@ -113,8 +104,6 @@ sub follow_processing {
         $newurl =~ s/\/[^\/]*$//;
         $newurl = $newurl . "/" . $url;
 
-#        print "I think I'm going to $newurl\n";
-
         $mech->get($newurl);
         print "Processing finished.\n";
     }