Bug 18789: (QA follow-up) Fix viewlog when accessed via circulation
[koha.git] / tools / background-job-progress.pl
index a5fc47d..625389f 100755 (executable)
@@ -17,8 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-#use warnings; FIXME - Bug 2505
+use Modern::Perl;
 
 # standard or CPAN modules used
 use IO::File;
@@ -30,8 +29,8 @@ use C4::BackgroundJob;
 use CGI::Cookie; # need to check cookies before
                  # having CGI parse the POST request
 
-my $input = new CGI;
-my %cookies = fetch CGI::Cookie;
+my $input = CGI->new;
+my %cookies = CGI::Cookie->fetch;
 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { tools => '*' });
 if ($auth_status ne "ok") {
     my $reply = CGI->new("");
@@ -51,7 +50,7 @@ if (defined $job) {
     $job_status = $job->status();
 }
 
-my $reply = CGI->new("");
+my $reply = CGI->new;
 print $reply->header(-type => 'text/html');
 # response will be sent back as JSON
 print '{"progress":"' . $reported_progress . '","job_size":"' . $job_size . '","job_status":"' . $job_status . '"}';