Bug 25898: Prohibit indirect object notation
authorJulian Maurice <julian.maurice@biblibre.com>
Mon, 29 Jun 2020 17:07:54 +0000 (21:07 +0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 15 Oct 2020 10:56:30 +0000 (12:56 +0200)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
509 files changed:
.perlcriticrc
C4/Auth.pm
C4/AuthoritiesMarc.pm
C4/Breeding.pm
C4/Context.pm
C4/InstallAuth.pm
C4/Languages.pm
C4/Record.pm
C4/SIP/Sip/Configuration.pm
C4/SIP/t/SIPtest.pm
C4/SIP/xmlparse.pl
C4/Search.pm
C4/Service.pm
Koha/Illrequest/Logger.pm
Koha/OAI/Server/DeletedRecord.pm
Koha/OAI/Server/GetRecord.pm
Koha/OAI/Server/ListBase.pm
Koha/OAI/Server/ListIdentifiers.pm
Koha/OAI/Server/ListRecords.pm
Koha/OAI/Server/ListSets.pm
Koha/OAI/Server/Record.pm
Koha/OAI/Server/Repository.pm
Koha/Patron/Discharge.pm
Koha/SuggestionEngine/Plugin/ExplodedTerms.pm
Koha/pdfformat/layout2pages.pm
Koha/pdfformat/layout2pagesde.pm
Koha/pdfformat/layout3pages.pm
Koha/pdfformat/layout3pagesfr.pm
about.pl
acqui/add_user_search.pl
acqui/addorder.pl
acqui/addorderiso2709.pl
acqui/ajax-getauthvaluedropbox.pl
acqui/basket.pl
acqui/basketgroup.pl
acqui/basketheader.pl
acqui/cancelorder.pl
acqui/check_budget_total.pl
acqui/check_uniqueness.pl
acqui/duplicate_orders.pl
acqui/finishreceive.pl
acqui/histsearch.pl
acqui/invoice-files.pl
acqui/invoice.pl
acqui/lateorders-export.pl
acqui/lateorders.pl
acqui/modordernotes.pl
acqui/neworderempty.pl
acqui/newordersubscription.pl
acqui/newordersuggestion.pl
acqui/ordered.pl
acqui/orderreceive.pl
acqui/parcel.pl
acqui/showorder.pl
acqui/spent.pl
acqui/transferorder.pl
acqui/uncertainprice.pl
acqui/updatesupplier.pl
acqui/z3950_search.pl
admin/add_user_search.pl
admin/additional-fields.pl
admin/admin-home.pl
admin/adveditorshortcuts.pl
admin/aqbudgetperiods.pl
admin/aqbudgets.pl
admin/aqcontract.pl
admin/aqplan.pl
admin/audio_alerts.pl
admin/auth_subfields_structure.pl
admin/auth_tag_structure.pl
admin/authorised_values.pl
admin/authtypes.pl
admin/biblio_framework.pl
admin/branch_transfer_limits.pl
admin/categories.pl
admin/check_budget_parent.pl
admin/check_parent_total.pl
admin/checkmarc.pl
admin/cities.pl
admin/classsources.pl
admin/clone-rules.pl
admin/columns_settings.pl
admin/credit_types.pl
admin/debit_types.pl
admin/desks.pl
admin/didyoumean.pl
admin/import_export_framework.pl
admin/item_circulation_alerts.pl
admin/items_search_field.pl
admin/items_search_fields.pl
admin/itemtypes.pl
admin/koha2marclinks.pl
admin/library_groups.pl
admin/localization.pl
admin/marc_subfields_structure.pl
admin/marctagstructure.pl
admin/matching-rules.pl
admin/oai_set_mappings.pl
admin/oai_sets.pl
admin/patron-attr-types.pl
admin/preferences.pl
admin/searchengine/elasticsearch/mappings.pl
admin/share_content.pl
admin/sms_providers.pl
admin/sru_modmapping.pl
admin/systempreferences.pl
admin/transport-cost-matrix.pl
admin/usage_statistics.pl
admin/z3950servers.pl
authorities/auth_finder.pl
authorities/authorities-home.pl
authorities/authorities.pl
authorities/blinddetail-biblio-search.pl
authorities/detail-biblio-search.pl
authorities/detail.pl
authorities/export.pl
authorities/merge.pl
authorities/ysearch.pl
basket/basket.pl
basket/downloadcart.pl
catalogue/ISBDdetail.pl
catalogue/MARCdetail.pl
catalogue/export.pl
catalogue/getitem-ajax.pl
catalogue/image.pl
catalogue/imageviewer.pl
catalogue/issuehistory.pl
catalogue/item-export.pl
catalogue/itemsearch.pl
catalogue/labeledMARCdetail.pl
catalogue/moredetail.pl
catalogue/search-history.pl
catalogue/search.pl
catalogue/showmarc.pl
catalogue/stockrotation.pl
catalogue/updateitem.pl
cataloguing/addbiblio.pl
cataloguing/addbooks.pl
cataloguing/additem.pl
cataloguing/merge.pl
cataloguing/plugin_launcher.pl
cataloguing/value_builder/unimarc_field_210c.pl
cataloguing/value_builder/unimarc_field_4XX.pl
cataloguing/ysearch.pl
cataloguing/z3950_auth_search.pl
cataloguing/z3950_search.pl
changelanguage.pl
circ/add_message.pl
circ/article-request-slip.pl
circ/article-requests.pl
circ/bookcount.pl
circ/branchoverdues.pl
circ/branchtransfers.pl
circ/checkout-notes.pl
circ/circulation-home.pl
circ/circulation.pl
circ/del_message.pl
circ/hold-transfer-slip.pl
circ/offline-mf.pl
circ/offline.pl
circ/on-site_checkouts.pl
circ/overdue.pl
circ/pendingreserves.pl
circ/renew.pl
circ/request-article.pl
circ/reserveratios.pl
circ/returns.pl
circ/transfer-slip.pl
circ/transferstoreceive.pl
circ/view_holdsqueue.pl
circ/waitingreserves.pl
circ/ypattrodue-attr-search-authvalue.pl
circ/ysearch.pl
clubs/club-enrollments.pl
clubs/clubs-add-modify.pl
clubs/clubs.pl
clubs/patron-clubs-tab.pl
clubs/patron-enroll.pl
clubs/templates-add-modify.pl
course_reserves/add_items.pl
course_reserves/batch_add_items.pl
course_reserves/course-details.pl
course_reserves/course-reserves.pl
course_reserves/course.pl
course_reserves/mod_course.pl
docs/CAS/CASProxy/examples/koha_webservice.pl
docs/CAS/CASProxy/examples/proxy_cas.pl
docs/CAS/CASProxy/examples/proxy_cas_callback.pl
docs/CAS/CASProxy/examples/proxy_cas_data.pl
help.pl
installer/install.pl
installer/onboarding.pl
labels/label-create-csv.pl
labels/label-create-pdf.pl
labels/label-create-xml.pl
labels/label-edit-batch.pl
labels/label-edit-layout.pl
labels/label-edit-profile.pl
labels/label-edit-range.pl
labels/label-edit-template.pl
labels/label-home.pl
labels/label-item-search.pl
labels/label-manage.pl
labels/label-print.pl
labels/spinelabel-home.pl
labels/spinelabel-print.pl
mainpage.pl
members/accountline-details.pl
members/apikeys.pl
members/boraccount.pl
members/deletemem.pl
members/discharge.pl
members/discharges.pl
members/guarantor_search.pl
members/ill-requests.pl
members/mancredit.pl
members/maninvoice.pl
members/member-flags.pl
members/member-password.pl
members/member.pl
members/memberentry.pl
members/members-home.pl
members/members-update-do.pl
members/members-update.pl
members/merge-patrons.pl
members/mod_debarment.pl
members/notices.pl
members/patronimage.pl
members/print_overdues.pl
members/printfeercpt.pl
members/printinvoice.pl
members/printslip.pl
members/purchase-suggestions.pl
members/routing-lists.pl
members/setstatus.pl
members/statistics.pl
members/update-child.pl
misc/batchImportMARCWithBiblionumbers.pl
misc/cronjobs/check-url.pl
misc/cronjobs/cloud-kw.pl
misc/cronjobs/gather_print_notices.pl
misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl
misc/migration_tools/ifla/update.pl
misc/translator/LangInstaller.pm
misc/translator/po2json
offline_circ/download.pl
opac/clubs/clubs-tab.pl
opac/clubs/enroll.pl
opac/errors/400.pl
opac/errors/401.pl
opac/errors/402.pl
opac/errors/403.pl
opac/errors/404.pl
opac/errors/500.pl
opac/external/overdrive/auth.pl
opac/ilsdi.pl
opac/maintenance.pl
opac/opac-account-pay-paypal-return.pl
opac/opac-account-pay-return.pl
opac/opac-account-pay.pl
opac/opac-account.pl
opac/opac-addbybiblionumber.pl
opac/opac-alert-subscribe.pl
opac/opac-article-request-cancel.pl
opac/opac-authorities-home.pl
opac/opac-authoritiesdetail.pl
opac/opac-basket.pl
opac/opac-blocked.pl
opac/opac-browse.pl
opac/opac-browser.pl
opac/opac-changelanguage.pl
opac/opac-course-details.pl
opac/opac-course-reserves.pl
opac/opac-discharge.pl
opac/opac-downloadshelf.pl
opac/opac-ics.pl
opac/opac-idref.pl
opac/opac-illrequests.pl
opac/opac-image.pl
opac/opac-imageviewer.pl
opac/opac-issue-note.pl
opac/opac-main.pl
opac/opac-memberentry.pl
opac/opac-modrequest-suspend.pl
opac/opac-modrequest.pl
opac/opac-news-rss.pl
opac/opac-overdrive-search.pl
opac/opac-passwd.pl
opac/opac-password-recovery.pl
opac/opac-patron-consent.pl
opac/opac-patron-image.pl
opac/opac-privacy.pl
opac/opac-readingrecord.pl
opac/opac-recordedbooks-search.pl
opac/opac-registration-verify.pl
opac/opac-renew.pl
opac/opac-reportproblem.pl
opac/opac-request-article.pl
opac/opac-reserve.pl
opac/opac-restrictedpage.pl
opac/opac-review.pl
opac/opac-routing-lists.pl
opac/opac-search-history.pl
opac/opac-search.pl
opac/opac-sendshelf.pl
opac/opac-serial-issues.pl
opac/opac-shareshelf.pl
opac/opac-shelves.pl
opac/opac-showmarc.pl
opac/opac-showreviews.pl
opac/opac-suggestions.pl
opac/opac-tags_subject.pl
opac/opac-topissues.pl
opac/opac-user.pl
opac/sci/sci-main.pl
opac/sco/help.pl
opac/sco/printslip.pl
opac/sco/sco-main.pl
opac/svc/checkout_notes
opac/svc/club/cancel_enrollment
opac/svc/club/enroll
opac/svc/overdrive
opac/svc/overdrive_proxy
opac/svc/recordedbooks
opac/svc/shelfbrowser.pl
opac/svc/suggestion
opac/tracklinks.pl
patron_lists/add-modify.pl
patron_lists/delete.pl
patron_lists/list.pl
patron_lists/lists.pl
patron_lists/patrons.pl
patroncards/add_user_search.pl
patroncards/create-pdf.pl
patroncards/edit-batch.pl
patroncards/edit-layout.pl
patroncards/edit-profile.pl
patroncards/edit-template.pl
patroncards/home.pl
patroncards/manage.pl
patroncards/print.pl
plugins/plugins-enable.pl
plugins/plugins-home.pl
plugins/plugins-uninstall.pl
plugins/plugins-upload.pl
plugins/run.pl
reports/acquisitions_stats.pl
reports/bor_issues_top.pl
reports/borrowers_out.pl
reports/borrowers_stats.pl
reports/cash_register_stats.pl
reports/cat_issues_top.pl
reports/catalogue_out.pl
reports/catalogue_stats.pl
reports/dictionary.pl
reports/guided_reports.pl
reports/issues_avg_stats.pl
reports/itemslost.pl
reports/manager.pl
reports/orders_by_fund.pl
reports/reports-home.pl
reports/reserves_stats.pl
reports/serials_stats.pl
reserve/modrequest.pl
reserve/modrequest_suspendall.pl
reserve/request.pl
reviews/reviewswaiting.pl
rotating_collections/addItems.pl
rotating_collections/editCollections.pl
rotating_collections/rotatingCollections.pl
rotating_collections/transferCollection.pl
serials/acqui-search-result.pl
serials/acqui-search.pl
serials/add_user_search.pl
serials/checkexpiration.pl
serials/create-numberpattern.pl
serials/lateissues-export.pl
serials/routing-preview.pl
serials/routing.pl
serials/serials-collection.pl
serials/serials-home.pl
serials/serials-search.pl
serials/showpredictionpattern.pl
serials/subscription-batchedit.pl
serials/subscription-bib-search.pl
serials/subscription-detail.pl
serials/subscription-frequencies.pl
serials/subscription-frequency.pl
serials/subscription-history.pl
serials/subscription-numberpattern.pl
serials/subscription-numberpatterns.pl
serials/subscription-renew.pl
serials/viewalerts.pl
services/itemrecorddisplay.pl
suggestion/add_user_search.pl
suggestion/suggester_search.pl
svc/article_request
svc/authentication
svc/barcode
svc/bib
svc/bib_framework
svc/bib_profile
svc/checkin
svc/checkout_notes
svc/checkouts
svc/club/cancel_enrollment
svc/club/delete
svc/club/enroll
svc/club/template/delete
svc/cover_images
svc/creator_batches
svc/hold/resume
svc/hold/suspend
svc/holds
svc/import_bib
svc/letters/preview
svc/mana/increment
svc/mana/search
svc/mana/share
svc/mana/use
svc/members/add_to_list
svc/members/search
svc/new_bib
svc/problem_reports
svc/renew
svc/return_claims
svc/virtualshelves/search
t/Auth_with_shibboleth.t
t/Calendar.t
t/Context.t
t/DateUtils.t
t/Koha_MetadataRecord.t
t/Koha_Template_Plugin_Koha.t
t/Languages.t
t/Output_JSONStream.t
t/Search/History.t
t/SuggestionEngine_AuthorityFile.t
t/db_dependent/00-strict.t
t/db_dependent/Accounts.t
t/db_dependent/Acquisition.t
t/db_dependent/Auth.t
t/db_dependent/Auth_with_cas.t
t/db_dependent/AuthoritiesMarc.t
t/db_dependent/BackgroundJob.t
t/db_dependent/Biblio.t
t/db_dependent/Circulation.t
t/db_dependent/Circulation/CheckIfIssuedToPatron.t
t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t
t/db_dependent/Creators/Lib.t
t/db_dependent/FrameworkPlugin.t
t/db_dependent/ILSDI_Services.t
t/db_dependent/Items.t
t/db_dependent/Koha/Account.t
t/db_dependent/Koha/Account/Line.t
t/db_dependent/Koha/Patron/Messages.t
t/db_dependent/Koha/Patrons.t
t/db_dependent/Koha/Z3950Responder/GenericSession.t
t/db_dependent/Koha/Z3950Responder/ZebraSession.t
t/db_dependent/Members/GetAllIssues.t
t/db_dependent/Members/IssueSlip.t
t/db_dependent/Record.t
t/db_dependent/RecordProcessor_EmbedSeeFromHeadings.t
t/db_dependent/Reserves/GetReserveFee.t
t/db_dependent/Search.t
t/db_dependent/Search/History.t
t/db_dependent/Serials.t
t/db_dependent/SuggestionEngine_ExplodedTerms.t
t/db_dependent/TablesSettings.t
t/db_dependent/Template/Plugin/KohaDates.t
t/db_dependent/XISBN.t
t/db_dependent/api/v1/checkouts.t
t/lib/Mocks.pm
tools/access_files.pl
tools/ajax-inventory.pl
tools/automatic_item_modification_by_age.pl
tools/batchMod.pl
tools/batch_delete_records.pl
tools/batch_extend_due_dates.pl
tools/batch_record_modification.pl
tools/batch_records_ajax.pl
tools/cleanborrowers.pl
tools/copy-holidays.pl
tools/csv-profiles.pl
tools/exceptionHolidays.pl
tools/export.pl
tools/holidays.pl
tools/koha-news.pl
tools/letter.pl
tools/manage-marc-import.pl
tools/marc_modification_templates.pl
tools/modborrowers.pl
tools/newHolidays.pl
tools/overduerules.pl
tools/picture-upload.pl
tools/problem-reports.pl
tools/quotes-upload.pl
tools/quotes.pl
tools/quotes/quotes-upload_ajax.pl
tools/scheduler.pl
tools/showdiffmarc.pl
tools/stage-marc-import.pl
tools/stockrotation.pl
tools/tools-home.pl
tools/upload-cover-image.pl
tools/viewlog.pl
virtualshelves/addbybiblionumber.pl
virtualshelves/downloadshelf.pl
virtualshelves/shelves.pl
xt/author/valid-templates.t

index 9a4dcf4..1e92686 100644 (file)
@@ -1,5 +1,5 @@
 severity = 5
-include = ProhibitUnusedVariables
+include = ProhibitUnusedVariables Objects::ProhibitIndirectSyntax
 exclude = Miscellanea::RequireRcsKeywords
 
 [Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval]
index a252eae..9c52c79 100644 (file)
@@ -1804,7 +1804,7 @@ sub _get_session_params {
 sub get_session {
     my $sessionID      = shift;
     my $params = _get_session_params();
-    return new CGI::Session( $params->{dsn}, $sessionID, $params->{dsn_args} );
+    return CGI::Session->new( $params->{dsn}, $sessionID, $params->{dsn_args} );
 }
 
 
index cbf59cd..9fa4d4f 100644 (file)
@@ -227,7 +227,7 @@ sub SearchAuthorities {
     my @oAuth;
     my $i;
     $oAuth[0]=C4::Context->Zconn("authorityserver" , 1);
-    my $Anewq= new ZOOM::Query::PQF($query,$oAuth[0]);
+    my $Anewq= ZOOM::Query::PQF->new($query,$oAuth[0]);
     my $oAResult;
     $oAResult= $oAuth[0]->search($Anewq) ;
     while (($i = ZOOM::event(\@oAuth)) != 0) {
index 8287cf4..2a4ce3c 100644 (file)
@@ -159,7 +159,7 @@ sub Z3950Search {
         $oResult[$s] =
             $server->{servertype} eq 'zed'?
                 $oConnection[$s]->search_pqf( $server_zquery ):
-                $oConnection[$s]->search(new ZOOM::Query::CQL(
+                $oConnection[$s]->search(ZOOM::Query::CQL->new(
                     _translate_query( $server, $squery )));
         $s++;
     }
@@ -430,7 +430,7 @@ sub _isbn_replace {
 
 sub _create_connection {
     my ( $server ) = @_;
-    my $option1= new ZOOM::Options();
+    my $option1= ZOOM::Options->new();
     $option1->option( 'async' => 1 );
     $option1->option( 'elementSetName', 'F' );
     $option1->option( 'preferredRecordSyntax', $server->{syntax} );
@@ -568,7 +568,7 @@ sub Z3950SearchAuth {
             }
             else {
                 $oResult[$s] = $oConnection[$s]->search(
-                    new ZOOM::Query::CQL(_translate_query( $server, $squery ))
+                    ZOOM::Query::CQL->new(_translate_query( $server, $squery ))
                 );
             }
             $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
index 585332c..58a6ad5 100644 (file)
@@ -637,7 +637,7 @@ sub _new_Zconn {
     my $password = $context->{"serverinfo"}->{$server}->{"password"};
     eval {
         # set options
-        my $o = new ZOOM::Options();
+        my $o = ZOOM::Options->new();
         $o->option(user => $user) if $user && $password;
         $o->option(password => $password) if $user && $password;
         $o->option(async => 1) if $async;
index a753754..7ed980b 100644 (file)
@@ -243,7 +243,7 @@ sub checkauth {
     if ( $sessionID = $query->cookie("CGISESSID") ) {
         C4::Context->_new_userenv($sessionID);
         my $session =
-          new CGI::Session( "driver:File;serializer:yaml", $sessionID,
+          CGI::Session->new( "driver:File;serializer:yaml", $sessionID,
             { Directory => $sessdir } );
         if ( $session->param('cardnumber') ) {
             C4::Context->set_userenv(
@@ -283,7 +283,7 @@ sub checkauth {
     }
     unless ($userid) {
         my $session =
-          new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => $sessdir } );
+          CGI::Session->new( "driver:File;serializer:yaml", undef, { Directory => $sessdir } );
         $sessionID = $session->id;
         $userid    = $query->param('userid');
         C4::Context->_new_userenv($sessionID);
index 6aa1201..2dc838a 100644 (file)
@@ -603,7 +603,7 @@ sub getlanguage {
         return $cached if $cached;
     }
 
-    $cgi //= new CGI;
+    $cgi //= CGI->new;
     my $interface = C4::Context->interface;
     my $theme = C4::Context->preference( ( $interface eq 'opac' ) ? 'opacthemes' : 'template' );
     my $language;
index 1916a1b..c390c7e 100644 (file)
@@ -375,7 +375,7 @@ sub marc2endnote {
         Year => $marc_rec_obj->publication_date,
         Abstract => $abstract,
     };
-    my $style = new Biblio::EndnoteStyle();
+    my $style = Biblio::EndnoteStyle->new();
     my $template;
     $template.= "DB - DB\n" if C4::Context->preference("LibraryName");
     $template.="T1 - Title\n" if $marc_rec_obj->title();
index fd2c3e7..3f5bdaa 100644 (file)
@@ -12,7 +12,7 @@ use XML::Simple qw(:strict);
 
 use C4::SIP::Sip qw(siplog);
 
-my $parser = new XML::Simple(
+my $parser = XML::Simple->new(
     KeyAttr => {
         login       => '+id',
         institution => '+id',
index a9a1ea5..6d750a7 100644 (file)
@@ -263,7 +263,7 @@ sub run_sip_tests {
     $Sip::error_detection = 1;
     $/ = "\015\012";   # must use correct record separator
 
-    $sock = new IO::Socket::INET(PeerAddr => $server,
+    $sock = IO::Socket::INET->new(PeerAddr => $server,
                                 Type     => SOCK_STREAM);
 
     BAIL_OUT('failed to create connection to server') unless $sock;
index 77ed535..0d8460f 100755 (executable)
@@ -13,7 +13,7 @@ use English;
 use XML::Simple qw(:strict);
 use Data::Dumper;
 
-my $parser = new XML::Simple( KeyAttr   => { login => '+id',
+my $parser = XML::Simple->new( KeyAttr   => { login => '+id',
                                             institution => '+id',
                                             service => '+port', },
                              GroupTags =>  { listeners => 'service',
index 5509a5b..f2e73ee 100644 (file)
@@ -224,7 +224,7 @@ sub SimpleSearch {
         eval {
             $zconns[$i] = C4::Context->Zconn( $servers[$i], 1 );
             $query =~ s/:/=/g unless $options{skip_normalize};
-            $zoom_queries[$i] = new ZOOM::Query::CCL2RPN( $query, $zconns[$i]);
+            $zoom_queries[$i] = ZOOM::Query::CCL2RPN->new( $query, $zconns[$i]);
             $tmpresults[$i] = $zconns[$i]->search( $zoom_queries[$i] );
 
             # error handling
@@ -337,18 +337,18 @@ sub getRecords {
             if ($query_type) {
                 if ($query_type =~ /^ccl/) {
                     $query_to_use =~ s/\:/\=/g;    # change : to = last minute (FIXME)
-                    $results[$i] = $zconns[$i]->search(new ZOOM::Query::CCL2RPN($query_to_use, $zconns[$i]));
+                    $results[$i] = $zconns[$i]->search(ZOOM::Query::CCL2RPN->new($query_to_use, $zconns[$i]));
                 } elsif ($query_type =~ /^cql/) {
-                    $results[$i] = $zconns[$i]->search(new ZOOM::Query::CQL($query_to_use, $zconns[$i]));
+                    $results[$i] = $zconns[$i]->search(ZOOM::Query::CQL->new($query_to_use, $zconns[$i]));
                 } elsif ($query_type =~ /^pqf/) {
-                    $results[$i] = $zconns[$i]->search(new ZOOM::Query::PQF($query_to_use, $zconns[$i]));
+                    $results[$i] = $zconns[$i]->search(ZOOM::Query::PQF->new($query_to_use, $zconns[$i]));
                 } else {
                     warn "Unknown query_type '$query_type'.  Results undetermined.";
                 }
             } elsif ($scan) {
-                    $results[$i] = $zconns[$i]->scan(  new ZOOM::Query::CCL2RPN($query_to_use, $zconns[$i]));
+                    $results[$i] = $zconns[$i]->scan(  ZOOM::Query::CCL2RPN->new($query_to_use, $zconns[$i]));
             } else {
-                    $results[$i] = $zconns[$i]->search(new ZOOM::Query::CCL2RPN($query_to_use, $zconns[$i]));
+                    $results[$i] = $zconns[$i]->search(ZOOM::Query::CCL2RPN->new($query_to_use, $zconns[$i]));
             }
         };
         if ($@) {
index fa95a61..bdb2ba1 100644 (file)
@@ -86,7 +86,7 @@ passed to C<return_success()>.
 sub init {
     my ( $class, %needed_flags ) = @_;
 
-    our $query = new CGI;
+    our $query = CGI->new;
 
     my ( $status, $cookie_, $sessionID ) = check_api_auth( $query, \%needed_flags );
 
@@ -94,7 +94,7 @@ sub init {
 
     $class->return_error( 'auth', $status ) if ( $status ne 'ok' );
 
-    return ( $query, new C4::Output::JSONStream );
+    return ( $query, C4::Output::JSONStream->new );
 }
 
 =head2 return_error
@@ -119,7 +119,7 @@ param => value pairs.
 sub return_error {
     my ( $class, $type, $error, %flags ) = @_;
 
-    my $response = new C4::Output::JSONStream;
+    my $response = C4::Output::JSONStream->new;
 
     $response->param( message => $error ) if ( $error );
     $response->param( type => $type, %flags );
@@ -152,7 +152,7 @@ structure verbatim.
 sub return_multi {
     my ( $class, $responses, @flags ) = @_;
 
-    my $response = new C4::Output::JSONStream;
+    my $response = C4::Output::JSONStream->new;
 
     if ( !@$responses ) {
         $class->return_success( $response );
index 45042a8..a899a8d 100644 (file)
@@ -65,7 +65,7 @@ sub new {
         }
     };
 
-    my $query = new CGI; # To keep C4::Templates::_get_template_file() from complaining
+    my $query = CGI->new; # To keep C4::Templates::_get_template_file() from complaining
     my ( $htdocs, $theme, $lang, $base ) =
         C4::Templates::_get_template_file('ill/log/', 'intranet', $query);
 
index 7d03f67..e865b28 100644 (file)
@@ -30,7 +30,7 @@ sub new {
     my $self = $class->SUPER::new(%args);
 
     $timestamp =~ s/ /T/, $timestamp .= 'Z';
-    $self->header( new HTTP::OAI::Header(
+    $self->header( HTTP::OAI::Header->new(
         status      => 'deleted',
         identifier  => $args{identifier},
         datestamp   => $timestamp,
index 30379c4..db94c51 100644 (file)
@@ -92,7 +92,7 @@ sub new {
         {
             return HTTP::OAI::Response->new(
              requestURL  => $repository->self_url(),
-             errors      => [ new HTTP::OAI::Error(
+             errors      => [ HTTP::OAI::Error->new(
                 code    => 'idDoesNotExist',
                 message => "There is no biblio record with this identifier",
                 ) ],
index 92af1c3..f1567df 100644 (file)
@@ -39,7 +39,7 @@ use MARC::File::XML;
 sub GetRecords {
     my ($class, $self, $repository, $metadata, %args) = @_;
 
-    my $token = new Koha::OAI::Server::ResumptionToken( %args );
+    my $token = Koha::OAI::Server::ResumptionToken->new( %args );
     my $dbh = C4::Context->dbh;
     my $set;
     if ( defined $token->{'set'} ) {
@@ -127,7 +127,7 @@ sub GetRecords {
             $count++;
             if ( $count > $max ) {
                 $self->resumptionToken(
-                    new Koha::OAI::Server::ResumptionToken(
+                    Koha::OAI::Server::ResumptionToken->new(
                         metadataPrefix  => $token->{metadata_prefix},
                         from            => $token->{from},
                         until           => $token->{until},
@@ -165,7 +165,7 @@ sub GetRecords {
             } else {
                 $timestamp =~ s/ /T/;
                 $timestamp .= 'Z';
-                $self->identifier( new HTTP::OAI::Header(
+                $self->identifier( HTTP::OAI::Header->new(
                     identifier => $repository->{ koha_identifier} . ':' . $biblionumber,
                     datestamp  => $timestamp,
                     status     => $deleted ? 'deleted' : undef
index 8793f66..4f8dff8 100644 (file)
@@ -35,7 +35,7 @@ sub new {
     unless ($count) {
         return HTTP::OAI::Response->new(
             requestURL => $repository->self_url(),
-            errors     => [ new HTTP::OAI::Error( code => 'noRecordsMatch' ) ],
+            errors     => [ HTTP::OAI::Error->new( code => 'noRecordsMatch' ) ],
         );
     }
 
index ff1c786..f83af21 100644 (file)
@@ -35,7 +35,7 @@ sub new {
     unless ($count) {
         return HTTP::OAI::Response->new(
             requestURL => $repository->self_url(),
-            errors     => [ new HTTP::OAI::Error( code => 'noRecordsMatch' ) ],
+            errors     => [ HTTP::OAI::Error->new( code => 'noRecordsMatch' ) ],
         );
     }
 
index 281b762..6826478 100644 (file)
@@ -54,7 +54,7 @@ sub new {
     }
 
     $self->resumptionToken(
-        new Koha::OAI::Server::ResumptionToken(
+        Koha::OAI::Server::ResumptionToken->new(
             metadataPrefix => $token->{metadata_prefix},
             offset         => $pos
         )
index a916da4..ecc4002 100644 (file)
@@ -32,7 +32,7 @@ sub new {
     my $self = $class->SUPER::new(%args);
 
     $timestamp =~ s/ /T/, $timestamp .= 'Z';
-    $self->header( new HTTP::OAI::Header(
+    $self->header( HTTP::OAI::Header->new(
         identifier  => $args{identifier},
         datestamp   => $timestamp,
     ) );
index 558606d..ca34ee8 100644 (file)
@@ -127,7 +127,7 @@ sub new {
     # Is metadataPrefix supported by the repository?
     my $mdp = param('metadataPrefix') || '';
     if ( $mdp && !grep { $_ eq $mdp } @{$self->{ koha_metadata_format }} ) {
-        push @errs, new HTTP::OAI::Error(
+        push @errs, HTTP::OAI::Error->new(
             code    => 'cannotDisseminateFormat',
             message => "Dissemination as '$mdp' is not supported",
         );
index 4cd596d..f35f434 100644 (file)
@@ -118,7 +118,7 @@ sub generate_as_pdf {
     $letter->{'title'}   =~ s/<<today>>/$today/g;
     $letter->{'content'} =~ s/<<today>>/$today/g;
 
-    my $tmpl = C4::Templates::gettemplate('batch/print-notices.tt', 'intranet', new CGI);
+    my $tmpl = C4::Templates::gettemplate('batch/print-notices.tt', 'intranet', CGI->new);
     $tmpl->param(
         stylesheet => C4::Context->preference("NoticeCSS"),
         today      => $today,
index 7129d9b..cb05267 100644 (file)
@@ -79,7 +79,7 @@ sub get_suggestions {
         'su-br',
         'su-rl'
     );
-    my $cgi = new CGI;
+    my $cgi = CGI->new;
     my $template = C4::Templates::gettemplate('text/explodedterms.tt', 'opac', $cgi);
     my @results;
     foreach my $index (@indexes) {
index dcb5ec7..28f35a0 100644 (file)
@@ -57,7 +57,7 @@ sub printorders {
     $pdf->mediabox($height/mm, $width/mm);
     my $page = $pdf->page();
     
-    my $pdftable = new PDF::Table();
+    my $pdftable = PDF::Table->new();
     
     my $abaskets;
     my $arrbasket;
index 94f520c..d7d6912 100644 (file)
@@ -57,7 +57,7 @@ sub printorders {
     $pdf->mediabox($height/mm, $width/mm);
     my $page = $pdf->page();
     
-    my $pdftable = new PDF::Table();
+    my $pdftable = PDF::Table->new();
     
     my $abaskets;
     my $arrbasket;
index 78e698e..9c2456b 100644 (file)
@@ -82,7 +82,7 @@ sub printorders {
             . ( $delivery_library ? "delivery at " . $delivery_library->branchname : "" )
         );
 
-        my $pdftable = new PDF::Table();
+        my $pdftable = PDF::Table->new();
         my $abaskets;
         my $arrbasket;
         my @keys = ('Document', 'Qty', 'RRP tax exc.', 'RRP tax inc.', 'Discount', 'Discount price', 'Tax rate', 'Total tax exc.', 'Total tax inc.');
@@ -200,7 +200,7 @@ sub printbaskets {
     $text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm );
     $text->translate(30/mm,  ($height-28.5)/mm);
     $text->text($libraryname);
-    my $pdftable = new PDF::Table();
+    my $pdftable = PDF::Table->new();
     my $abaskets;
     my $arrbasket;
     # header of the table
index 2fdce7a..eb3d88e 100644 (file)
@@ -82,7 +82,7 @@ sub printorders {
             . ( $delivery_library ? "livraison Ã  " . $delivery_library->branchname : "" )
         );
 
-        my $pdftable = new PDF::Table();
+        my $pdftable = PDF::Table->new();
         my $abaskets;
         my $arrbasket;
         my @keys = ('Document', 'Qté', 'Prix', 'Prix net', '% Remise', 'Remise', 'Taux TVA', 'Total HT', 'Total TTC');
@@ -201,7 +201,7 @@ sub printbaskets {
     $text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm );
     $text->translate(30/mm,  ($height-28.5)/mm);
     $text->text($libraryname);
-    my $pdftable = new PDF::Table();
+    my $pdftable = PDF::Table->new();
     my $abaskets;
     my $arrbasket;
     # header of the table
index 68abd8c..bade1ea 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -60,7 +60,7 @@ use C4::Members::Statistics;
 
 #use Smart::Comments '####';
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "about.tt",
@@ -208,7 +208,7 @@ my $warnNoActiveCurrency = (! defined Koha::Acquisition::Currencies->get_active)
 
 my @xml_config_warnings;
 
-my $context = new C4::Context;
+my $context = C4::Context->new;
 
 if (    C4::Context->config('zebra_bib_index_mode')
     and C4::Context->config('zebra_bib_index_mode') eq 'grs1' )
index 8301f9a..a81053d 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 049d8ad..b9915e6 100755 (executable)
@@ -135,7 +135,7 @@ use C4::Barcodes;
 # FIXME: This needs to do actual error checking and possibly return user to the same form,
 # not just blindly call C4 functions and print a redirect.  
 
-my $input = new CGI;
+my $input = CGI->new;
 my $use_ACQ_framework = $input->param('use_ACQ_framework');
 
 # Check if order total amount exceed allowed budget
index acc3861..af2af98 100755 (executable)
@@ -50,7 +50,7 @@ use Koha::Acquisition::Orders;
 use Koha::Acquisition::Booksellers;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({
     template_name => "acqui/addorderiso2709.tt",
     query => $input,
index d82d4a5..2693a25 100755 (executable)
@@ -62,7 +62,7 @@ unless ($status eq "ok") {
     exit 0;
 }
 
-my $input = new CGI;
+my $input = CGI->new;
 my $name = $input->param('name');
 my $category = $input->param('category');
 my $default = $input->param('default');
index 7d16879..a53160d 100755 (executable)
@@ -74,7 +74,7 @@ the supplier this script have to display the basket.
 
 =cut
 
-our $query        = new CGI;
+our $query        = CGI->new;
 our $basketno     = $query->param('basketno');
 our $ean          = $query->param('ean');
 our $booksellerid = $query->param('booksellerid');
index db63b3f..3b53bd9 100755 (executable)
@@ -59,7 +59,7 @@ use Koha::Acquisition::Booksellers;
 use Koha::ItemTypes;
 use Koha::Patrons;
 
-our $input=new CGI;
+our $input=CGI->new;
 
 our ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/basketgroup.tt",
index 737f94c..f06900c 100755 (executable)
@@ -57,7 +57,7 @@ use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Baskets;
 use Koha::AdditionalFields;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "acqui/basketheader.tt",
index 71deb63..84d0348 100755 (executable)
@@ -37,7 +37,7 @@ use C4::Output;
 use C4::Acquisition;
 use Koha::Acquisition::Baskets;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'acqui/cancelorder.tt',
     query           => $input,
index c45360e..b502a1d 100755 (executable)
@@ -30,7 +30,7 @@ fetches the budget amount fron the DB
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $budget_id = $input->param('budget_id');
 my $total   = $input->param('total');
 
index 8b36e68..37c4a22 100755 (executable)
@@ -36,7 +36,7 @@ use JSON;
 use C4::Output;
 use C4::Items;
 
-my $input = new CGI;
+my $input = CGI->new;
 my @field = $input->multi_param('field[]');
 my @value = $input->multi_param('value[]');
 
index 6db9018..7bbefea 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Acquisition::Currencies;
 use Koha::Acquisition::Orders;
 use Koha::DateUtils qw(dt_from_string output_pref);
 
-my $input    = new CGI;
+my $input    = CGI->new;
 my $basketno = $input->param('basketno');
 my $op       = $input->param('op') || 'search';    # search, select, batch_edit
 
index a651970..0ed8850 100755 (executable)
@@ -36,7 +36,7 @@ use Koha::Acquisition::Orders;
 
 use List::MoreUtils qw/any/;
 
-my $input=new CGI;
+my $input=CGI->new;
 my $flagsrequired = {acquisition => 'order_receive'};
 
 checkauth($input, 0, $flagsrequired, 'intranet');
index aa0187a..de42d42 100755 (executable)
@@ -59,7 +59,7 @@ use C4::Koha;
 use Koha::AdditionalFields;
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $do_search               = $input->param('do_search') || 0;
 
 my $dbh = C4::Context->dbh;
index 8aa517c..d80ee02 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Output;
 use C4::Acquisition;
 use Koha::Misc::Files;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => 'acqui/invoice-files.tt',
index d8a6008..3857746 100755 (executable)
@@ -40,7 +40,7 @@ use Koha::DateUtils;
 use Koha::Misc::Files;
 use Koha::Acquisition::Invoice::Adjustments;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => 'acqui/invoice.tt',
index 7cdc18a..57a080d 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Acquisition;
 use C4::Output;
 use C4::Context;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie) = get_template_and_user({
     template_name => "acqui/csv/lateorders.tt",
     query => $input,
index bd03be4..be12b32 100755 (executable)
@@ -55,7 +55,7 @@ use Koha::DateUtils;
 use Koha::Acquisition::Orders;
 use Koha::CsvProfiles;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie) = get_template_and_user(
     {
         template_name   => "acqui/lateorders.tt",
index 7801c7f..ab7817e 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Acquisition;
 
 use Koha::Acquisition::Booksellers;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'acqui/modordernotes.tt',
     query           => $input,
index 676bc98..7562475 100755 (executable)
@@ -94,7 +94,7 @@ use Koha::Patrons;
 use Koha::RecordProcessor;
 use Koha::Subscriptions;
 
-our $input           = new CGI;
+our $input           = CGI->new;
 my $booksellerid    = $input->param('booksellerid');   # FIXME: else ERROR!
 my $budget_id       = $input->param('budget_id') || 0;
 my $title           = $input->param('title');
index db14455..7d3e8ba 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Serials;
 
 use Koha::Acquisition::Booksellers;
 
-my $query        = new CGI;
+my $query        = CGI->new;
 my $title        = $query->param('title_filter');
 my $ISSN         = $query->param('ISSN_filter');
 my $EAN          = $query->param('EAN_filter');
index 5493496..f43e201 100755 (executable)
@@ -99,7 +99,7 @@ use C4::Budgets;
 
 use Koha::Acquisition::Booksellers;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 # getting the CGI params
 my $basketno        = $input->param('basketno');
index a3b3436..20be8a0 100755 (executable)
@@ -36,7 +36,7 @@ use Koha::Acquisition::Invoice::Adjustments;
 use C4::Acquisition;
 
 my $dbh     = C4::Context->dbh;
-my $input   = new CGI;
+my $input   = CGI->new;
 my $fund_id = $input->param('fund');
 my $fund_code = $input->param('fund_code');
 
index 7fa239a..d3902de 100755 (executable)
@@ -79,7 +79,7 @@ use Koha::DateUtils qw( dt_from_string );
 use Koha::ItemTypes;
 use Koha::Patrons;
 
-my $input      = new CGI;
+my $input      = CGI->new;
 
 my $dbh          = C4::Context->dbh;
 my $invoiceid    = $input->param('invoiceid');
index 4ff5ba5..d6024a0 100755 (executable)
@@ -74,7 +74,7 @@ use Koha::Biblios;
 
 use JSON;
 
-my $input=new CGI;
+my $input=CGI->new;
 my $sticky_filters = $input->param('sticky_filters') || 0;
 
 my ($template, $loggedinuser, $cookie)
index fe434c9..89255c9 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Output;
 use Koha::Acquisition::Orders;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
     template_name   => "acqui/showorder.tt",
     query           => $cgi,
index e69f41e..938ca90 100755 (executable)
@@ -38,7 +38,7 @@ use C4::Acquisition;
 use Koha::Acquisition::Invoice::Adjustments;
 
 my $dbh      = C4::Context->dbh;
-my $input    = new CGI;
+my $input    = CGI->new;
 my $bookfund = $input->param('fund');
 my $fund_code = $input->param('fund_code');
 
index 6eeafdb..433821b 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Context;
 use C4::Acquisition;
 use Koha::Acquisition::Booksellers;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "acqui/transferorder.tt",
         query           => $input,
index 93f7975..ac2964e 100755 (executable)
@@ -55,7 +55,7 @@ use C4::Biblio qw/GetBiblioData/;
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Baskets;
 
-my $input=new CGI;
+my $input=CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/uncertainprice.tt",
index 5b077f1..60c65e4 100755 (executable)
@@ -58,7 +58,7 @@ use Koha::Acquisition::Bookseller::Contacts;
 use Koha::Acquisition::Booksellers;
 use CGI qw ( -utf8 );
 
-my $input=new CGI;
+my $input=CGI->new;
 
 checkauth( $input, 0, { acquisition => 'vendors_manage' }, 'intranet' );
 
index adb9890..10399d5 100755 (executable)
@@ -31,7 +31,7 @@ use C4::Koha;
 use Koha::Acquisition::Booksellers;
 use Koha::BiblioFrameworks;
 
-my $input           = new CGI;
+my $input           = CGI->new;
 my $biblionumber    = $input->param('biblionumber')||0;
 my $frameworkcode   = $input->param('frameworkcode') || q{};
 my $title           = $input->param('title');
index d31cf11..5d3b5de 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index a7b4ffe..e124878 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Koha;
 use C4::Output;
 use Koha::AdditionalFields;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my %flagsrequired;
 $flagsrequired{parameters} = 'manage_additional_fields';
index 785901d..23c92f3 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Plugins;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $plugins_enabled = C4::Context->config("enable_plugins");
 my $mana_url        = C4::Context->config('mana_config');
index abd315e..5910d3f 100755 (executable)
@@ -43,7 +43,7 @@ use CGI qw ( -utf8 );
 use C4::Koha;
 use Koha::KeyboardShortcuts;
 
-my $input            = new CGI;
+my $input            = CGI->new;
 my $op               = $input->param('op') || 'list';
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 39588d6..c96170d 100755 (executable)
@@ -61,7 +61,7 @@ use Koha::Acquisition::Currencies;
 
 my $dbh = C4::Context->dbh;
 
-my $input       = new CGI;
+my $input       = CGI->new;
 
 my $searchfield          = $input->param('searchfield') // '';
 my $budget_period_id     = $input->param('budget_period_id');
index b9ba3b5..16f62c5 100755 (executable)
@@ -36,7 +36,7 @@ use C4::Debug;
 use Koha::Acquisition::Currencies;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $dbh     = C4::Context->dbh;
 
 my ($template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
index e942ae4..9bd4d47 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::DateUtils;
 
 use Koha::Acquisition::Booksellers;
 
-my $input          = new CGI;
+my $input          = CGI->new;
 my $contractnumber = $input->param('contractnumber');
 my $booksellerid   = $input->param('booksellerid');
 my $op             = $input->param('op') || 'list';
index d602513..95ddb36 100755 (executable)
@@ -36,7 +36,7 @@ use C4::Auth;
 use C4::Debug;
 use Koha::Acquisition::Currencies;
 
-our $input = new CGI;
+our $input = CGI->new;
 ####  $input
 
 my $dbh = C4::Context->dbh;
index 7cbad60..793d2d1 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use Koha::AudioAlert;
 use Koha::AudioAlerts;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $selector = $cgi->param('selector');
 my $sound    = $cgi->param('sound');
index 1115a9f..c68a8aa 100755 (executable)
@@ -48,7 +48,7 @@ sub auth_subfield_structure_exists {
        return @$rows > 0;
 }
 
-my $input        = new CGI;
+my $input        = CGI->new;
 my $tagfield     = $input->param('tagfield');
 my $tagsubfield  = $input->param('tagsubfield');
 my $authtypecode = $input->param('authtypecode');
index 311b52d..a034d6f 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Context;
 use Koha::Authority::Types;
 
 # retrieve parameters
-my $input = new CGI;
+my $input = CGI->new;
 my $authtypecode         = $input->param('authtypecode')         || '';    # set to select framework
 my $existingauthtypecode = $input->param('existingauthtypecode') || '';    # set when we have to create a new framework (in authtype) by copying an old one (in existingauthtype)
 
index 6f365e6..62cabcc 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::AuthorisedValues;
 use Koha::AuthorisedValueCategories;
 use Koha::Libraries;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $id          = $input->param('id');
 my $op          = $input->param('op') || 'list';
 my $searchfield = $input->param('searchfield');
index 4141c68..4d032cf 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output;
 use Koha::Authorities;
 use Koha::Authority::Types;
 
-my $input        = new CGI;
+my $input        = CGI->new;
 my $authtypecode = $input->param('authtypecode');
 my $op           = $input->param('op') || 'list';
 my @messages;
index f3bd443..20e40ef 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::BiblioFramework;
 use Koha::BiblioFrameworks;
 use Koha::Caches;
 
-my $input         = new CGI;
+my $input         = CGI->new;
 my $frameworkcode = $input->param('frameworkcode') || q||;
 my $op            = $input->param('op') || q|list|;
 my $cache         = Koha::Caches->get_instance();
index 82a8d21..94a348e 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 use C4::Koha;
 use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "admin/branch_transfer_limits.tt",
index 749db2d..9bf5d36 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::DateUtils;
 use Koha::Patron::Categories;
 use Koha::Libraries;
 
-my $input         = new CGI;
+my $input         = CGI->new;
 my $searchfield   = $input->param('description') // q||;
 my $categorycode  = $input->param('categorycode');
 my $op            = $input->param('op') // 'list';
index c82e684..a80c55d 100755 (executable)
@@ -31,7 +31,7 @@ called by aqbudgets.pl and neworderempty.pl
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $budget_id     = $input->param('budget_id');
 my $new_parent_id = $input->param('new_parent');
index 72f3b5e..49d4ba7 100755 (executable)
@@ -34,7 +34,7 @@ to determine whether the new parent budget (or period) has enough unallocated fu
 =cut
 
 my $dbh = C4::Context->dbh;
-my $input = new CGI;
+my $input = CGI->new;
 
 my $total     = $input->param('total');
 my $budget_id = $input->param('budget_id');
index 174f0f9..d492374 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Context;
 use C4::Biblio;
 
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $borrowernumber, $cookie)
     = get_template_and_user({template_name => "admin/checkmarc.tt",
index f5fa45f..eda3dc1 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 
 use Koha::Cities;
 
-my $input       = new CGI;
+my $input       = CGI->new;
 my $city_name_filter = $input->param('city_name_filter') // q||;
 my $cityid      = $input->param('cityid');
 my $op          = $input->param('op') || 'list';
index a937f7b..02b3e0e 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::ClassSplitRules;
 
 my $script_name = "/cgi-bin/koha/admin/classsources.pl";
 
-my $input            = new CGI;
+my $input            = CGI->new;
 my $op               = $input->param('op') || 'list';
 my $cn_source        = $input->param('cn_source');
 my $class_sort_rule  = $input->param('class_sort_rule');
index 76472d0..7592c4d 100755 (executable)
@@ -34,7 +34,7 @@ use C4::Koha;
 use C4::Debug;
 use Koha::CirculationRules;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "admin/clone-rules.tt",
index f0a6734..9d19808 100755 (executable)
@@ -7,7 +7,7 @@ use C4::Auth;
 use C4::Context;
 use C4::Output;
 use C4::Utils::DataTables::TablesSettings qw( get_modules );
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 40ced7d..848a00b 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output;
 use Koha::Account::CreditType;
 use Koha::Account::CreditTypes;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $code  = $input->param('code');
 my $op    = $input->param('op') || 'list';
 my @messages;
index df268cd..5f7081d 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output;
 use Koha::Account::DebitType;
 use Koha::Account::DebitTypes;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $code  = $input->param('code');
 my $op    = $input->param('op') || 'list';
 my @messages;
index 4fee477..352ff8b 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 
 use Koha::Desks;
 
-my $input       = new CGI;
+my $input       = CGI->new;
 my $searchfield = $input->param('desk_name') // q||;
 my $desk_id      = $input->param('desk_id') || '';
 my $op          = $input->param('op') || 'list';
index 59078c3..9ac72dd 100755 (executable)
@@ -9,7 +9,7 @@ use Koha::SuggestionEngine;
 use Module::Load::Conditional qw(can_load);
 use JSON;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "admin/didyoumean.tt",
index a1a05f9..bd5ee83 100755 (executable)
@@ -38,7 +38,7 @@ if ($auth_status eq 'ok') {
     $authenticated = 1;
 }
 
-my $input = new CGI;
+my $input = CGI->new;
 
 unless ($authenticated) {
     print $input->header(-type => 'text/plain', -status => '403 Forbidden');
index 940356f..3a93cba 100755 (executable)
@@ -111,7 +111,7 @@ sub dispatch {
         show   => \&show,
         toggle => \&toggle,
     );
-    my $input  = new CGI;
+    my $input  = CGI->new;
     my $action = $input->param('action') || 'show';
     if (not exists $handler{$action}) {
         my $status = 400;
index 88bf401..ab48bab 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Output;
 
 use Koha::Item::Search::Field qw(GetItemSearchField ModItemSearchField);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ($template, $borrowernumber, $cookie) = get_template_and_user({
     template_name => 'admin/items_search_field.tt',
index 0923f57..ac25486 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Output;
 
 use Koha::Item::Search::Field qw(AddItemSearchField GetItemSearchFields DelItemSearchField);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ($template, $borrowernumber, $cookie) = get_template_and_user({
     template_name => 'admin/items_search_fields.tt',
index ff9bdad..07866f7 100755 (executable)
@@ -35,7 +35,7 @@ use Koha::ItemTypes;
 use Koha::ItemType;
 use Koha::Localizations;
 
-my $input         = new CGI;
+my $input         = CGI->new;
 my $searchfield   = $input->param('description');
 my $itemtype_code = $input->param('itemtype');
 my $op            = $input->param('op') // 'list';
index d26f6e5..5c679b8 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::BiblioFrameworks;
 use Koha::Caches;
 use Koha::MarcSubfieldStructures;
 
-my $input       = new CGI;
+my $input       = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
     {
index e8a02c4..ec70645 100755 (executable)
@@ -27,7 +27,7 @@ use Koha::Libraries;
 use Koha::Library::Group;
 use Koha::Library::Groups;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index e21a634..81272d8 100755 (executable)
@@ -26,7 +26,7 @@ use Koha::Localizations;
 
 use CGI qw( -utf8 );
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {   template_name   => "admin/localization.tt",
index 1a35130..63ae977 100755 (executable)
@@ -61,7 +61,7 @@ sub marc_subfield_structure_exists {
     return @$rows > 0;
 }
 
-my $input         = new CGI;
+my $input         = CGI->new;
 my $tagfield      = $input->param('tagfield');
 my $tagsubfield   = $input->param('tagsubfield');
 my $frameworkcode = $input->param('frameworkcode');
index e53a339..68aeaa0 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::AuthorisedValues;
 use Koha::BiblioFrameworks;
 
 # retrieve parameters
-my $input = new CGI;
+my $input = CGI->new;
 my $frameworkcode         = $input->param('frameworkcode')         || ''; # set to select framework
 my $existingframeworkcode = $input->param('existingframeworkcode') || '';
 my $searchfield           = $input->param('searchfield') || 0;
index f6f8770..eb308dd 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Matcher qw/valid_normalization_routines/;
 
 my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
 
-our $input = new CGI;
+our $input = CGI->new;
 my $op = $input->param('op') || '';
 
 
index c24dceb..d322494 100755 (executable)
@@ -39,7 +39,7 @@ use C4::OAI::Sets;
 
 use Data::Dumper;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'admin/oai_set_mappings.tt',
     query           => $input,
index 4f2a640..5f24185 100755 (executable)
@@ -35,7 +35,7 @@ use C4::OAI::Sets;
 
 use Data::Dumper;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'admin/oai_sets.tt',
     query           => $input,
index cc6dcdf..af58243 100755 (executable)
@@ -36,7 +36,7 @@ use Koha::Patron::Categories;
 
 my $script_name = "/cgi-bin/koha/admin/patron-attr-types.pl";
 
-our $input = new CGI;
+our $input = CGI->new;
 my $op = $input->param('op') || '';
 
 
index 6900425..a39b6dd 100755 (executable)
@@ -222,7 +222,7 @@ sub _get_pref_files {
     foreach my $file ( glob( "$htdocs/$theme/$lang/modules/admin/preferences/*.pref" ) ) {
         my ( $tab ) = ( $file =~ /([a-z0-9_-]+)\.pref$/ );
 
-        $results{$tab} = $open_files ? new IO::File( $file, 'r' ) : '';
+        $results{$tab} = $open_files ? IO::File->new( $file, 'r' ) : '';
     }
 
     return %results;
@@ -301,7 +301,7 @@ sub matches {
 }
 
 my $dbh = C4::Context->dbh;
-our $input = new CGI;
+our $input = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {   template_name   => "admin/preferences.tt",
index 04440ab..88b8341 100755 (executable)
@@ -32,7 +32,7 @@ use Try::Tiny;
 use Module::Load::Conditional qw(can_load);
 
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => 'admin/searchengine/elasticsearch/mappings.tt',
index dbd2c50..0996f16 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 
 use Koha::SharedContent;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "admin/share_content.tt",
index 007e001..7c39c30 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output;
 use Koha::SMS::Provider;
 use Koha::SMS::Providers;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index d798eea..298a4f5 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Output;
 
 # Initialize CGI, template
 
-my $input = new CGI;
+my $input = CGI->new;
 my $mapstr = $input->param('mapping')//'';
 my $type = $input->param('type')//'';
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( {
index 97dee3c..c232bb1 100755 (executable)
@@ -205,7 +205,7 @@ sub GetPrefParams {
     return $params;
 }
 
-my $input       = new CGI;
+my $input       = CGI->new;
 my $searchfield = $input->param('searchfield') || '';
 my $Tvalue      = $input->param('Tvalue');
 my $offset      = $input->param('offset') || 0;
index c146da9..e28ee89 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Libraries;
 
 use Data::Dumper;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "admin/transport-cost-matrix.tt",
index 8e35d6c..cc22948 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Output;
 use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Libraries;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "admin/usage_statistics.tt",
index bff9bd2..89c41d5 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::Z3950Servers;
 
 # Initialize CGI, template, database
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') || 'list';
 my $id = $input->param('id') || 0;
 my $type = $input->param('type') || '';
index 98d413b..ed6774f 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::SearchEngine::QueryBuilder;
 
 use Koha::Authority::Types;
 
-my $query        = new CGI;
+my $query        = CGI->new;
 my $op           = $query->param('op') || '';
 my $authtypecode = $query->param('authtypecode') || '';
 my $index        = $query->param('index') || '';
index 828ba24..66083d3 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::SearchEngine::QueryBuilder;
 use Koha::Token;
 use Koha::Z3950Servers;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $dbh   = C4::Context->dbh;
 my $op           = $query->param('op')           || '';
 my $authtypecode = $query->param('authtypecode') || '';
index 6a856c1..c8de9de 100755 (executable)
@@ -553,7 +553,7 @@ sub build_hidden_data {
 # ======================== 
 #          MAIN 
 #=========================
-my $input = new CGI;
+my $input = CGI->new;
 my $z3950 = $input->param('z3950');
 my $error = $input->param('error');
 my $authid=$input->param('authid'); # if authid exists, it's a modif, not a new authority.
index ed091a2..478a1bf 100755 (executable)
@@ -49,7 +49,7 @@ use C4::Koha;
 use Koha::Authorities;
 use Koha::Authority::Types;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 5370ce1..e2ba88b 100755 (executable)
@@ -51,7 +51,7 @@ use C4::Koha;
 use Koha::Authorities;
 use Koha::Authority::Types;
 
-my $query=new CGI;
+my $query=CGI->new;
 
 my $dbh=C4::Context->dbh;
 
index dee6ae9..6d8cb14 100755 (executable)
@@ -164,7 +164,7 @@ sub build_tabs {
 
 
 # 
-my $query=new CGI;
+my $query=CGI->new;
 
 my $dbh=C4::Context->dbh;
 
index 2d74309..ee21e1e 100755 (executable)
@@ -7,7 +7,7 @@ use C4::Output;
 use C4::AuthoritiesMarc;
 use CGI qw ( -utf8 );
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "tools/export.tt",
index 250ff11..3b5f6c0 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::Authority::MergeRequests;
 use Koha::Authority::Types;
 use Koha::MetadataRecord::Authority;
 
-my $input  = new CGI;
+my $input  = CGI->new;
 my @authid = $input->multi_param('authid');
 my $merge  = $input->param('merge');
 
index 9861f87..92de7b1 100755 (executable)
@@ -38,7 +38,7 @@ use C4::Output;
 use Koha::SearchEngine::Search;
 use Koha::SearchEngine::QueryBuilder;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $auth_status, $sessionID ) = check_cookie_auth( $query->cookie('CGISESSID'), { catalogue => 1 } );
 
index 2ae309f..aa4cd97 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 use Koha::AuthorisedValues;
 use Koha::CsvProfiles;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
     {
index 6115f96..f847877 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Ris;
 use Koha::CsvProfiles;
 
 use utf8;
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
     {
index bef967c..898f57a 100755 (executable)
@@ -51,7 +51,7 @@ use Koha::Patrons;
 use Koha::RecordProcessor;
 
 
-my $query = new CGI;
+my $query = CGI->new;
 my $dbh = C4::Context->dbh;
 
 my $biblionumber = $query->param('biblionumber');
index 503b81c..4f30839 100755 (executable)
@@ -65,7 +65,7 @@ use Koha::DateUtils;
 
 use List::MoreUtils qw( uniq );
 
-my $query        = new CGI;
+my $query        = CGI->new;
 my $dbh          = C4::Context->dbh;
 my $biblionumber = $query->param('biblionumber');
 $biblionumber = HTML::Entities::encode($biblionumber);
index 80f3f15..b42b95b 100755 (executable)
@@ -10,7 +10,7 @@ use C4::Ris;
 
 
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
     template_name   => "tools/export.tt",
     query           => $query,
index 80c4f61..6180874 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::AuthorisedValues;
 use Koha::Items;
 use Koha::ItemTypes;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $status, $cookie, $sessionID ) = C4::Auth::check_api_auth( $cgi, { acquisition => 'order_receive' } );
 unless ($status eq "ok") {
index a314652..58358a7 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::Exceptions;
 $| = 1;
 
 my $DEBUG = 0;
-my $data  = new CGI;
+my $data  = CGI->new;
 my $imagenumber;
 
 =head1 NAME
index df76644..d78024b 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Biblios;
 use Koha::Items;
 use Koha::Patrons;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "catalogue/imageviewer.tt",
index 0630489..e81ec56 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Old::Checkouts;
 
 use Koha::Biblios;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "catalogue/issuehistory.tt",
index 10d7b50..fbc69bf 100755 (executable)
@@ -24,7 +24,7 @@ use CGI;
 use C4::Auth;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ($template, $borrowernumber, $cookie) = get_template_and_user({
     template_name => 'catalogue/itemsearch_csv.tt',
index 48d4c77..431786c 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Item::Search::Field qw(GetItemSearchFields);
 use Koha::ItemTypes;
 use Koha::Libraries;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my %params = $cgi->Vars;
 
 my $format = $cgi->param('format');
index 22d1a08..16eb6ca 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Biblios;
 use Koha::BiblioFrameworks;
 use Koha::Patrons;
 
-my $query        = new CGI;
+my $query        = CGI->new;
 my $dbh          = C4::Context->dbh;
 my $biblionumber = $query->param('biblionumber');
 $biblionumber = HTML::Entities::encode($biblionumber);
index dd913b1..3dca1f4 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::DateUtils;
 use Koha::Items;
 use Koha::Patrons;
 
-my $query=new CGI;
+my $query=CGI->new;
 
 my ($template, $loggedinuser, $cookie) = get_template_and_user(
     {
index 6a920c6..092be2e 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Search::History;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ($template, $loggedinuser, $cookie) = get_template_and_user({
     template_name   => 'catalogue/search-history.tt',
index b6b3872..a5e0ecb 100755 (executable)
@@ -163,7 +163,7 @@ my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
 # create a new CGI object
 # FIXME: no_undef_params needs to be tested
 use CGI qw('-no_undef_params' -utf8 );
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # decide which template to use
 my $template_name;
index d21683e..0c252c1 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Biblio;
 use C4::ImportBatch;
 use C4::XSLT ();
 
-my $input= new CGI;
+my $input= CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
   {
     template_name   => "catalogue/showmarc.tt",
index d87149c..015b123 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::StockRotationRotas;
 use Koha::StockRotationStages;
 use Koha::Util::StockRotation qw(:ALL);
 
-my $input = new CGI;
+my $input = CGI->new;
 
 unless (C4::Context->preference('StockRotation')) {
     # redirect to Intranet home if self-check is not enabled
index d8c280e..9ff9f9b 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 use C4::Circulation;
 use C4::Reserves;
 
-my $cgi= new CGI;
+my $cgi= CGI->new;
 
 checkauth($cgi, 0, {circulate => 'circulate_remaining_permissions'}, 'intranet');
 
index 996f611..a4614cc 100755 (executable)
@@ -689,7 +689,7 @@ sub build_tabs {
 # ========================
 #          MAIN
 #=========================
-my $input = new CGI;
+my $input = CGI->new;
 my $error = $input->param('error');
 my $biblionumber  = $input->param('biblionumber'); # if biblionumber exists, it's a modif, not a new biblio.
 my $parentbiblio  = $input->param('parentbiblionumber');
index fdc04b2..69a5731 100755 (executable)
@@ -41,7 +41,7 @@ use Koha::SearchEngine::Search;
 use Koha::SearchEngine::QueryBuilder;
 use Koha::Z3950Servers;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $success = $input->param('biblioitem');
 my $query   = $input->param('q');
index bb578a1..3621477 100755 (executable)
@@ -165,7 +165,7 @@ sub generate_subfield_form {
         }
 
         if ($frameworkcode eq 'FA' && $subfieldlib->{kohafield} eq 'items.barcode' && !$value){
-           my $input = new CGI;
+           my $input = CGI->new;
            $value = $input->param('barcode');
        }
 
@@ -395,7 +395,7 @@ sub removeFieldsForPrefill {
 
 }
 
-my $input        = new CGI;
+my $input        = CGI->new;
 my $error        = $input->param('error');
 
 my $biblionumber;
index baf2b30..7b1f816 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::BiblioFrameworks;
 use Koha::Items;
 use Koha::MetadataRecord;
 
-my $input = new CGI;
+my $input = CGI->new;
 my @biblionumbers = $input->multi_param('biblionumber');
 my $merge = $input->param('merge');
 
@@ -207,7 +207,7 @@ if ($merge) {
         foreach my $biblionumber (@biblionumbers) {
             my $marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
             my $frameworkcode = GetFrameworkCode($biblionumber);
-            my $recordObj = new Koha::MetadataRecord({'record' => $marcrecord, schema => $marcflavour});
+            my $recordObj = Koha::MetadataRecord->new({'record' => $marcrecord, schema => $marcflavour});
             my $record = {
                 recordid => $biblionumber,
                 record => $marcrecord,
index 601784c..90105f3 100755 (executable)
@@ -22,7 +22,7 @@ use CGI qw ( -utf8 );
 
 use Koha::FrameworkPlugin;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $plugin= Koha::FrameworkPlugin->new( {
     name => scalar $input->param("plugin_name"),
 });
index 6298f0c..9bf82f7 100755 (executable)
@@ -54,7 +54,7 @@ return ($function_name,$res);
 
 sub plugin {
 my ($input) = @_;
-    my $query=new CGI;
+    my $query=CGI->new;
     my $op = $query->param('op');
     my $authtypecode = $query->param('authtypecode');
     my $index = $query->param('index');
index ed90394..0caebe1 100755 (executable)
@@ -69,7 +69,7 @@ sub plugin_javascript {
 sub plugin {
     my ($input)   = @_;
     my $dbh       = C4::Context->dbh;
-    my $query     = new CGI;
+    my $query     = CGI->new;
     my $op        = $query->param('op');
     my $type      = $query->param('type');
     my $startfrom = $query->param('startfrom');
index 3aa209c..1683da4 100755 (executable)
@@ -31,7 +31,7 @@ use C4::Charset;
 use C4::Auth qw/check_cookie_auth/;
 use JSON qw/ to_json /;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $query = $input->param('term');
 my $table = $input->param('table');
 my $field = $input->param('field');
index 1e25468..615d7e7 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Context;
 use C4::Breeding;
 use C4::Koha;
 
-my $input        = new CGI;
+my $input        = CGI->new;
 my $dbh          = C4::Context->dbh;
 my $error         = $input->param('error');
 my $authid  = $input->param('authid') || 0;
index e4fce45..f5f0424 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Context;
 use C4::Breeding;
 use C4::Koha;
 
-my $input        = new CGI;
+my $input        = CGI->new;
 my $error         = $input->param('error');
 my $biblionumber  = $input->param('biblionumber') || 0;
 my $frameworkcode = $input->param('frameworkcode');
index 6fd3113..48d8c46 100755 (executable)
@@ -20,7 +20,7 @@ use CGI qw ( -utf8 );
 use C4::Templates;
 use Koha::Util::Navigation;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $language = $query->param('language');
 my $url = Koha::Util::Navigation::local_referer($query, {remove_language => 1, staff => 1});
 
index e5d6d66..455791b 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Patron::Message;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "circ/circulation.tt",
index 7e42380..2175561 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Letters;
 use Koha::ArticleRequests;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $id = $cgi->param('id');
 
index 888918d..3e856bc 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::ArticleRequests;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "circ/article-requests.tt",
index a415fca..8509991 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::Biblios;
 use Koha::DateUtils;
 use Koha::Libraries;
 
-my $input        = new CGI;
+my $input        = CGI->new;
 my $itm          = $input->param('itm');
 my $biblionumber = $input->param('biblionumber');
 
index 24c49cf..43f3a86 100755 (executable)
@@ -38,7 +38,7 @@ by item location.
 
 =cut
 
-my $input       = new CGI;
+my $input       = CGI->new;
 my $dbh = C4::Context->dbh;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({
index ff59c03..14ee57e 100755 (executable)
@@ -39,7 +39,7 @@ use Koha::Patrons;
 ###############################################
 #  Getting state
 
-my $query = new CGI;
+my $query = CGI->new;
 
 if (!C4::Context->userenv){
        my $sessionID = $query->cookie("CGISESSID");
index dc89121..61ce7cc 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Auth;
 use Koha::Checkouts;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 87be246..f68535d 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Context;
 use Koha::BiblioFrameworks;
 use Koha::Checkouts;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user(
     {
         template_name   => "circ/circulation-home.tt",
index f6c0d20..ee3878c 100755 (executable)
@@ -65,7 +65,7 @@ use List::MoreUtils qw/uniq/;
 #
 # PARAMETERS READING
 #
-my $query = new CGI;
+my $query = CGI->new;
 
 my $override_high_holds     = $query->param('override_high_holds');
 my $override_high_holds_tmp = $query->param('override_high_holds_tmp');
index 36c25c3..496ab65 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Patron::Messages;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "circ/circulation.tt",
index 0cd57b1..c0a3b6e 100755 (executable)
@@ -31,7 +31,7 @@ BEGIN {
     $debug = $ENV{DEBUG} || 0;
 }
 
-my $input = new CGI;
+my $input = CGI->new;
 my $sessionID = $input->cookie("CGISESSID");
 my $session = get_session($sessionID);
 
index c48aa23..01b1d7c 100755 (executable)
@@ -20,7 +20,7 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Auth;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => "circ/offline-mf.tt",
index d35ad23..d1500d6 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => "circ/offline.tt",
index 6118a56..c581e8e 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Output;
 use C4::Koha;
 use Koha::BiblioFrameworks;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
index 7ebbafb..1ce791f 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::DateUtils;
 use DateTime;
 use DateTime::Format::MySQL;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $showall         = $input->param('showall');
 my $bornamefilter   = $input->param('borname') || '';
 my $borcatfilter    = $input->param('borcat') || '';
index dd6ae76..01cf877 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::DateUtils;
 use Koha::Holds;
 use DateTime::Duration;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $startdate = $input->param('from');
 my $enddate = $input->param('to');
 my $theme = $input->param('theme');    # only used if allowthemeoverride is set
index 2982418..1d6bdee 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::DateUtils;
 use Koha::Database;
 use Koha::BiblioFrameworks;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $librarian, $cookie, $flags ) = get_template_and_user(
     {
index 66d042b..48b1d02 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Biblios;
 use Koha::Patrons;
 use Koha::ArticleRequests;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user(
     {
index c673e86..47b0375 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Acquisition qw/GetOrdersByBiblionumber/;
 use Koha::DateUtils;
 use Koha::Acquisition::Baskets;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $startdate       = $input->param('from');
 my $enddate         = $input->param('to');
 my $ratio           = $input->param('ratio');
index bcafdae..88d20d3 100755 (executable)
@@ -57,7 +57,7 @@ use Koha::Holds;
 use Koha::Items;
 use Koha::Patrons;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 #getting the template
 my ( $template, $librarian, $cookie, $flags ) = get_template_and_user(
index eb76253..1cbc98e 100755 (executable)
@@ -32,7 +32,7 @@ BEGIN {
     $debug = $ENV{DEBUG} || 0;
 }
 
-my $input = new CGI;
+my $input = CGI->new;
 my $sessionID = $input->cookie("CGISESSID");
 my $session = get_session($sessionID);
 
index 37ae2a4..bbf2536 100755 (executable)
@@ -41,7 +41,7 @@ use Koha::DateUtils;
 use Koha::BiblioFrameworks;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $itemnumber = $input->param('itemnumber');
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
index 26c04fe..4e6384e 100755 (executable)
@@ -32,7 +32,7 @@ use C4::HoldsQueue qw(GetHoldsQueueItems);
 use Koha::BiblioFrameworks;
 use Koha::ItemTypes;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => "circ/view_holdsqueue.tt",
index 772477b..6db24ce 100755 (executable)
@@ -40,7 +40,7 @@ use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $item           = $input->param('itemnumber');
 my $borrowernumber = $input->param('borrowernumber');
index 4e8e2b3..f0a694d 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Context;
 use C4::Auth qw/check_cookie_auth/;
 use C4::Debug;
 
-my $input    = new CGI;
+my $input    = CGI->new;
 my $query    = $input->param('term');
 my $attrcode = $input->path_info || '';
 $attrcode =~ s|^/||;
index c50f772..a525686 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::DateUtils qw/format_sqldatetime/;
 
 use JSON qw( to_json );
 
-my $input = new CGI;
+my $input = CGI->new;
 my $query = $input->param('term');
 
 binmode STDOUT, ":encoding(UTF-8)";
index 87b8deb..6163c70 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Clubs;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 0337cf0..058d822 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::DateUtils qw(dt_from_string);
 use Koha::Clubs;
 use Koha::Club::Fields;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index ca382ce..d2d5a96 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 use Koha::Clubs;
 use Koha::Club::Templates;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 7a770bd..1fc47b4 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 use Koha::Patrons;
 use Koha::Club::Enrollments;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 7dc5bed..3642996 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Clubs;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index da4ef21..7e22af1 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::Club::Template::EnrollmentFields;
 use Koha::Database;
 my $schema = Koha::Database->new()->schema();
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 0a50be4..7c16a14 100755 (executable)
@@ -33,7 +33,7 @@ use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem
 use Koha::Items;
 use Koha::ItemTypes;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $action       = $cgi->param('action')       || '';
 my $course_id    = $cgi->param('course_id')    || '';
index c47b74f..8297099 100755 (executable)
@@ -29,7 +29,7 @@ use C4::CourseReserves qw(ModCourseItem ModCourseReserve GetCourse);
 
 use Koha::Items;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $action    = $cgi->param('action')    || q{};
 my $course_id = $cgi->param('course_id') || q{};
index eed9650..35b2bc7 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Koha;
 
 use C4::CourseReserves qw(DelCourseReserve GetCourse GetCourseReserves);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $action = $cgi->param('action') || '';
 my $course_id = $cgi->param('course_id');
index d8052e0..1ecda7a 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 
 use C4::CourseReserves qw(GetCourses);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index d655bf1..c5fb37b 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Koha;
 
 use C4::CourseReserves qw(GetCourse);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "course_reserves/course.tt",
index b7b2943..060b2a1 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Auth;
 
 use C4::CourseReserves qw(DelCourse ModCourse ModCourseInstructors);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "about.tt",
         query           => $cgi,
index 07bd4ea..da7fc8b 100755 (executable)
@@ -44,7 +44,7 @@ use C4::Output;
 use C4::Context;
 use CGI qw ( -utf8 );
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 print CGI::header('-type'=>'text/plain', '-charset'=>'utf-8');
 
index 2db8d93..c69d197 100755 (executable)
@@ -35,7 +35,7 @@ use Authen::CAS::Client;
 # URL Of the CAS Server
 my $casServerUrl = 'https://localhost:8443/cas/';
 my $cas = Authen::CAS::Client->new($casServerUrl);
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # URL of the service we're requesting a Service Ticket for (typically this very same page)
 my $proxy_service = $cgi->url;
index fdda427..9c62147 100755 (executable)
@@ -33,7 +33,7 @@ use Storable qw(nstore_fd);
 my $casServerUrl = 'https://localhost:8443/cas/';
 my $cas = Authen::CAS::Client->new($casServerUrl);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $proxy_service = $cgi->url;
 
index 4c72a63..6346b5e 100755 (executable)
@@ -43,7 +43,7 @@ my $cas = Authen::CAS::Client->new($casServerUrl);
 # URL of the service we'd like to be proxy for (typically the Koha webservice we want to query)
 my $target_service = "https://.../koha_webservice.pl";
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 print $cgi->header({-type  =>  'text/html'});
 print $cgi->start_html("proxy cas");
diff --git a/help.pl b/help.pl
index b39c577..4dd3ac3 100755 (executable)
--- a/help.pl
+++ b/help.pl
@@ -24,7 +24,7 @@ use C4::Auth;
 use C4::Context;
 use Koha::Manual;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # We need to call get_template_and_user to let it does the job correctly
 # for the language
index 067ba34..7aab43f 100755 (executable)
@@ -33,7 +33,7 @@ use C4::Installer::PerlModules;
 
 use Koha;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $step  = $query->param('step');
 
 my $language = $query->param('language');
index f3be391..40b4c33 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::ItemTypes;
 use Koha::CirculationRules;
 
 #Setting variables
-my $input = new CGI;
+my $input = CGI->new;
 
 unless ( C4::Context->preference('Version') ) {
     print $input->redirect("/cgi-bin/koha/installer/install.pl");
index 696374d..4e8e66b 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Debug;
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $batch_id;
 my @label_ids;
index 0fea1df..d35c5d3 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Debug;
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( undef, $loggedinuser, $cookie ) = get_template_and_user({
                                                                     template_name   => "labels/label-home.tt",
index 89d23db..fe462a2 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Debug;
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $batch_id;
 my @label_ids;
index 7df5ff1..c6e5930 100755 (executable)
@@ -30,7 +30,7 @@ use C4::Labels;
 
 use Koha::Items;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-edit-batch.tt",
index ac907f3..b5f279c 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-edit-layout.tt",
index 6a60c6c..3569f57 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-edit-profile.tt",
index daf8a43..4ff6c9b 100755 (executable)
@@ -24,7 +24,7 @@ use CGI qw ( -utf8 );
 use C4::Auth qw(get_template_and_user);
 use C4::Output qw(output_html_with_http_headers);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-edit-range.tt",
index 6beb0b4..197b336 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-edit-template.tt",
index 245f22f..fee57ed 100755 (executable)
@@ -25,7 +25,7 @@ use CGI qw ( -utf8 );
 use C4::Auth qw(get_template_and_user);
 use C4::Output qw(output_html_with_http_headers);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-home.tt",
index 3663194..3eed697 100755 (executable)
@@ -45,7 +45,7 @@ BEGIN {
     }
 }
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $type      = $query->param('type');
 my $op        = $query->param('op') || '';
index eca571d..8f53a70 100755 (executable)
@@ -30,7 +30,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Labels;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-manage.tt",
index 93b8679..22d15ec 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators::Lib qw(get_all_templates get_all_layouts get_output_formats);
 use C4::Labels::Batch;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "labels/label-print.tt",
index defd2ef..74f2f1d 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Context;
 
 # use Smart::Comments;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "labels/spinelabel-home.tt",
         query           => $query,
index 55c26be..f34c1f8 100755 (executable)
@@ -21,7 +21,7 @@ use C4::Auth;
 use C4::Output;
 
 my $scheme = C4::Context->preference('SpineLabelFormat');
-my $query  = new CGI;
+my $query  = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "labels/spinelabel-print.tt",
         query           => $query,
index 9ec4ae3..183b5e0 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::ProblemReports;
 use Koha::Quotes;
 use Koha::Suggestions;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
index 5e0b82d..a5c3707 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Context;
 use Koha::Patrons;
 use Koha::Account::Lines;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 619fc30..fb9051d 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::ApiKeys;
 use Koha::Patrons;
 use Koha::Token;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => 'members/apikeys.tt',
index 71546a7..cf593b6 100755 (executable)
@@ -35,7 +35,7 @@ use Koha::Patrons;
 use Koha::Patron::Categories;
 use Koha::Items;
 
-my $input=new CGI;
+my $input=CGI->new;
 
 
 my ($template, $loggedinuser, $cookie) = get_template_and_user(
index 389a79c..8980344 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Patrons;
 use Koha::Token;
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
                 = get_template_and_user({template_name => "members/deletemem.tt",
index 46b12b0..7e055c6 100755 (executable)
@@ -41,7 +41,7 @@ use Koha::Patrons;
 
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({
     template_name   => 'members/discharge.tt',
index f7ce929..de19751 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Context;
 use Koha::Patron::Discharge;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') // 'list';
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({
index 6b03a92..3bd4165 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index e60f95f..61737d7 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index f0955d1..c691bc0 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::Account::CreditTypes;
 
 use Koha::Token;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "members/mancredit.tt",
index 9ef1615..a178a2b 100755 (executable)
@@ -42,7 +42,7 @@ use Koha::Old::Checkouts;
 use Koha::Patron::Categories;
 use Koha::Account::DebitTypes;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "members/maninvoice.tt",
index 75fb9f2..6ba2005 100755 (executable)
@@ -19,7 +19,7 @@ use Koha::Patrons;
 use C4::Output;
 use Koha::Token;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $flagsrequired = { permissions => 1 };
 my $member=$input->param('member');
index be83ab2..323eb88 100755 (executable)
@@ -21,7 +21,7 @@ use Koha::Patron::Categories;
 
 use Try::Tiny;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $theme = $input->param('theme') || "default";
 
index d31f43a..970015b 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::DateUtils;
 use Koha::List::Patron;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "members/member.tt",
index bd1509e..221026a 100755 (executable)
@@ -55,7 +55,7 @@ BEGIN {
        $debug = $ENV{DEBUG} || 0;
 }
        
-my $input = new CGI;
+my $input = CGI->new;
 ($debug) or $debug = $input->param('debug') || 0;
 my %data;
 
index a5ad3e1..4dc06b1 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Libraries;
 use Koha::List::Patron;
 use Koha::Patron::Categories;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ($template, $loggedinuser, $cookie, $flags)
     = get_template_and_user({template_name => "members/member.tt",
index fde62c7..81a746a 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Context;
 use Koha::Patrons;
 use Koha::Patron::Modifications;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # FIXME Should be a checkauth call
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 650056c..acccb2b 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Patrons;
 
 use List::MoreUtils qw( uniq );
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {   template_name   => "members/members-update.tt",
index 0d1d17a..ca03168 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 use C4::Context;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
index cf129e2..1b7d4a4 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use Koha::DateUtils;
 use Koha::Patron::Debarments;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $loggedinuserid, $cookie, $sessionID ) = checkauth( $cgi, 0, { borrowers => 'edit_borrowers' }, 'intranet' );
 
index ece7be8..40bc6ed 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Letters;
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
-my $input=new CGI;
+my $input=CGI->new;
 
 
 my $borrowernumber = $input->param('borrowernumber');
index f3534c3..42a82b9 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Patron::Images;
 $|=1;
 
 my $DEBUG = 0;
-my $query = new CGI;
+my $query = CGI->new;
 my $borrowernumber;
 
 =head1 NAME
index a642f35..4c4bcc2 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Overdues qw(parse_overdues_letter);
 
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $flagsrequired = { circulate => "circulate_remaining_permissions" };
 
index 079b23e..5777971 100755 (executable)
@@ -35,7 +35,7 @@ use Koha::DateUtils;
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
-my $input=new CGI;
+my $input=CGI->new;
 
 
 my ($template, $loggedinuser, $cookie)
index f2ad628..9fd49fb 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Account::Lines;
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "members/printinvoice.tt",
index e59c625..debbbde 100755 (executable)
@@ -49,7 +49,7 @@ BEGIN {
        $debug = $ENV{DEBUG} || 0;
 }
 
-my $input = new CGI;
+my $input = CGI->new;
 my $sessionID = $input->cookie("CGISESSID");
 my $session = get_session($sessionID);
 
index 63c0aad..ae1e021 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Members;
 use C4::Suggestions;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "members/purchase-suggestions.tt",
index 67f7a33..dee5845 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Serials;
 use Koha::Patrons;
 use CGI::Session;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
     {
index a98d555..66ae8b5 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Auth;
 use Koha::Patrons;
 
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $loggedinuserid ) = checkauth($input, 0, { borrowers => 'edit_borrowers' }, 'intranet');
 
index b6d5df6..93367b3 100755 (executable)
@@ -33,7 +33,7 @@ use C4::Output;
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "members/statistics.tt",
index f138b11..0789ea5 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::Patrons;
 # use Smart::Comments;
 
 my $dbh   = C4::Context->dbh;
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 02f275d..f8a12b5 100755 (executable)
@@ -78,7 +78,7 @@ sub search {
                return("error",undef);
        }
        my $oAResult;
-       my $Anewq= new ZOOM::Query::PQF($nquery);
+       my $Anewq= ZOOM::Query::PQF->new($nquery);
        eval {
        $oAResult= $oAuth->search_pqf($nquery) ; 
        };
index 68a7b8e..429a991 100755 (executable)
@@ -88,7 +88,7 @@ sub new {
     my $self = {};
     my ($class, $timeout, $agent) = @_;
     
-    my $uagent = new LWP::UserAgent;
+    my $uagent = LWP::UserAgent->new;
     $uagent->agent( $agent ) if $agent;
     $uagent->timeout( $timeout) if $timeout;
     $self->{ user_agent } = $uagent;
@@ -192,7 +192,7 @@ sub check_all_url {
     my $checker = C4::URL::Checker->new($timeout,$agent);
     $checker->{ host_default }  = $host;
     
-    my $context = new C4::Context(  );  
+    my $context = C4::Context->new(  );
     my $dbh = $context->dbh;
     my $sth = $dbh->prepare( 
         "SELECT biblionumber FROM biblioitems WHERE url <> ''" );
index 46a972e..207312e 100755 (executable)
@@ -78,7 +78,7 @@ for my $cloud ( @clouds ) {
         }
     }
 
-    my $index = new ZebraIndex( $cloud->{ZebraIndex} );
+    my $index = ZebraIndex->new( $cloud->{ZebraIndex} );
     $index->scan( $cloud->{Count} );
 
     open my $fh, ">", $cloud->{Output}
index 10cf630..ec9e32c 100755 (executable)
@@ -209,7 +209,7 @@ sub generate_html {
 
     my $template =
       C4::Templates::gettemplate( 'batch/print-notices.tt', 'intranet',
-        new CGI );
+        CGI->new );
 
     $template->param(
         stylesheet => C4::Context->preference("NoticeCSS"),
index e3db4d4..5e0cd37 100755 (executable)
@@ -144,13 +144,13 @@ sub updateMarc {
     unless ($c_marc_field) {
         if ( defined $c_subfield ) {
             $biblio->add_fields(
-                new MARC::Field(
+                MARC::Field->new(
                     $c_field, ' ', ' ', $c_subfield => $c_db_value
                 )
             );
         }
         else {
-            $biblio->add_fields( new MARC::Field( $c_field, $c_db_value ) );
+            $biblio->add_fields( MARC::Field->new( $c_field, $c_db_value ) );
         }
         $debug and warn "[WARN] $c_field did not exist.";
         $c_marc_field = $biblio->field($c_field);
@@ -173,13 +173,13 @@ sub updateMarc {
     unless ($m_marc_field) {
         if ( defined $m_subfield ) {
             $biblio->add_fields(
-                new MARC::Field(
+                MARC::Field->new(
                     $m_field, ' ', ' ', $m_subfield => $m_db_value
                 )
             );
         }
         else {
-            $biblio->add_fields( new MARC::Field( $m_field, $m_db_value ) );
+            $biblio->add_fields( MARC::Field->new( $m_field, $m_db_value ) );
         }
 
         $debug and warn "[WARN] $m_field did not exist.";
index b736bf8..6f84cdc 100755 (executable)
@@ -84,7 +84,7 @@ my @subfields = @{ $biblio->{subfields} };
 
 my $translations = {};
 if ($dump_pot) {
-    $translations->{''} = new Locale::PO(
+    $translations->{''} = Locale::PO->new(
         -msgid => '',
         -msgstr => "Project-Id-Version: Koha\n" .
             "POT-Creation-Date: " . time2str('%Y-%m-%d %R%z', time) . "\n" .
@@ -94,38 +94,38 @@ if ($dump_pot) {
     );
     while (my ($category, $values) = each %$authorised_values) {
         foreach my $authorised_value (@$values) {
-            $translations->{$authorised_value->{lib}} = new Locale::PO(
+            $translations->{$authorised_value->{lib}} = Locale::PO->new(
                 -msgid => $authorised_value->{lib},
                 -msgstr => '',
             );
         }
     }
     for my $tag (@tags) {
-        $translations->{$tag->{liblibrarian}} = new Locale::PO(
+        $translations->{$tag->{liblibrarian}} = Locale::PO->new(
             -msgid => $tag->{liblibrarian},
             -msgstr => '',
         );
     }
     for my $subfield (@subfields) {
-        $translations->{$subfield->{liblibrarian}} = new Locale::PO(
+        $translations->{$subfield->{liblibrarian}} = Locale::PO->new(
             -msgid => $subfield->{liblibrarian},
             -msgstr => '',
         );
     }
     for my $authtype (@$authtypes) {
-        $translations->{$authtype->{authtypetext}} = new Locale::PO(
+        $translations->{$authtype->{authtypetext}} = Locale::PO->new(
             -msgid => $authtype->{authtypetext},
             -msgstr => '',
         );
     }
     for my $authtag (@authtags) {
-        $translations->{$authtag->{liblibrarian}} = new Locale::PO(
+        $translations->{$authtag->{liblibrarian}} = Locale::PO->new(
             -msgid => $authtag->{liblibrarian},
             -msgstr => '',
         );
     }
     for my $authsubfield (@authsubfields) {
-        $translations->{$authsubfield->{liblibrarian}} = new Locale::PO(
+        $translations->{$authsubfield->{liblibrarian}} = Locale::PO->new(
             -msgid => $authsubfield->{liblibrarian},
             -msgstr => '',
         );;
index b9c5c0d..456532d 100644 (file)
@@ -476,7 +476,7 @@ sub get_po_from_target {
     my $target = shift;
 
     my $po;
-    my $po_head = new Locale::PO;
+    my $po_head = Locale::PO->new;
     $po_head->{msgid}  = "\"\"";
     $po_head->{msgstr} = "".
         "Project-Id-Version: Koha Project - Installation files\\n" .
@@ -516,7 +516,7 @@ sub get_po_from_target {
                                 $line =~ s/(<<.*?>>|\[\%.*?\%\]|<.*?>)/\%s/g;                                   # put placeholders
                                 next if ( $line =~ /^(\s|%s|-|[[:punct:]]|\(|\))*$/ or length($line) < 2 );     # discard non strings
                                 if ( not $po->{ $line } ) {
-                                    my $msg = new Locale::PO(
+                                    my $msg = Locale::PO->new(
                                                 -msgid => $line, -msgstr => '',
                                                 -reference => "$dir/$file:$table_name:$tablec:row:$rowc:mul:$mulc" );
                                     $po->{ $line } = $msg;
@@ -525,7 +525,7 @@ sub get_po_from_target {
                         } else {
                             if ( defined $row->{$field} and length($row->{$field}) > 1                         # discard null values and small strings
                                  and not $po->{ $row->{$field} } ) {
-                                my $msg = new Locale::PO(
+                                my $msg = Locale::PO->new(
                                             -msgid => $row->{$field}, -msgstr => '',
                                             -reference => "$dir/$file:$table_name:$tablec:row:$rowc" );
                                 $po->{ $row->{$field} } = $msg;
@@ -538,7 +538,7 @@ sub get_po_from_target {
             for my $description ( @{ $yaml->{'description'} } ) {
                 $desccount++;
                 if ( length($description) > 1 and not $po->{ $description } ) {
-                    my $msg = new Locale::PO(
+                    my $msg = Locale::PO->new(
                                 -msgid => $description, -msgstr => '',
                                 -reference => "$dir/$file:description:$desccount" );
                     $po->{ $description } = $msg;
index 44cab90..410bd68 100755 (executable)
@@ -165,7 +165,7 @@ sub main
     }
 
 
-    my $jsonobj = new JSON;
+    my $jsonobj = JSON->new;
     my $basename = basename($src);
     $basename =~ s/\.pot?$//;
     if ($pretty)
index 386faeb..63ed34b 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Context;
 use C4::Koha;
 
-my $query = new CGI;
+my $query = CGI->new;
 checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
     "intranet" );
 
index bb73d0b..312f9b1 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 5d16a4a..f486c7d 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Clubs;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 4ed8cc4..f1dc8da 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 59e373f..a3358a7 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 80256e7..7dc8c9b 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 3ea0306..ced08dd 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 5d21495..0ac32ca 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index f129a32..22d8664 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 97604c7..f534c24 100755 (executable)
@@ -27,7 +27,7 @@ use Koha::Logger;
 use Koha::ExternalContent::OverDrive;
 
 my $logger = Koha::Logger->get({ interface => 'opac' });
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $user, $cookie, $sessionID, $flags ) = checkauth( $cgi, 1, {}, 'opac' );
 my ($redirect_page, $error);
index e1215cf..1b78521 100755 (executable)
@@ -39,7 +39,7 @@ outputs the returned hashref as XML.
 =cut
 
 # Instanciate the CGI request
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # List of available services, sorted by level
 my @services = (
index 380cf20..7ec3ec8 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Templates qw/gettemplate/;
 
 use Koha;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $template = C4::Templates::gettemplate( 'maintenance.tt', 'opac', $query );
 
 my $koha_db_version = C4::Context->preference('Version');
index fd33e72..5fb9b8c 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::Acquisition::Currencies;
 use Koha::Database;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 unless ( C4::Context->preference('EnablePayPalOpacPayments') ) {
     print $cgi->redirect("/cgi-bin/koha/errors/404.pl");
index 21a8b2f..841f84f 100755 (executable)
@@ -24,7 +24,7 @@ use CGI;
 use C4::Auth;
 use Koha::Plugins::Handler;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $userid, $cookie, $sessionID, $flags ) = checkauth( $cgi, 0, {}, 'opac' );
 
index e731280..69384db 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Acquisition::Currencies;
 use Koha::Database;
 use Koha::Plugins::Handler;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my $payment_method = $cgi->param('payment_method');
 my @accountlines   = $cgi->multi_param('accountline');
 
index 15222de..8442281 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Account::Lines;
 use Koha::Patrons;
 use Koha::Plugins;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-account.tt",
index 16ec335..3563dfc 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Auth;
 use Koha::Biblios;
 use Koha::Virtualshelves;
 
-my $query           = new CGI;
+my $query           = CGI->new;
 my @biblionumbers   = $query->multi_param('biblionumber');
 my $selectedshelf   = $query->param('selectedshelf');
 my $newshelf        = $query->param('newshelf');
index 66d2bf9..08226e5 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Letters;
 use C4::Serials;
 
 
-my $query = new CGI;
+my $query = CGI->new;
 my $op    = $query->param('op') || '';
 my $dbh   = C4::Context->dbh;
 
index 2291249..11893f6 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Auth;
 use Koha::ArticleRequests;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 059cbb4..2b94883 100755 (executable)
@@ -35,7 +35,7 @@ use Koha::Authority::Types;
 use Koha::SearchEngine::Search;
 use Koha::SearchEngine::QueryBuilder;
 
-my $query        = new CGI;
+my $query        = CGI->new;
 my $op           = $query->param('op') || '';
 my $authtypecode = $query->param('authtypecode') || '';
 my $dbh          = C4::Context->dbh;
index b35df75..952bef3 100755 (executable)
@@ -50,7 +50,7 @@ use C4::Koha;
 use Koha::Authorities;
 use Koha::Authority::Types;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 1713de4..14c44c4 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::RecordProcessor;
 use Koha::CsvProfiles;
 use Koha::AuthorisedValues;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
     {
index 3d2f233..2876823 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Context;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-blocked.tt",
index cdc94bf..bbad0d4 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::SearchEngine::Elasticsearch::Search;
 use JSON;
 use Unicode::Collate;
 
-my $query = new CGI;
+my $query = CGI->new;
 binmode STDOUT, ':encoding(UTF-8)';
 
 # If calling via JS, 'api' is used to route to correct step in process
index 519472f..67851e9 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Output;
 use CGI qw ( -utf8 );
 use C4::Biblio;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 895bc80..eb1c296 100755 (executable)
@@ -20,7 +20,7 @@ use CGI qw ( -utf8 );
 use C4::Templates;
 use Koha::Util::Navigation;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $language = $query->param('language');
 my $url = Koha::Util::Navigation::local_referer($query, { remove_language => 1 });
 
index 3afa8a9..c7fe920 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Koha;
 
 use C4::CourseReserves qw(GetCourse GetCourseReserves);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {   template_name   => "opac-course-details.tt",
index de1498b..f4cf89d 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 
 use C4::CourseReserves qw(SearchCourses);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {   template_name   => "opac-course-reserves.tt",
index 75b6af8..58141c6 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Patrons;
 use Koha::Patron::Discharge;
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 unless ( C4::Context->preference('useDischarge') ) {
     print $input->redirect("/cgi-bin/koha/errors/404.pl");
index 011fd0c..99d14a7 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::RecordProcessor;
 use Koha::Virtualshelves;
 
 use utf8;
-my $query = new CGI;
+my $query = CGI->new;
 
 # if virtualshelves is disabled, leave immediately
 if ( ! C4::Context->preference('virtualshelves') ) {
index 94ea5fd..bbb9b5b 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Circulation;
 use C4::Members;
 use Koha::DateUtils;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-ics.tt",
index ffd5505..8b95311 100755 (executable)
@@ -30,7 +30,7 @@ use C4::Context;
 use C4::Search;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-idref.tt",
index 4fa3852..0601212 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::Libraries;
 use Koha::Patrons;
 use Koha::Illrequest::Availability;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # Grab all passed data
 # 'our' since Plack changes the scoping
index 30efbb2..7342691 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::CoverImages;
 $| = 1;
 
 my $DEBUG = 0;
-my $data  = new CGI;
+my $data  = CGI->new;
 my $imagenumber;
 
 =head1 NAME
index 4e717c2..6daa63d 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Biblios;
 use Koha::CoverImages;
 use Koha::Items;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-imageviewer.tt",
index f682e18..781a532 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Checkouts;
 use Koha::DateUtils;
 use Koha::Patrons;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 74755a0..c572866 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Checkouts;
 use Koha::Holds;
 use Koha::News;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $dbh   = C4::Context->dbh;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
index ee5771f..6b7afc0 100755 (executable)
@@ -45,7 +45,7 @@ use Koha::Patron::Modifications;
 use Koha::Patron::Categories;
 use Koha::Token;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my $dbh = C4::Context->dbh;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
index 046b049..ca95dda 100755 (executable)
@@ -21,7 +21,7 @@ use CGI qw ( -utf8 );
 use C4::Output;
 use C4::Reserves;
 use C4::Auth;
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-account.tt",
index 45fc6bc..d63781b 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Output;
 use C4::Reserves;
 use C4::Auth;
 use Koha::Holds;
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {   
index 95cbd6d..f8c2b0e 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::NewsChannels;    # GetNewsToDisplay
 use C4::Languages qw(getTranslatedLanguages accept_language);
 
-my $input = new CGI;
+my $input = CGI->new;
 my $dbh   = C4::Context->dbh;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
index 632d2c4..f61b222 100755 (executable)
@@ -24,7 +24,7 @@ use CGI qw ( -utf8 );
 use C4::Auth qw(:DEFAULT get_session);
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # Getting the template and auth
 my ($template, $loggedinuser, $cookie)
index 2e02d69..f6ab650 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Patrons;
 
 use Try::Tiny;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 3d492dd..57e1308 100755 (executable)
@@ -11,7 +11,7 @@ use Koha::Patron::Password::Recovery
   qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery DeleteExpiredPasswordRecovery);
 use Koha::Patrons;
 use Koha::Patrons;
-my $query = new CGI;
+my $query = CGI->new;
 use HTML::Entities;
 use Try::Tiny;
 use List::Util qw/any/;
index 95c6449..2de16ab 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Patrons;
 
 use constant GDPR_PROCESSING => 'GDPR_PROCESSING';
 
-my $query = new CGI;
+my $query = CGI->new;
 my $op = $query->param('op') // q{};
 my $gdpr_check = $query->param('gdpr_processing') // q{};
 
index 6c24e48..b40788d 100755 (executable)
@@ -25,7 +25,7 @@ use CGI::Cookie;  # need to check cookies before having CGI parse the POST reque
 use C4::Auth qw(:DEFAULT check_cookie_auth);
 use Koha::Patron::Images;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 unless (C4::Context->preference('OPACpatronimages')) {
     print $query->header(status => '403 Forbidden - displaying patron images in the OPAC not enabled');
index 0b2d414..2b0ed98 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Context;
 use C4::Output;
 use Koha::Patrons;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # if OPACPrivacy is disabled, leave immediately
 if ( ! C4::Context->preference('OPACPrivacy') || ! C4::Context->preference('opacreadinghistory') ) {
index 5cd38b9..77b591b 100755 (executable)
@@ -36,7 +36,7 @@ use Koha::Patrons;
 use Koha::ItemTypes;
 use Koha::Ratings;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # if opacreadinghistory is disabled, leave immediately
 if ( ! C4::Context->preference('opacreadinghistory') ) {
index 4a390b3..1345080 100755 (executable)
@@ -24,7 +24,7 @@ use CGI qw( -utf8 );
 use C4::Auth;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index f5cd15a..71ea329 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::Patron::Consent;
 use Koha::Patron::Modifications;
 use Koha::Patron::Categories;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my $dbh = C4::Context->dbh;
 
 unless ( C4::Context->preference('PatronSelfRegistration') ) {
index b1111d0..55b20eb 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Members;
 use Koha::Items;
 use Koha::Patrons;
 use Date::Calc qw( Today Date_to_Days );
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
        {
index b7e133c..293f282 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Util::Navigation;
 use URI::Escape;
 use Encode;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 3094736..d6ce08f 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 use Koha::Biblios;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index a930ddb..2e3a835 100755 (executable)
@@ -47,7 +47,7 @@ use List::MoreUtils qw/uniq/;
 
 my $maxreserves = C4::Context->preference("maxreserves");
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # if RequestOnOpac (for placing holds) is disabled, leave immediately
 if ( ! C4::Context->preference('RequestOnOpac') ) {
index 19d0f72..e9a325a 100755 (executable)
@@ -33,7 +33,7 @@ foreach my $IPRange ( split( ',', $localNetwork ) )
     last if $withinNetwork;
 }
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
         template_name   => "opac-restrictedpage.tt",
index 6c0ac3e..9c27763 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::DateUtils;
 use Koha::Review;
 use Koha::Reviews;
 
-my $query        = new CGI;
+my $query        = CGI->new;
 my $biblionumber = $query->param('biblionumber');
 my $review       = $query->param('review');
 my $reviewid     = $query->param('reviewid');
index 8e4771c..6982c16 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::Patrons;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 unless ( C4::Context->preference('RoutingSerials') ) {
     print $query->redirect("/cgi-bin/koha/errors/404.pl");
index b058949..a9a4a73 100755 (executable)
@@ -32,7 +32,7 @@ use URI::Escape;
 use POSIX qw(strftime);
 
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # Getting the template and auth
 my ($template, $loggedinuser, $cookie) = get_template_and_user(
index 0e679da..2d1ac14 100755 (executable)
@@ -73,7 +73,7 @@ my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
 # create a new CGI object
 # FIXME: no_undef_params needs to be tested
 use CGI qw('-no_undef_params' -utf8);
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $branch_group_limit = $cgi->param("branch_group_limit");
 if ( $branch_group_limit ) {
index a8ca089..c97aa45 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Email;
 use Koha::Patrons;
 use Koha::Virtualshelves;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # if virtualshelves is disabled, leave immediately
 if ( ! C4::Context->preference('virtualshelves') ) {
index cf095c1..74e5abb 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Letters;
 use C4::Output;
 use C4::Context;
 
-my $query      = new CGI;
+my $query      = CGI->new;
 my $op         = $query->param('op');
 my $dbh        = C4::Context->dbh;
 my $selectview = $query->param('selectview');
index 34a1778..7eecf6c 100755 (executable)
@@ -40,7 +40,7 @@ use Koha::Virtualshelfshares;
 
 # if virtualshelves is disabled, leave immediately
 if ( ! C4::Context->preference('virtualshelves') ) {
-    my $query = new CGI;
+    my $query = CGI->new;
     print $query->redirect("/cgi-bin/koha/errors/404.pl");
     exit;
 }
@@ -60,7 +60,7 @@ output_html_with_http_headers $pvar->{query}, $pvar->{cookie}, $pvar->{template}
 
 sub _init {
     my ($param) = @_;
-    my $query = new CGI;
+    my $query = CGI->new;
     $param->{query}       = $query;
     $param->{shelfnumber} = $query->param('shelfnumber') || 0;
     $param->{op}          = $query->param('op') || '';
index 180d0d2..0bcd273 100755 (executable)
@@ -41,7 +41,7 @@ use Koha::RecordProcessor;
 
 use constant ANYONE => 2;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $template_name = $query->param('rss') ? "opac-shelves-rss.tt" : "opac-shelves.tt";
 
index a8b5849..a30e3e5 100755 (executable)
@@ -33,7 +33,7 @@ use C4::XSLT ();
 use C4::Templates;
 use Koha::RecordProcessor;
 
-my $input       = new CGI;
+my $input       = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
     template_name   => "opac-showmarc.tt",
     query           => $input,
index 3f0fef1..cfb359c 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::Reviews;
 use POSIX qw(ceil floor strftime);
 
 my $template_name;
-my $query = new CGI;
+my $query = CGI->new;
 my $format = $query->param("format") || '';
 my $count = C4::Context->preference('OPACnumSearchResults') || 20;
 my $results_per_page = $query->param('count') || $count;
index ae26ed3..2c7dbfb 100755 (executable)
@@ -35,7 +35,7 @@ use Koha::Patrons;
 
 use Koha::DateUtils;
 
-my $input           = new CGI;
+my $input           = CGI->new;
 my $op              = $input->param('op') || 'else';
 my $biblionumber    = $input->param('biblionumber');
 my $suggestion      = $input->Vars;
index b083ef2..3c55c46 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Output;
 use CGI qw ( -utf8 );
 use C4::Biblio;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index fbf0081..1f6edae 100755 (executable)
@@ -39,7 +39,7 @@ plugin that shows a stats on borrowers
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 
 # if OpacTopissue is disabled, leave immediately
 if ( ! C4::Context->preference('OpacTopissue') ) {
index a380d88..fd15abd 100755 (executable)
@@ -55,7 +55,7 @@ use Date::Calc qw(
   Date_to_Days
 );
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # CAS single logout handling
 # Will print header and exit
index e62f6a5..88a3cf8 100755 (executable)
@@ -27,7 +27,7 @@ use Koha::Items;
 use List::MoreUtils qw( uniq );
 use Try::Tiny;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # 404 if feature is disabled
 unless ( C4::Context->preference('SelfCheckInModule') ) {
index 8451445..22fb99a 100755 (executable)
@@ -27,7 +27,7 @@ use CGI qw ( -utf8 );
 use C4::Auth   qw(get_template_and_user in_iprange);
 use C4::Output qw(output_html_with_http_headers);
 
-my $query = new CGI;
+my $query = CGI->new;
 unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
     print $query->redirect("/cgi-bin/koha/opac-main.pl");
     exit;
index 98ded2a..3b70741 100755 (executable)
@@ -34,7 +34,7 @@ use C4::Output;
 use C4::Members;
 use C4::Koha;
 
-my $input = new CGI;
+my $input = CGI->new;
 unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
     print $input->header(status => '403 Forbidden - functionality not available from your location');
     exit;
index 111e3a2..75b64e5 100755 (executable)
@@ -51,7 +51,7 @@ use Koha::Patron::Images;
 use Koha::Patron::Messages;
 use Koha::Token;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 unless (C4::Context->preference('WebBasedSelfCheck')) {
     # redirect to OPAC home if self-check is not enabled
index 7814953..8913ab7 100755 (executable)
@@ -42,7 +42,7 @@ svc/checkout_notes - Web service for setting patron notes on items
 
 # AJAX requests
 my $is_ajax = is_ajax();
-my $query = new CGI;
+my $query = CGI->new;
 my ( $auth_status, $sessionID ) = check_cookie_auth( $query->cookie('CGISESSID'), {} );
 if ( $auth_status ne "ok" ) {
     exit 0;
index d219933..c9af283 100755 (executable)
@@ -26,7 +26,7 @@ use JSON qw(to_json);
 use C4::Auth qw(check_cookie_auth);
 use Koha::Club::Enrollments;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $cgi->cookie('CGISESSID') );
index 98da33f..105cbb6 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Club::Enrollment::Field;
 use Koha::Club::Enrollment;
 use Koha::Clubs;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $cgi->cookie('CGISESSID') );
index 57333f0..89d0865 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::Library::OverDriveInfos;
 use Koha::ExternalContent::OverDrive;
 
 my $logger = Koha::Logger->get({ interface => 'opac' });
-our $cgi = new CGI;
+our $cgi = CGI->new;
 my $page_url = $cgi->referer();
 
 my ( $user, $cookie, $sessionID, $flags ) = checkauth( $cgi, 1, {}, 'opac' );
index d8fd7c6..1404e98 100755 (executable)
@@ -43,7 +43,7 @@ use C4::Output;
 
 use Koha;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $token;
 
index d55a15c..4a5c937 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Output;
 use Koha::Logger;
 use Koha::ExternalContent::RecordedBooks;
 
-our $cgi = new CGI;
+our $cgi = CGI->new;
 my $logger = Koha::Logger->get({ interface => 'opac' });
 my $page_url = $cgi->referer();
 
index 2b24a0e..82e583c 100755 (executable)
@@ -8,7 +8,7 @@ use C4::Context;
 use C4::Output;
 use C4::ShelfBrowser;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index f4fb1d8..04b0655 100755 (executable)
@@ -60,7 +60,7 @@ use CGI qw ( -utf8 );
 use JSON;
 use Koha::SuggestionEngine;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 2c0d213..ab07f03 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Linktracker;
 use CGI qw ( -utf8 );
 use List::MoreUtils qw(any);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my $uri = $cgi->param('uri') || '';
 my $biblionumber = $cgi->param('biblionumber') || 0;
 my $itemnumber   = $cgi->param('itemnumber')   || 0;
index b0b39cc..c10c208 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::List::Patron;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 7751fe8..87c199b 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::List::Patron;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 90b5801..75f30e2 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 use Koha::List::Patron;
 use List::MoreUtils qw/uniq/;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $logged_in_user, $cookie ) = get_template_and_user(
     {
index cdb055a..df84727 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::List::Patron;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 2c10923..98ac959 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Output;
 use Koha::List::Patron;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 9551ab0..5c250e8 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index fc584a3..1ffaa00 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::List::Patron;
 use Koha::Patrons;
 use Koha::Patron::Images;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
                                                                      template_name   => "labels/label-home.tt",
index 990642e..992c58a 100755 (executable)
@@ -31,7 +31,7 @@ use C4::Creators;
 use C4::Patroncards;
 use Koha::Patrons;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/edit-batch.tt",
index 6ff6101..8e415af 100755 (executable)
@@ -30,7 +30,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Patroncards;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/edit-layout.tt",
index 6f3782b..e5ceb08 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators::Lib qw(get_all_templates get_unit_values);
 use C4::Patroncards::Profile;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/edit-profile.tt",
index 8ac1e48..cce2a8f 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Patroncards;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/edit-template.tt",
index bd0c16c..7bb2bc4 100755 (executable)
@@ -25,7 +25,7 @@ use CGI qw ( -utf8 );
 use C4::Auth qw(get_template_and_user);
 use C4::Output qw(output_html_with_http_headers);
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/home.tt",
index 1611e79..4ea36eb 100755 (executable)
@@ -31,7 +31,7 @@ use C4::Patroncards;
 use C4::Labels;
 use Koha::List::Patron;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/manage.tt",
index 758afff..60cff0e 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output qw(output_html_with_http_headers);
 use C4::Creators;
 use C4::Patroncards;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "patroncards/print.tt",
index 9e7714c..1815507 100755 (executable)
@@ -25,7 +25,7 @@ use Koha::Plugins::Handler;
 
 die("Koha plugins are disabled!") unless C4::Context->config("enable_plugins");
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'), { plugins => 'manage' } );
index 5757811..1efcc02 100755 (executable)
@@ -32,7 +32,7 @@ use C4::Context;
 
 my $plugins_enabled = C4::Context->config("enable_plugins");
 
-my $input  = new CGI;
+my $input  = CGI->new;
 my $method = $input->param('method');
 my $plugin_search = $input->param('plugin-search');
 
index 0c0d56d..8f933a2 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::Plugins::Handler;
 
 die("Koha plugins are disabled!") unless C4::Context->config("enable_plugins");
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "plugins/plugins-upload.tt",
index da538fc..c81e6f1 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Plugins;
 
 my $plugins_enabled = C4::Context->config("enable_plugins");
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name => ($plugins_enabled) ? "plugins/plugins-upload.tt" : "plugins/plugins-disabled.tt",
index 3aa3ab1..d050f47 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Context;
 
 my $plugins_enabled = C4::Context->config("enable_plugins");
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $class  = $cgi->param('class');
 my $method = $cgi->param('method');
index d5de0a2..b560e45 100755 (executable)
@@ -41,7 +41,7 @@ Plugin that shows a stats on borrowers
 
 =cut
 
-my $input          = new CGI;
+my $input          = CGI->new;
 my $do_it          = $input->param('do_it');
 my $fullreportname = "reports/acquisitions_stats.tt";
 my $line           = $input->param("Line");
index a41985b..d88d701 100755 (executable)
@@ -43,7 +43,7 @@ plugin that shows a stats on borrowers
 
 $debug and open my $debugfh, '>', '/tmp/bor_issues_top.debug.log';
 
-my $input = new CGI;
+my $input = CGI->new;
 my $fullreportname = "reports/bor_issues_top.tt";
 my $do_it   = $input->param('do_it');
 my $limit   = $input->param("Limit");
index 357719c..394bf38 100755 (executable)
@@ -41,7 +41,7 @@ Plugin that shows a stats on borrowers
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $do_it=$input->param('do_it');
 my $fullreportname = "reports/borrowers_out.tt";
 my $limit = $input->param("Limit");
index 3eaba08..c53491a 100755 (executable)
@@ -48,7 +48,7 @@ plugin that shows a stats on borrowers
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $do_it=$input->param('do_it');
 my $fullreportname = "reports/borrowers_stats.tt";
 my $line = $input->param("Line");
index 0e92d5c..b9a3fe8 100755 (executable)
@@ -31,7 +31,7 @@ use List::Util qw/any/;
 use Koha::Account::CreditTypes;
 use Koha::Account::DebitTypes;
 
-my $input            = new CGI;
+my $input            = CGI->new;
 my $dbh              = C4::Context->dbh;
 
 my ($template, $borrowernumber, $cookie) = get_template_and_user({
index 596ea00..28025cc 100755 (executable)
@@ -38,7 +38,7 @@ plugin that shows a stats on borrowers
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $do_it=$input->param('do_it');
 my $fullreportname = "reports/cat_issues_top.tt";
 my $limit = $input->param("Limit");
index d85cebc..bea7fe9 100755 (executable)
@@ -33,7 +33,7 @@ Report that shows unborrowed items.
 
 =cut
 
-my $input   = new CGI;
+my $input   = CGI->new;
 my $do_it   = $input->param('do_it');
 my $limit   = $input->param("Limit") || 10;
 my $column  = $input->param("Criteria");
index 15ccefd..85293b7 100755 (executable)
@@ -41,7 +41,7 @@ plugin that shows a stats on borrowers
 =cut
 
 our $debug = 0;
-my $input = new CGI;
+my $input = CGI->new;
 my $fullreportname = "reports/catalogue_stats.tt";
 my $do_it       = $input->param('do_it');
 my $line        = $input->param("Line");
index 2c89904..9cc7ed7 100755 (executable)
@@ -32,7 +32,7 @@ Script to control the guided report creation
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $referer = $input->referer();
 
 my $phase = $input->param('phase') || 'View Dictionary';
index 6bf32e2..aab868e 100755 (executable)
@@ -50,7 +50,7 @@ Script to control the guided report creation
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $usecache = Koha::Caches->get_instance->memcached_cache;
 
 my $phase = $input->param('phase') // '';
index d700664..ca074b5 100755 (executable)
@@ -39,7 +39,7 @@ plugin that shows a stats on borrowers
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 my $do_it=$input->param('do_it');
 my $fullreportname = "reports/issues_avg_stats.tt";
 my $line = $input->param("Line");
index de1e798..3fcb75d 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::AuthorisedValues;
 use Koha::CsvProfiles;
 use Koha::DateUtils;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "reports/itemslost.tt",
index 82a9cb6..45f2d60 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Circulation;
 
 
-my $input = new CGI;
+my $input = CGI->new;
 my $report_name=$input->param("report_name");
 my $do_it=$input->param('do_it');
 my $fullreportname = "reports/".$report_name.".tt";
index 7f50e9a..d5fa107 100755 (executable)
@@ -37,7 +37,7 @@ use C4::Acquisition; #GetBasket()
 use Koha::Biblios;
 use Koha::DateUtils;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "reports/orders_by_budget.tt",
index b8ba0aa..78978c1 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Context;
 
 
-my $query = new CGI;
+my $query = CGI->new;
 my ($template, $loggedinuser, $cookie)
 = get_template_and_user({template_name => "reports/reports-home.tt",
                                query => $query,
index 77d6eea..79d8db9 100755 (executable)
@@ -47,7 +47,7 @@ Plugin that shows reserve stats
 =cut
 
 # my $debug = 1;       # override for now.
-my $input = new CGI;
+my $input = CGI->new;
 my $fullreportname = "reports/reserves_stats.tt";
 my $do_it    = $input->param('do_it');
 my $line     = $input->param("Line");
index 10c0a6e..9a0a071 100755 (executable)
@@ -34,7 +34,7 @@ plugin that shows a stats on serials
 
 =cut
 
-my $input      = new CGI;
+my $input      = CGI->new;
 my $templatename   = "reports/serials_stats.tt";
 my $do_it      = $input->param("do_it");
 my $bookseller = $input->param("bookseller");
index ce07bec..b2d1383 100755 (executable)
@@ -30,7 +30,7 @@ use C4::Reserves;
 use C4::Auth;
 use Koha::DateUtils qw( dt_from_string );
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   
         template_name   => "about.tt",
index ea303f3..dbe6b22 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output;
 use C4::Reserves;
 use C4::Auth;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "about.tt",
index bff6185..503a676 100755 (executable)
@@ -56,7 +56,7 @@ use Koha::Patrons;
 use Koha::Clubs;
 
 my $dbh = C4::Context->dbh;
-my $input = new CGI;
+my $input = CGI->new;
 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => "reserve/request.tt",
index e115941..f5050d2 100755 (executable)
@@ -26,7 +26,7 @@ use Koha::Biblios;
 use Koha::Patrons;
 use Koha::Reviews;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "reviews/reviewswaiting.tt",
index b52113a..5cd49df 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Items;
 
 use CGI qw ( -utf8 );
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 4df8942..33014e9 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Context;
 
 use C4::RotatingCollections;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 941f778..7eb3975 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth;
 use C4::Context;
 use C4::RotatingCollections;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index bdee62a..5cfc626 100755 (executable)
@@ -25,7 +25,7 @@ use C4::RotatingCollections;
 
 use CGI qw ( -utf8 );
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $colId    = $query->param('colId');
 my $toBranch = $query->param('toBranch');
index 1897f5f..ece1232 100755 (executable)
@@ -50,7 +50,7 @@ use Koha::DateUtils;
 
 use Koha::Acquisition::Booksellers;
 
-my $query=new CGI;
+my $query=CGI->new;
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "serials/acqui-search-result.tt",
                  query => $query,
index 95b02c2..58d659d 100755 (executable)
@@ -23,7 +23,7 @@ use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Output;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index 6b77c9e..dedce1d 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 4f0c1e8..10d5dac 100755 (executable)
@@ -52,7 +52,7 @@ use Koha::DateUtils;
 
 use DateTime;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user (
     {
index 52b303d..506a539 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Serials::Numberpattern;
 use C4::Auth qw/check_cookie_auth/;
 use URI::Escape;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($auth_status, $sessionID) = check_cookie_auth($input->cookie('CGISESSID'), { serials => '*' });
 if ($auth_status ne "ok") {
index e36e734..7af3395 100755 (executable)
@@ -27,7 +27,7 @@ use Koha::CsvProfiles;
 
 use Text::CSV_XS;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $supplierid = $query->param('supplierid');
 my @serialids = $query->multi_param('serialid');
 my $op = $query->param('op') || q{};
index 12f2ebc..40a8344 100755 (executable)
@@ -37,7 +37,7 @@ use Koha::Biblios;
 use Koha::Libraries;
 use Koha::Patrons;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $subscriptionid = $query->param('subscriptionid');
 my $issue = $query->param('issue');
 my $routingid;
index 49aa9c3..6a237f6 100755 (executable)
@@ -40,7 +40,7 @@ use Koha::Patrons;
 
 use URI::Escape;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $subscriptionid = $query->param('subscriptionid');
 my $serialseq = $query->param('serialseq');
 my $routingid = $query->param('routingid');
index e36e50e..a1979ed 100755 (executable)
@@ -34,7 +34,7 @@ use Koha::DateUtils qw( dt_from_string );
 use List::MoreUtils qw/uniq/;
 
 
-my $query = new CGI;
+my $query = CGI->new;
 my $op = $query->param('op') || q{};
 my $nbissues=$query->param('nbissues');
 my $date_received_today = $query->param('date_received_today') || 0;
index 3fc15d0..8f7cb15 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Context;
 use C4::Output;
 use C4::Serials;
 
-my $query   = new CGI;
+my $query   = CGI->new;
 my $routing = $query->param('routing') || C4::Context->preference("RoutingSerials");
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 456a6cd..a072328 100755 (executable)
@@ -40,7 +40,7 @@ use Koha::AdditionalFields;
 use Koha::DateUtils;
 use Koha::SharedContent;
 
-my $query         = new CGI;
+my $query         = CGI->new;
 my $title         = $query->param('title_filter') || '';
 my $ISSN          = $query->param('ISSN_filter') || '';
 my $EAN           = $query->param('EAN_filter') || '';
index 78fbea9..d6bcfc7 100755 (executable)
@@ -38,7 +38,7 @@ use C4::Serials;
 use C4::Serials::Frequency;
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'serials/showpredictionpattern.tt',
     query           => $input,
index fcc3aa4..b06f68d 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::Acquisition::Booksellers;
 use Koha::AdditionalFields;
 use Koha::DateUtils;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ($template, $loggedinuser, $cookie) = get_template_and_user({
     template_name => 'serials/subscription-batchedit.tt',
index 20042cb..049da96 100755 (executable)
@@ -61,7 +61,7 @@ use Koha::ItemTypes;
 use Koha::SearchEngine;
 use Koha::SearchEngine::Search;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') || q{};
 my $dbh = C4::Context->dbh;
 
index 40e4cd9..ac4abce 100755 (executable)
@@ -37,7 +37,7 @@ use Carp;
 
 use Koha::SharedContent;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $op = $query->param('op') || q{};
 my $issueconfirmed = $query->param('issueconfirmed');
 my $dbh = C4::Context->dbh;
index 51f84a2..ad14c0c 100755 (executable)
@@ -36,7 +36,7 @@ use C4::Output;
 use C4::Serials;
 use C4::Serials::Frequency;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'serials/subscription-frequencies.tt',
     query           => $input,
index f7fe7c0..2532f8f 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Serials::Frequency;
 use C4::Auth qw/check_cookie_auth/;
 use JSON qw( to_json );
 
-my $input=new CGI;
+my $input=CGI->new;
 my $frqid=$input->param("frequency_id");
 my ($auth_status, $sessionID) = check_cookie_auth($input->cookie('CGISESSID'), { serials => '*' });
 if ($auth_status ne "ok") {
index 084468c..4001a5d 100755 (executable)
@@ -38,7 +38,7 @@ use C4::Serials;
 use Koha::Biblios;
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'serials/subscription-history.tt',
     query           => $input,
index 26745f1..db17860 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Serials::Numberpattern;
 use C4::Auth qw/check_cookie_auth/;
 use JSON qw( to_json );
 
-my $input=new CGI;
+my $input=CGI->new;
 
 my ($auth_status, $sessionID) = check_cookie_auth($input->cookie('CGISESSID'), { serials => '*' });
 if ($auth_status ne "ok") {
index 673acbe..99969b1 100755 (executable)
@@ -35,7 +35,7 @@ use C4::Output;
 use C4::Serials::Numberpattern;
 use C4::Serials::Frequency;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'serials/subscription-numberpatterns.tt',
     query           => $input,
index 4589f97..94f0f50 100755 (executable)
@@ -55,7 +55,7 @@ use C4::Output;
 use C4::Serials;
 use Koha::DateUtils;
 
-my $query = new CGI;
+my $query = CGI->new;
 my $dbh   = C4::Context->dbh;
 
 my $mode           = $query->param('mode') || q{};
index 23a0a7d..444d39c 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 
 use Koha::Subscriptions;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => 'serials/viewalerts.tt',
index 2c2832f..79ee88e 100755 (executable)
@@ -34,7 +34,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Items;
 
-my $input = new CGI;
+my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'services/itemrecorddisplay.tt',
     query           => $input,
index 2501447..c810bba 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index bdbb281..83e8a98 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Members;
 
 use Koha::Patron::Categories;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh;
 
index 4a0a3f5..e5c1759 100755 (executable)
@@ -26,7 +26,7 @@ use JSON qw(to_json);
 use C4::Auth qw(check_cookie_auth);
 use Koha::ArticleRequests;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $cgi->cookie('CGISESSID'), { circulate => 'circulate_remaining_permissions' } );
index 89aa648..d375a11 100755 (executable)
@@ -24,7 +24,7 @@ use CGI qw ( -utf8 );
 use C4::Auth qw/check_api_auth/;
 use XML::Simple;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 # The authentication strategy for the biblios web 
 # services is as follows.
index 3c362a4..1f71d43 100755 (executable)
@@ -89,7 +89,7 @@ below the scannable barcode.
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => '*' } );
 
diff --git a/svc/bib b/svc/bib
index 11cc260..43fc6f6 100755 (executable)
--- a/svc/bib
+++ b/svc/bib
@@ -27,7 +27,7 @@ use C4::Biblio;
 use C4::Items;
 use XML::Simple;
 
-my $query = new CGI;
+my $query = CGI->new;
 binmode STDOUT, ':encoding(UTF-8)';
 
 my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
index 1b64010..5566d94 100755 (executable)
@@ -26,7 +26,7 @@ use XML::Simple;
 
 binmode STDOUT, ':encoding(UTF-8)';
 
-my $query = new CGI;
+my $query = CGI->new;
 my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
 unless ($status eq 'ok') {
     print $query->header(-type => 'text/xml', -status => '403 Forbidden');
index 7203f0c..46ebe37 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Koha;
 use Koha::ItemTypes;
 use XML::Simple;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
 
index 2d39276..93fa495 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Auth qw(check_cookie_auth);
 use Koha::Checkouts;
 use Koha::Items;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'),
index 5ad972c..3abd3a8 100755 (executable)
@@ -36,7 +36,7 @@ svc/checkout_notes - Web service for managing patron notes set on issues
 
 # AJAX requests
 my $is_ajax = is_ajax();
-my $query = new CGI;
+my $query = CGI->new;
 my ( $auth_status, $sessionID ) = check_cookie_auth( $query->cookie('CGISESSID'), { circulate => 'manage_checkout_notes' } );
 if ( $auth_status ne "ok" ) {
     exit 0;
index 3e92e40..2dce8f3 100755 (executable)
@@ -31,7 +31,7 @@ use Koha::AuthorisedValues;
 use Koha::DateUtils;
 use Koha::ItemTypes;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'));
index b4f19b7..d67d547 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Auth qw(check_cookie_auth);
 
 use Koha::Club::Enrollments;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $cgi->cookie('CGISESSID'), { clubs => 'enroll' } );
index e48062f..636b0ed 100755 (executable)
@@ -26,7 +26,7 @@ use JSON qw(to_json);
 use C4::Auth qw(check_cookie_auth);
 use Koha::Clubs;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) = check_cookie_auth( $cgi->cookie('CGISESSID'), { clubs => 'edit_clubs' } );
 if ( $auth_status ne "ok" ) {
index e9f7544..014ca4c 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Club::Enrollment::Fields;
 use Koha::Club::Enrollments;
 use Koha::Clubs;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $cgi->cookie('CGISESSID'), { clubs => 'enroll' } );
index c15e47a..b3700b6 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Auth qw(check_cookie_auth);
 
 use Koha::Club::Templates;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $auth_status, $sessionID ) = check_cookie_auth( $cgi->cookie('CGISESSID'), { clubs => 'edit_templates' } );
 if ( $auth_status ne "ok" ) {
index 688067f..82e68f2 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Auth qw/check_cookie_auth/;
 use Koha::CoverImages;
 use JSON qw/to_json/;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
         check_cookie_auth(
index 28436e0..743cf11 100755 (executable)
@@ -38,7 +38,7 @@ svc/creator_batches - Web service for managing AJAX functionality for patroncard
 
 # AJAX requests
 my $is_ajax = is_ajax();
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my ( $auth_status, $sessionID ) = check_cookie_auth( $cgi->cookie('CGISESSID'), { catalogue => 1 } );
 if ( $auth_status ne "ok" ) {
     exit 0;
index 497a497..e14c6b1 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Auth qw(check_cookie_auth);
 use Koha::DateUtils qw(dt_from_string);
 use Koha::Holds;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'), { circulate => 'circulate_remaining_permissions' } );
index 6a1bd86..41b4130 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Auth qw(check_cookie_auth);
 use Koha::DateUtils qw(dt_from_string);
 use Koha::Holds;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'), { circulate => 'circulate_remaining_permissions' } );
index 37254b6..1a2fc33 100755 (executable)
--- a/svc/holds
+++ b/svc/holds
@@ -32,7 +32,7 @@ use Koha::Holds;
 use Koha::ItemTypes;
 use Koha::Libraries;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'),
index 3073463..092d8fd 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Matcher;
 use XML::Simple;
 # use Carp::Always;
 
-my $query = new CGI;
+my $query = CGI->new;
 binmode STDOUT, ':encoding(UTF-8)';
 
 my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
index 11c3d18..17d7ad8 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Checkouts;
 use Koha::Items;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 5b58496..2b0197b 100755 (executable)
@@ -27,7 +27,7 @@ use CGI;
 use JSON;
 
 
-my $input = new CGI;
+my $input = CGI->new;
 binmode STDOUT, ":encoding(UTF-8)";
 print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
 
index 16b8ab6..84b356c 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output qw( output_html_with_http_headers );
 
 use CGI;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'),
@@ -78,4 +78,4 @@ $template->param( $input->param('resource')."s" => $result->{data} );
 $template->param( statuscode => $result->{code} );
 $template->param( msg => $result->{msg} );
 
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
+output_html_with_http_headers $input, $cookie, $template->output;
index 504b201..367b5e7 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Auth qw(check_cookie_auth);
 use CGI;
 use JSON;
 
-my $input = new CGI;
+my $input = CGI->new;
 binmode STDOUT, ":encoding(UTF-8)";
 print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
 
index f08e9d1..6b6d6bc 100755 (executable)
@@ -28,7 +28,7 @@ use CGI;
 use JSON;
 
 
-my $input = new CGI;
+my $input = CGI->new;
 binmode STDOUT, ":encoding(UTF-8)";
 print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
 
index 55021d9..62bcfce 100755 (executable)
@@ -24,7 +24,7 @@ use C4::Auth qw( check_cookie_auth );
 use JSON qw( to_json );
 use Koha::List::Patron;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) = check_cookie_auth(
     $input->cookie('CGISESSID'),
index 06201ef..7cad0e8 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Utils::DataTables::Members qw( search );
 use Koha::DateUtils qw( output_pref dt_from_string );
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 exit unless $input->param('template_path');
 
index c41d298..0aa04fc 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Items;
 use XML::Simple;
 use C4::Charset;
 
-my $query = new CGI;
+my $query = CGI->new;
 binmode STDOUT, ':encoding(UTF-8)';
 
 my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
index 9fedc92..9df283e 100755 (executable)
@@ -36,7 +36,7 @@ svc/problem_reports - Web service for managing OPAC problem reports
 
 # AJAX requests
 my $is_ajax = is_ajax();
-my $query = new CGI;
+my $query = CGI->new;
 my ( $auth_status, $sessionID ) = check_cookie_auth( $query->cookie('CGISESSID'), { problem_reports => 1 } );
 if ( $auth_status ne "ok" ) {
     exit 0;
index 51b915b..786ce57 100755 (executable)
--- a/svc/renew
+++ b/svc/renew
@@ -28,7 +28,7 @@ use C4::Auth qw(check_cookie_auth);
 
 use Koha::DateUtils qw(output_pref dt_from_string);
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID'),
index e1971ef..a37ac21 100755 (executable)
@@ -29,7 +29,7 @@ use Koha::AuthorisedValues;
 use Koha::DateUtils;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my ( $auth_status, $sessionID ) =
   check_cookie_auth( $input->cookie('CGISESSID') );
index 1bbbeba..403da12 100755 (executable)
@@ -8,7 +8,7 @@ use C4::Output qw( output_with_http_headers );
 use C4::Utils::DataTables qw( dt_get_params );
 use C4::Utils::DataTables::VirtualShelves qw( search );
 
-my $input = new CGI;
+my $input = CGI->new;
 
 exit unless $input->param('template_path');
 
index 7a91a00..622fd16 100755 (executable)
@@ -63,7 +63,7 @@ $ENV{'city'} = undef;
 
 # Setup Mocks
 ## Mock Context
-my $context = new Test::MockModule('C4::Context');
+my $context = Test::MockModule->new('C4::Context');
 
 ### Mock ->config
 $context->mock( 'config', \&mockedConfig );
@@ -81,7 +81,7 @@ my $interface = 'opac';
 $context->mock( 'interface', \&mockedInterface );
 
 ## Mock Database
-my $database = new Test::MockModule('Koha::Database');
+my $database = Test::MockModule->new('Koha::Database');
 
 ### Mock ->schema
 $database->mock( 'schema', \&mockedSchema );
index b4b94bf..151e8b1 100755 (executable)
@@ -49,7 +49,7 @@ $db->mock(
 # We need to mock the C4::Context->preference method for
 # simplicity and re-usability of the session definition. Any
 # syspref fits for syspref-agnostic tests.
-my $module_context = new Test::MockModule('C4::Context');
+my $module_context = Test::MockModule->new('C4::Context');
 $module_context->mock(
     'preference',
     sub {
index 3ecdb31..cbdaaed 100755 (executable)
@@ -63,7 +63,7 @@ subtest 'needs_install() tests' => sub {
     is( C4::Context->needs_install, 1, "->preference(Version) is not defined, need to install" );
 };
 
-my $context = new Test::MockModule('C4::Context');
+my $context = Test::MockModule->new('C4::Context');
 my $userenv = {};
 
 $context->mock('userenv', sub {
index 5248997..5b00c77 100755 (executable)
@@ -188,7 +188,7 @@ cmp_ok $date_string, 'eq', '12/11/2013 06:35 PM', 'as_due_date with hours and ti
 my $now = DateTime->now;
 is( dt_from_string, $now, "Without parameter, dt_from_string should return today" );
 
-my $module_context = new Test::MockModule('C4::Context');
+my $module_context = Test::MockModule->new('C4::Context');
 $module_context->mock(
     'tz',
     sub {
index 0c2c53e..3851baf 100755 (executable)
@@ -94,13 +94,13 @@ subtest "new() tests" => sub {
     my $record = MARC::Record->new();
     my $metadata_record;
 
-    warning_is { $metadata_record = new Koha::MetadataRecord({
+    warning_is { $metadata_record = Koha::MetadataRecord->new({
                         record => $record }) }
                { carped => 'No schema passed' },
         "Metadata schema is mandatory, raise a carped warning if omitted";
     is( $metadata_record, undef, "Metadata schema is mandatory, return undef if omitted");
 
-    $metadata_record = new Koha::MetadataRecord({
+    $metadata_record = Koha::MetadataRecord->new({
         record => $record,
         schema => 'marc21'
     });
@@ -115,7 +115,7 @@ subtest "new() tests" => sub {
     my $weird_record = {};
     bless $weird_record, 'Weird::Class';
 
-    $metadata_record = new Koha::MetadataRecord({
+    $metadata_record = Koha::MetadataRecord->new({
         record => $weird_record,
         schema => 'something',
         format => 'else',
@@ -129,7 +129,7 @@ subtest "new() tests" => sub {
     is( $metadata_record->id, 'an id', 'The id correctly set');
 
     # Having a record object is mandatory
-    warning_is { $metadata_record = new Koha::MetadataRecord({
+    warning_is { $metadata_record = Koha::MetadataRecord->new({
                                         record => undef,
                                         schema => 'something',
                                         format => 'else',
index 5cba73b..13079a9 100755 (executable)
@@ -38,12 +38,12 @@ subtest "Koha::Template::Plugin::Koha::Version tests" => sub {
     my $development;
 
     # Mock Koha::version()
-    my $koha = new Test::MockModule('Koha');
+    my $koha = Test::MockModule->new('Koha');
     $koha->mock( 'version', sub {
         return "$major.$minor.$maintenance.$development";
     });
 
-    my $rnd = new String::Random;
+    my $rnd = String::Random->new;
     # development version test
     $major       = $rnd->randregex('\d');
     $minor       = $rnd->randregex('\d\d');
index 14b8413..22b7fbb 100755 (executable)
@@ -31,7 +31,7 @@ my @languages = (); # stores the list of active languages
                     # for the syspref mock
 my $return_undef = 0;
 
-my $module_context = new Test::MockModule('C4::Context');
+my $module_context = Test::MockModule->new('C4::Context');
 
 $module_context->mock(
     preference => sub {
index 13702a6..bf7b184 100755 (executable)
@@ -12,7 +12,7 @@ BEGIN {
         use_ok('C4::Output::JSONStream');
 }
 
-my $json = new C4::Output::JSONStream;
+my $json = C4::Output::JSONStream->new;
 is($json->output,'{}',"Making sure JSON output is blank just after its created.");
 $json->param( issues => [ 'yes!', 'please', 'no' ] );
 is($json->output,'{"issues":["yes!","please","no"]}',"Making sure JSON output has added what we told it to.");
index 2808e44..030bca2 100755 (executable)
@@ -23,7 +23,7 @@ my $expected_recent_searches = [
 # Create new session and put its id into CGISESSID cookie
 my $session = C4::Auth::get_session("");
 $session->flush;
-my $input = new CookieSimulator({CGISESSID => $session->id});
+my $input = CookieSimulator->new({CGISESSID => $session->id});
 
 my @recent_searches = C4::Search::History::get_from_session({ cgi => $input });
 is_deeply(\@recent_searches, [], 'at start, there is no recent searches');
index eab5fb6..486e903 100755 (executable)
@@ -45,7 +45,7 @@ $db->mock( _new_schema => sub { return Schema(); } );
 
 use_ok('Koha::SuggestionEngine');
 
-my $module = new Test::MockModule('C4::AuthoritiesMarc');
+my $module = Test::MockModule->new('C4::AuthoritiesMarc');
 $module->mock('SearchAuthorities', sub {
         return [ { 'authid' => '1234',
                     'reported_tag' => undef,
index c91c601..c1074b2 100755 (executable)
@@ -47,7 +47,7 @@ if ( $ENV{KOHA_PROVE_CPUS} ) {
 print "Using $ncpu CPUs...\n"
     if $ENV{DEBUG};
 
-my $pm   = new Parallel::ForkManager($ncpu);
+my $pm   = Parallel::ForkManager->new($ncpu);
 
 foreach my $d (@dirs) {
     $pm->start and next;    # do the fork
index 12e11f5..49ada1e 100755 (executable)
@@ -62,7 +62,7 @@ $dbh->do(q|DELETE FROM borrowers|);
 
 my $branchcode = $library->{branchcode};
 
-my $context = new Test::MockModule('C4::Context');
+my $context = Test::MockModule->new('C4::Context');
 $context->mock( 'userenv', sub {
     return {
         flags  => 1,
@@ -1151,7 +1151,7 @@ subtest "Payment notice tests" => sub {
     )->store();
 
     my $manager = $builder->build_object({ class => "Koha::Patrons" });
-    my $context = new Test::MockModule('C4::Context');
+    my $context = Test::MockModule->new('C4::Context');
     $context->mock( 'userenv', sub {
         return {
             number     => $manager->borrowernumber,
index 6106366..a5937a9 100755 (executable)
@@ -580,7 +580,7 @@ ok($active_count >= scalar GetBudgetsReport(1), "GetBudgetReport doesn't return
 
 # "Flavoured" tests (tests that required a run for each marc flavour)
 # Tests should be added to the run_flavoured_tests sub below
-my $biblio_module = new Test::MockModule('C4::Biblio');
+my $biblio_module = Test::MockModule->new('C4::Biblio');
 $biblio_module->mock(
     'GetMarcSubfieldStructure',
     sub {
index b836aa1..afe4cca 100755 (executable)
@@ -201,7 +201,7 @@ subtest 'checkpw lockout tests' => sub {
     }
 
     # Mock checkauth, build the scenario
-    my $auth = new Test::MockModule( 'C4::Auth' );
+    my $auth = Test::MockModule->new( 'C4::Auth' );
     $auth->mock( 'checkauth', \&MockedCheckauth );
 
     # Make sure 'EnableOpacSearchHistory' is set
@@ -214,7 +214,7 @@ subtest 'checkpw lockout tests' => sub {
     $ENV{"SERVER_PORT"} = 80;
     $ENV{"HTTP_COOKIE"} = 'CGISESSID=nirvana';
 
-    my $query = new CGI;
+    my $query = CGI->new;
     $query->param('language','es-ES');
 
     my ( $template, $loggedinuser, $cookies ) = get_template_and_user(
index 5b87605..b6d9e21 100755 (executable)
@@ -49,7 +49,7 @@ my $query_string = 'ticket=foo&bar=baz';
 $ENV{QUERY_STRING} = $query_string;
 $ENV{SCRIPT_NAME} = '/cgi-bin/koha/opac-user.pl';
 
-my $cgi = new CGI($query_string);
+my $cgi = CGI->new($query_string);
 $cgi->delete('ticket');
 
 # _url_with_get_params tests
index a24d917..e57f612 100755 (executable)
@@ -21,7 +21,7 @@ BEGIN {
 
 # We are now going to be testing the authorities hierarchy code, and
 # therefore need to pretend that we have consistent data in our database
-my $module = new Test::MockModule('C4::AuthoritiesMarc');
+my $module = Test::MockModule->new('C4::AuthoritiesMarc');
 $module->mock('GetHeaderAuthority', sub {
     return {'authtrees' => ''};
 });
index 2a9e821..011c775 100755 (executable)
@@ -10,7 +10,7 @@ use Koha::Database;
 BEGIN {
     use_ok('C4::BackgroundJob');
 }
-my $query = new CGI;
+my $query = CGI->new;
 
 my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index 4d3db24..21d2c07 100755 (executable)
@@ -153,7 +153,7 @@ subtest "Authority creation with default linker" => sub {
 
 
 # Mocking variables
-my $biblio_module = new Test::MockModule('C4::Biblio');
+my $biblio_module = Test::MockModule->new('C4::Biblio');
 $biblio_module->mock(
     'GetMarcSubfieldStructure',
     sub {
@@ -185,7 +185,7 @@ $biblio_module->mock(
       }
 );
 
-my $currency = new Test::MockModule('Koha::Acquisition::Currencies');
+my $currency = Test::MockModule->new('Koha::Acquisition::Currencies');
 $currency->mock(
     'get_active',
     sub {
index 183909a..a51349b 100755 (executable)
@@ -3313,7 +3313,7 @@ subtest 'Incremented fee tests' => sub {
     my $library =
       $builder->build_object( { class => 'Koha::Libraries' } )->store;
 
-    my $module = new Test::MockModule('C4::Context');
+    my $module = Test::MockModule->new('C4::Context');
     $module->mock( 'userenv', sub { { branch => $library->id } } );
 
     my $patron = $builder->build_object(
index bc0d093..2d67ffc 100755 (executable)
@@ -72,7 +72,7 @@ my $borrowernumber2 = Koha::Patron->new({categorycode => $categorycode, branchco
 my $borrower1 = Koha::Patrons->find( $borrowernumber1 )->unblessed;
 my $borrower2 = Koha::Patrons->find( $borrowernumber2 )->unblessed;
 
-my $module = new Test::MockModule('C4::Context');
+my $module = Test::MockModule->new('C4::Context');
 $module->mock('userenv', sub { { branch => $branchcode } });
 
 
index 33d186c..2698578 100755 (executable)
@@ -66,7 +66,7 @@ my $borrowernumber = $builder->build(
 my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed;
 
 # Need to mock userenv for AddIssue
-my $module = new Test::MockModule('C4::Context');
+my $module = Test::MockModule->new('C4::Context');
 $module->mock('userenv', sub { { branch => $branchcode } });
 AddIssue($borrower, '0101');
 AddIssue($borrower, '0203');
index 4a86b5d..7d10b35 100755 (executable)
@@ -1456,7 +1456,7 @@ subtest '_add_backtics' => sub {
 my %preferences;
 
 sub mock_preference {
-    my $context = new Test::MockModule('C4::Context');
+    my $context = Test::MockModule->new('C4::Context');
     my ( $pref, $value ) = @_;
     $preferences{$pref} = $value;
     $context->mock(
index 345499d..3a28df4 100755 (executable)
@@ -120,14 +120,14 @@ sub test05 {
     my ( $incl ) = @_;
     #mock to simulate some authorization and eliminate lots of output
     my $launched = 0;
-    my $mContext = new Test::MockModule('C4::Context');
-    my $mAuth = new Test::MockModule('C4::Auth');
-    my $mOutput = new Test::MockModule('C4::Output');
+    my $mContext = Test::MockModule->new('C4::Context');
+    my $mAuth = Test::MockModule->new('C4::Auth');
+    my $mOutput = Test::MockModule->new('C4::Output');
     $mContext->mock( 'userenv', \&mock_userenv );
     $mAuth->mock( 'checkauth', sub { return ( 1, undef, 1, all_perms() ); } );
     $mOutput->mock('output_html_with_http_headers',  sub { ++$launched; } );
 
-    my $cgi=new CGI;
+    my $cgi=CGI->new;
     my ( $plugins, $min ) = selected_plugins( $incl );
 
     # test building them
index 3b599b6..36b9329 100755 (executable)
@@ -60,7 +60,7 @@ subtest 'AuthenticatePatron test' => sub {
         }
     });
 
-    my $query = new CGI;
+    my $query = CGI->new;
     $query->param( 'username', $borrower->{userid});
     $query->param( 'password', $plain_password);
 
@@ -207,7 +207,7 @@ subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
     );
 
     # Prepare and send web request for IL-SDI server:
-    my $query = new CGI;
+    my $query = CGI->new;
     $query->param( 'service', 'GetPatronInfo' );
     $query->param( 'patron_id', $brwr->{'borrowernumber'} );
     $query->param( 'show_attributes', '1' );
@@ -316,7 +316,7 @@ subtest 'Holds test' => sub {
         }
     );
 
-    my $query = new CGI;
+    my $query = CGI->new;
     $query->param( 'patron_id', $patron->{borrowernumber});
     $query->param( 'bib_id', $item->biblionumber);
 
@@ -339,7 +339,7 @@ subtest 'Holds test' => sub {
 
     my $biblio_with_no_item = $builder->build_sample_biblio;
 
-    $query = new CGI;
+    $query = CGI->new;
     $query->param( 'patron_id', $patron->{borrowernumber});
     $query->param( 'bib_id', $biblio_with_no_item->biblionumber);
 
@@ -363,7 +363,7 @@ subtest 'Holds test' => sub {
         }
     );
 
-    $query = new CGI;
+    $query = CGI->new;
     $query->param( 'patron_id', $patron->{borrowernumber});
     $query->param( 'bib_id', $item2->biblionumber);
     $query->param( 'item_id', $item2->itemnumber);
@@ -395,7 +395,7 @@ subtest 'Holds test' => sub {
         }
     );
 
-    $query = new CGI;
+    $query = CGI->new;
     $query->param( 'patron_id', $patron->{borrowernumber});
     $query->param( 'bib_id', $item3->biblionumber);
     $query->param( 'item_id', $item4->itemnumber);
@@ -459,7 +459,7 @@ subtest 'Holds test for branch transfer limits' => sub {
         itemtype => $item->effective_itemtype,
     })->store();
 
-    my $query = new CGI;
+    my $query = CGI->new;
     $query->param( 'pickup_location', $pickup_branch->{branchcode} );
     $query->param( 'patron_id', $patron->{borrowernumber});
     $query->param( 'bib_id', $item->biblionumber);
@@ -519,7 +519,7 @@ subtest 'Holds test with start_date and end_date' => sub {
         }
     );
 
-    my $query = new CGI;
+    my $query = CGI->new;
     $query->param( 'pickup_location', $pickup_library->branchcode );
     $query->param( 'patron_id', $patron->borrowernumber);
     $query->param( 'bib_id', $item->biblionumber);
@@ -569,7 +569,7 @@ subtest 'GetRecords' => sub {
 
     ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode});
 
-    my $cgi = new CGI;
+    my $cgi = CGI->new;
     $cgi->param(service => 'GetRecords');
     $cgi->param(id => $item->biblionumber);
 
@@ -592,7 +592,7 @@ subtest 'RenewHold' => sub {
 
     $schema->storage->txn_begin;
 
-    my $cgi    = new CGI;
+    my $cgi    = CGI->new;
     my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
     my $item   = $builder->build_sample_item;
     $cgi->param( patron_id => $patron->borrowernumber );
@@ -640,7 +640,7 @@ subtest 'GetPatronInfo paginated loans' => sub {
             branchcode => $library->branchcode,
         },
     });
-    my $module = new Test::MockModule('C4::Context');
+    my $module = Test::MockModule->new('C4::Context');
     $module->mock('userenv', sub { { branch => $library->branchcode } });
     my $date_due = DateTime->now->add(weeks => 2);
     my $issue1 = C4::Circulation::AddIssue($patron->unblessed, $item1->barcode, $date_due);
@@ -650,7 +650,7 @@ subtest 'GetPatronInfo paginated loans' => sub {
     my $issue3 = C4::Circulation::AddIssue($patron->unblessed, $item3->barcode, $date_due);
     my $date_due3 = Koha::DateUtils::dt_from_string( $issue3->date_due );
 
-    my $cgi = new CGI;
+    my $cgi = CGI->new;
 
     $cgi->param( 'service', 'GetPatronInfo' );
     $cgi->param( 'patron_id', $patron->borrowernumber );
index efd3bb9..53ac9b8 100755 (executable)
@@ -541,9 +541,9 @@ subtest 'SearchItems test' => sub {
     $cache->clear_from_cache("default_value_for_mod_marc-");
     $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode");
 
-    my $item3_record = new MARC::Record;
+    my $item3_record = MARC::Record->new;
     $item3_record->append_fields(
-        new MARC::Field(
+        MARC::Field->new(
             $itemfield, '', '',
             'z' => 'foobar',
             'y' => $itemtype->{itemtype}
@@ -966,7 +966,7 @@ subtest 'ModItemFromMarc' => sub {
     my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' });
     my $biblio = $builder->build_sample_biblio;
     my ( $lost_tag, $lost_sf ) = GetMarcFromKohaField( 'items.itemlost' );
-    my $item_record = new MARC::Record;
+    my $item_record = MARC::Record->new;
     $item_record->append_fields(
         MARC::Field->new(
             $itemfield, '', '',
@@ -985,7 +985,7 @@ subtest 'ModItemFromMarc' => sub {
 
     $item->new_status("this is something")->store;
 
-    my $updated_item_record = new MARC::Record;
+    my $updated_item_record = MARC::Record->new;
     $updated_item_record->append_fields(
         MARC::Field->new(
             $itemfield, '', '',
index dd54fff..90ffc35 100755 (executable)
@@ -972,7 +972,7 @@ subtest 'pay() renews items when appropriate' => sub {
     # Enable renewing upon fine payment
     t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 );
     my $called = 0;
-    my $module = new Test::MockModule('C4::Circulation');
+    my $module = Test::MockModule->new('C4::Circulation');
     $module->mock('AddRenewal', sub { $called = 1; });
     $module->mock('CanBookBeRenewed', sub { return 1; });
     $account->pay(
index fe03763..1831346 100755 (executable)
@@ -324,7 +324,7 @@ subtest 'apply() tests' => sub {
     # Enable renewing upon fine payment
     t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 );
     my $called = 0;
-    my $module = new Test::MockModule('C4::Circulation');
+    my $module = Test::MockModule->new('C4::Circulation');
     $module->mock('AddRenewal', sub { $called = 1; });
     $module->mock('CanBookBeRenewed', sub { return 1; });
     my $credit_renew = $account->add_credit({ amount => 100, user_id => $patron->id, interface => 'commandline' });
@@ -452,7 +452,7 @@ subtest 'Renewal related tests' => sub {
         }
     );
     my $called = 0;
-    my $module = new Test::MockModule('C4::Circulation');
+    my $module = Test::MockModule->new('C4::Circulation');
     $module->mock('AddRenewal', sub { $called = 1; });
     $module->mock('CanBookBeRenewed', sub { return 1; });
     $line->renew_item;
index e1da753..06de4d2 100755 (executable)
@@ -52,7 +52,7 @@ my $new_message_1  = Koha::Patron::Message->new(
 )->store;
 is( get_nb_of_logactions(), $nb_of_logaction, 'With BorrowersLog off, no new log should have been added' );
 
-my $context = new Test::MockModule('C4::Context');
+my $context = Test::MockModule->new('C4::Context');
 $context->mock( 'userenv', sub {
     return {
         number => $patron_2->{borrowernumber},
index 0f00008..60c9a73 100755 (executable)
@@ -342,7 +342,7 @@ subtest 'is_going_to_expire' => sub {
     { # Testing invalid is going to expiry date
         t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 30);
         # mock_config does not work here, because of tz vs timezone subroutines
-        my $context = new Test::MockModule('C4::Context');
+        my $context = Test::MockModule->new('C4::Context');
         $context->mock( 'tz', sub {
             'America/Sao_Paulo';
         });
index 33dc662..dfcad7a 100755 (executable)
@@ -51,7 +51,7 @@ subtest 'test_search' => sub {
         MARC::Field->new('999', '', '', c => '1234567'),
     );
 
-    my $yaml = new Test::MockModule('YAML');
+    my $yaml = Test::MockModule->new('YAML');
     $yaml->mock('LoadFile', sub {
         return {
             biblios => {
@@ -64,14 +64,14 @@ subtest 'test_search' => sub {
         };
     });
 
-    my $builder = new Test::MockModule('Koha::SearchEngine::Elasticsearch::QueryBuilder');
+    my $builder = Test::MockModule->new('Koha::SearchEngine::Elasticsearch::QueryBuilder');
     $builder->mock('build_query_compat', sub {
         my ( $self, $operators, $operands ) = @_;
 
         return (undef, $operands->[0]);
     });
 
-    my $search = new Test::MockModule('Koha::SearchEngine::Elasticsearch::Search');
+    my $search = Test::MockModule->new('Koha::SearchEngine::Elasticsearch::Search');
     $search->mock('simple_search_compat', sub {
         my ( $self, $query ) = @_;
 
@@ -93,7 +93,7 @@ subtest 'test_search' => sub {
     sleep(10); # Just a try to see if it fixes Jenkins
 
     # Z39.50 protocol tests
-    my $o = new ZOOM::Options();
+    my $o = ZOOM::Options->new();
     $o->option(preferredRecordSyntax => 'xml');
     $o->option(elementSetName => 'marcxml');
     $o->option(databaseName => 'biblios');
index 3de0d2e..6088169 100755 (executable)
@@ -46,15 +46,15 @@ subtest 'test_search' => sub {
         MARC::Field->new('999', '', '', c => '1234567'),
     );
 
-    my $context = new Test::MockModule('C4::Context');
+    my $context = Test::MockModule->new('C4::Context');
     $context->mock('Zconn', sub {
-        my $Zconn = new Test::MockObject();
+        my $Zconn = Test::MockObject->new();
         $Zconn->mock('connect', sub {});
         $Zconn->mock('err_code', sub {
             return 0;
         });
         $Zconn->mock('search_pqf', sub {
-            my $results = new Test::MockObject();
+            my $results = Test::MockObject->new();
             $results->mock('size', sub {
                 return 2;
             });
@@ -67,7 +67,7 @@ subtest 'test_search' => sub {
                 } elsif ($index == 1) {
                     $record = $marc_record_2;
                 }
-                my $Zrecord = new Test::MockObject();
+                my $Zrecord = Test::MockObject->new();
                 $Zrecord->mock('raw', sub {
                     return $record->as_xml();
                 });
@@ -90,7 +90,7 @@ subtest 'test_search' => sub {
     }
     sleep(10); # Just a try to see if it fixes Jenkins
 
-    my $o = new ZOOM::Options();
+    my $o = ZOOM::Options->new();
     $o->option(preferredRecordSyntax => 'xml');
     $o->option(elementSetName => 'marcxml');
     $o->option(databaseName => 'biblios');
index 679cd45..45c3682 100755 (executable)
@@ -69,7 +69,7 @@ my $borrowernumber2 =
 my $borrower1 = Koha::Patrons->find( $borrowernumber1 )->unblessed;
 my $borrower2 = Koha::Patrons->find( $borrowernumber2 )->unblessed;
 
-my $module = new Test::MockModule('C4::Context');
+my $module = Test::MockModule->new('C4::Context');
 $module->mock( 'userenv', sub { { branch => $branchcode } } );
 
 my $issues = C4::Members::GetAllIssues();
index 0ec870d..9586769 100755 (executable)
@@ -120,7 +120,7 @@ my $borrowernumber =
   Koha::Patron->new({ categorycode => $categorycode, branchcode => $branchcode })->store->borrowernumber;
 my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed;
 
-my $module = new Test::MockModule('C4::Context');
+my $module = Test::MockModule->new('C4::Context');
 $module->mock( 'userenv', sub { { branch => $branchcode } } );
 
 my $today = dt_from_string;
index 613e5ea..22fcdb3 100755 (executable)
@@ -21,7 +21,7 @@ t::lib::Mocks::mock_preference( "BibtexExportAdditionalFields", q{} );
 my @marcarray=marc2marc;
 is ($marcarray[0],"Feature not yet implemented\n","error works");
 
-my $marc=new MARC::Record;
+my $marc=MARC::Record->new;
 my $marcxml=marc2marcxml($marc);
 my $testxml=qq(<?xml version="1.0" encoding="UTF-8"?>
 <record
index 664a0fa..9d7b4ef 100755 (executable)
@@ -31,7 +31,7 @@ BEGIN {
         use_ok('Koha::RecordProcessor');
 }
 
-my $module = new Test::MockModule('MARC::Record');
+my $module = Test::MockModule->new('MARC::Record');
 $module->mock('new_from_xml', sub {
     my $record = MARC::Record->new;
 
@@ -82,7 +82,7 @@ subtest "EmbedSeeFromHeadings should skip holdings fields" => sub {
     );
 
 
-    my $koha_authority = new Test::MockModule('Koha::MetadataRecord::Authority');
+    my $koha_authority = Test::MockModule->new('Koha::MetadataRecord::Authority');
     $koha_authority->mock( 'get_from_authid', sub {
 
         my $auth_record = MARC::Record->new;
index cd9bdfa..bb9b4da 100755 (executable)
@@ -37,7 +37,7 @@ my $builder = t::lib::TestBuilder->new();
 my $library = $builder->build({
     source => 'Branch',
 });
-my $mContext = new Test::MockModule('C4::Context');
+my $mContext = Test::MockModule->new('C4::Context');
 $mContext->mock( 'userenv', sub {
     return { branch => $library->{branchcode} };
 });
index c8cc3d7..6a520bc 100755 (executable)
@@ -111,7 +111,7 @@ my @htdocs = split /\//, $htdocs;
 $htdocs[-2] = 'koha-tmpl';
 $htdocs[-1] = 'opac-tmpl';
 $htdocs = join '/', @htdocs;
-our $contextmodule = new Test::MockModule('C4::Context');
+our $contextmodule = Test::MockModule->new('C4::Context');
 $contextmodule->mock('preference', sub {
     my ($self, $pref) = @_;
     if ($pref eq 'marcflavour') {
@@ -201,7 +201,7 @@ $contextmodule->mock('preference', sub {
     }
 });
 
-our $bibliomodule = new Test::MockModule('C4::Biblio');
+our $bibliomodule = Test::MockModule->new('C4::Biblio');
 
 sub mock_GetMarcSubfieldStructure {
     my $marc_type = shift;
@@ -258,7 +258,7 @@ sub run_marc21_search_tests {
     Koha::Caches->get_instance('config')->flush_all;
 
     mock_GetMarcSubfieldStructure('marc21');
-    my $context = new C4::Context("$datadir/etc/koha-conf.xml");
+    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
     $context->set_context();
 
     use_ok('C4::Search');
@@ -275,7 +275,7 @@ sub run_marc21_search_tests {
     is(scalar(grep(/^arl$/, @$indexes)), 1, "Accelerated reading level index supported");
     is(scalar(grep(/^arp$/, @$indexes)), 1, "Accelerated reading point index supported");
 
-    my $bibliomodule = new Test::MockModule('C4::Biblio');
+    my $bibliomodule = Test::MockModule->new('C4::Biblio');
 
     my %branches = (
         'CPL' => { 'branchaddress1' => 'Jefferson Summit', 'branchcode' => 'CPL', 'branchname' => 'Centerville', },
@@ -700,7 +700,7 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
     ## Regression test for Bug 10741
 
     # make one of the test items appear to be in transit
-    my $circ_module = new Test::MockModule('C4::Circulation');
+    my $circ_module = Test::MockModule->new('C4::Circulation');
     $circ_module->mock('GetTransfers', sub {
         my $itemnumber = shift // -1;
         if ($itemnumber == 11) {
@@ -832,7 +832,7 @@ sub run_unimarc_search_tests {
     Koha::Caches->get_instance('config')->flush_all;
 
     mock_GetMarcSubfieldStructure('unimarc');
-    my $context = new C4::Context("$datadir/etc/koha-conf.xml");
+    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
     $context->set_context();
 
     use_ok('C4::Search');
index c1eaa38..db3a103 100755 (executable)
@@ -362,7 +362,7 @@ sub delete_all {
 subtest 'LoadSearchHistoryToTheFirstLoggedUser working' => sub {
 plan tests =>2;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $schema = Koha::Database->schema;
 my $builder = t::lib::TestBuilder->new;
@@ -388,10 +388,10 @@ sub myMockedget_from_session {
 
 }
 
-my $getfrom = new Test::MockModule( 'C4::Search::History' );
+my $getfrom = Test::MockModule->new( 'C4::Search::History' );
 $getfrom->mock( 'get_from_session', \&myMockedget_from_session );
 
-my $cgi = new Test::MockModule( 'CGI');
+my $cgi = Test::MockModule->new( 'CGI');
 $cgi->mock('cookie', sub {
    my ($self, $key) = @_;
   if (!ref($key) && $key eq 'CGISESSID'){
@@ -425,7 +425,7 @@ sub MockedCheckauth {
 }
 
 # Mock checkauth
-my $auth = new Test::MockModule( 'C4::Auth' );
+my $auth = Test::MockModule->new( 'C4::Auth' );
 $auth->mock( 'checkauth', \&MockedCheckauth );
 
 $query->param('koha_login_context', 'opac');
index 53c697e..ea9e5a9 100755 (executable)
@@ -150,7 +150,7 @@ subtest 'Values should not be erased on editing' => sub {
     my $itemtype = $builder->build( { source => 'Itemtype' } )->{itemtype};
     my $itemcallnumber = 'XXXmy itemcallnumberXXX';
 
-    my $item_record    = new MARC::Record;
+    my $item_record    = MARC::Record->new;
 
     $item_record->append_fields(
         MARC::Field->new( '080', '', '', "a" => "default" ),
index bac1b41..65308fc 100755 (executable)
@@ -10,7 +10,7 @@ use Test::More;
 use Test::MockModule;
 use Test::Warn;
 
-my $contextModule = new Test::MockModule('C4::Context');
+my $contextModule = Test::MockModule->new('C4::Context');
 $contextModule->mock('preference', sub {
     return '';
 });
@@ -40,12 +40,12 @@ sub get_where {
 
 my $langModule;
 if (! defined $ENV{KOHA_CONF}) {
-    warning_like { $langModule = new Test::MockModule('C4::Languages'); }
+    warning_like { $langModule = Test::MockModule->new('C4::Languages'); }
         qr /unable to locate Koha configuration file koha-conf.xml/,
         'Expected warning for unset $KOHA_CONF';
 }
 else {
-    $langModule = new Test::MockModule('C4::Languages');
+    $langModule = Test::MockModule->new('C4::Languages');
 }
 $langModule->mock('regex_lang_subtags', sub {
     return {
@@ -89,12 +89,12 @@ $langModule->mock('getTranslatedLanguages', sub {
 });
 my $tmplModule;
 if (! defined $ENV{KOHA_CONF}) {
-    warning_like { $tmplModule = new Test::MockModule('C4::Templates'); }
+    warning_like { $tmplModule = Test::MockModule->new('C4::Templates'); }
         qr /unable to locate Koha configuration file koha-conf.xml/,
         'Expected warning for unset $KOHA_CONF';
 }
 else {
-    $tmplModule = new Test::MockModule('C4::Templates');
+    $tmplModule = Test::MockModule->new('C4::Templates');
 }
 $tmplModule->mock('_get_template_file', sub {
     my ($tmplbase, $interface, $query) = @_;
index eda462d..9712109 100755 (executable)
@@ -14,7 +14,7 @@ my $dbh = C4::Context->dbh;
 
 $dbh->do(q|DELETE FROM columns_settings|);
 
-my $module = new Test::MockModule('C4::Utils::DataTables::TablesSettings');
+my $module = Test::MockModule->new('C4::Utils::DataTables::TablesSettings');
 $module->mock(
     'get_yaml',
     sub {
index 53449d8..e40c795 100755 (executable)
@@ -13,7 +13,7 @@ BEGIN {
         use_ok('Koha::Template::Plugin::KohaDates');
 }
 
-my $module_context = new Test::MockModule('C4::Context');
+my $module_context = Test::MockModule->new('C4::Context');
 
 my $date = "1973-05-21";
 my $context = C4::Context->new();
index 4cc939d..0689273 100755 (executable)
@@ -23,7 +23,7 @@ my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
 
 my $engine = C4::Context->preference("SearchEngine") // 'Zebra';
-my $search_module = new Test::MockModule("Koha::SearchEngine::${engine}::Search");
+my $search_module = Test::MockModule->new("Koha::SearchEngine::${engine}::Search");
 
 $search_module->mock('simple_search_compat', \&Mock_simple_search_compat );
 
index 5f7f4ed..ee47e1e 100755 (executable)
@@ -59,7 +59,7 @@ my $unauth_userid = $patron->userid;
 my $patron_id = $patron->borrowernumber;
 
 my $branchcode = $builder->build({ source => 'Branch' })->{ branchcode };
-my $module = new Test::MockModule('C4::Context');
+my $module = Test::MockModule->new('C4::Context');
 $module->mock('userenv', sub { { branch => $branchcode } });
 
 $t->get_ok( "//$userid:$password@/api/v1/checkouts?patron_id=$patron_id" )
index df2d587..35aa8f9 100644 (file)
@@ -7,7 +7,7 @@ use Test::MockModule;
 
 my %configs;
 sub mock_config {
-    my $context = new Test::MockModule('C4::Context');
+    my $context = Test::MockModule->new('C4::Context');
     my ( $conf, $value ) = @_;
     $configs{$conf} = $value;
     $context->mock('config', sub {
@@ -27,7 +27,7 @@ sub mock_preference {
 
     $preferences{lc($pref)} = $value;
 
-    my $context = new Test::MockModule('C4::Context');
+    my $context = Test::MockModule->new('C4::Context');
     $context->mock('preference', sub {
         my ( $self, $pref ) = @_;
         $pref = lc($pref);
index 73a0ae4..5ead581 100755 (executable)
@@ -32,7 +32,7 @@ use File::stat qw(stat);
 use Digest::MD5 qw(md5_hex);
 use Encode;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $file_id = $input->param("id");
 my $access_dirs = C4::Context->config('access_dirs');
 
index 2aeda40..72175cf 100755 (executable)
@@ -5,7 +5,7 @@ use CGI qw ( -utf8 );
 use C4::Auth;
 use C4::Items qw( ModDateLastSeen );
 
-my $input = new CGI;
+my $input = CGI->new;
 
 # Authentication
 my ($status, $cookie, $sessionId) = C4::Auth::check_api_auth($input, { tools => 'inventory' });
index cd6a512..ae9bcec 100755 (executable)
@@ -43,7 +43,7 @@ use C4::Koha;
 use Koha::Items;
 use Koha::Biblioitems;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # open template
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index dc170a6..dca2e41 100755 (executable)
@@ -46,7 +46,7 @@ use Koha::ItemTypes;
 use Koha::Patrons;
 use Koha::SearchEngine::Indexer;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $dbh = C4::Context->dbh;
 my $error        = $input->param('error');
 my @itemnumbers  = $input->multi_param('itemnumber');
index d07adf1..ea87d8b 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::Authorities;
 use Koha::Biblios;
 use Koha::Items;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') // q|form|;
 my $recordtype = $input->param('recordtype') // 'biblio';
 
index cae338c..77c8023 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output qw( output_html_with_http_headers );
 use Koha::Checkouts;
 use Koha::DateUtils qw( dt_from_string output_pref );
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') // q|form|;
 my $preview_results = $input->param('preview_results');
 
index d65883a..d118120 100755 (executable)
@@ -37,7 +37,7 @@ use Koha::BackgroundJob::BatchUpdateAuthority;
 use Koha::MetadataRecord::Authority;
 use Koha::Virtualshelves;
 
-my $input = new CGI;
+my $input = CGI->new;
 our $dbh = C4::Context->dbh;
 my $op = $input->param('op') // q|form|;
 my $recordtype = $input->param('recordtype') // 'biblio';
index 8bfb4ab..4ddb0f5 100755 (executable)
@@ -39,7 +39,7 @@ use C4::Charset;
 use C4::Auth qw/check_cookie_auth/;
 use C4::ImportBatch;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my @sort_columns =
   qw/import_record_id title status overlay_status overlay_status/;
index 354c315..c323eeb 100755 (executable)
@@ -45,7 +45,7 @@ use Date::Calc qw/Today Add_Delta_YM/;
 use Koha::Patrons;
 use Koha::List::Patron;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 # Fetch the paramater list as a hash in scalar context:
 #  * returns paramater list as tied hash ref
index 6e35451..e11353a 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 
 use C4::Calendar;
 
-my $input               = new CGI;
+my $input               = CGI->new;
 my $dbh                 = C4::Context->dbh();
 
 checkauth($input, 0, {tools=> 'edit_calendar'}, 'intranet');
index 27ee6a8..e6a7bda 100755 (executable)
@@ -44,7 +44,7 @@ use CGI qw ( -utf8 );
 use C4::Koha;
 use Koha::CsvProfiles;
 
-my $input            = new CGI;
+my $input            = CGI->new;
 my $export_format_id = $input->param('export_format_id');
 my $op               = $input->param('op') || 'list';
 my @messages;
index 7095157..6894074 100755 (executable)
@@ -11,7 +11,7 @@ use DateTime;
 use C4::Calendar;
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $dbh = C4::Context->dbh();
 
 checkauth($input, 0, {tools=> 'edit_calendar'}, 'intranet');
index 5b252be..6d677ab 100755 (executable)
@@ -32,7 +32,7 @@ use Koha::Exporter::Record;
 use Koha::ItemTypes;
 use Koha::Libraries;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my $dont_export_items = $query->param("dont_export_item") || 0;
 my $record_type       = $query->param("record_type");
index 2a9f02d..252882d 100755 (executable)
@@ -26,7 +26,7 @@ use C4::Output;
 use C4::Calendar;
 use Koha::DateUtils;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $dbh = C4::Context->dbh();
 # Get the template to use
index 821cd4b..2b62aaf 100755 (executable)
@@ -33,7 +33,7 @@ use C4::Languages qw(getTranslatedLanguages);
 use Date::Calc qw/Date_to_Days Today/;
 use Koha::DateUtils;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $id             = $cgi->param('id');
 my $title          = $cgi->param('title');
index 7af71dd..d6740a8 100755 (executable)
@@ -57,7 +57,7 @@ sub protected_letters {
     return { map { $_->[0] => 1 } @{$codes} };
 }
 
-our $input       = new CGI;
+our $input       = CGI->new;
 my $searchfield = $input->param('searchfield');
 my $script_name = '/cgi-bin/koha/tools/letter.pl';
 our $branchcode  = $input->param('branchcode');
index 04c62e2..32664c6 100755 (executable)
@@ -39,7 +39,7 @@ use Koha::BiblioFrameworks;
 
 my $script_name = "/cgi-bin/koha/tools/manage-marc-import.pl";
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') || '';
 my $completedJobID = $input->param('completedJobID');
 our $runinbackground = $input->param('runinbackground');
index aa31611..27ace82 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Koha;
 use C4::Output;
 use C4::MarcModificationTemplates;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my $op = $cgi->param('op') || q{};
 my $template_id = $cgi->param('template_id');
index eed17ea..5a0193f 100755 (executable)
@@ -39,7 +39,7 @@ use Koha::Patron::Categories;
 use Koha::Patron::Debarments;
 use Koha::Patrons;
 
-my $input = new CGI;
+my $input = CGI->new;
 my $op = $input->param('op') || 'show_form';
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "tools/modborrowers.tt",
index 7644006..c402dfd 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Calendar;
 use DateTime;
 use Koha::DateUtils;
 
-my $input               = new CGI;
+my $input               = CGI->new;
 my $dbh                 = C4::Context->dbh();
 
 checkauth($input, 0, {tools=> 'edit_calendar'}, 'intranet');
index 2ec8291..293c51c 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Libraries;
 
 use Koha::Patron::Categories;
 
-our $input = new CGI;
+our $input = CGI->new;
 my $dbh = C4::Context->dbh;
 
 my @patron_categories = Koha::Patron::Categories->search( { overduenoticerequired => { '>' => 0 } } );
index 334ee3e..31dec51 100755 (executable)
@@ -35,7 +35,7 @@ use Koha::Patrons;
 use Koha::Patron::Images;
 use Koha::Token;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 unless (C4::Context->preference('patronimages')) {
     # redirect to intranet home if patronimages is not enabled
index c9a1afd..0b07511 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Output;
 use C4::Auth;
 use Koha::ProblemReports;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
index a065da0..8ca4583 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Koha;
 use C4::Context;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 6ac4371..a10e574 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Koha;
 use C4::Context;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 7a429ab..c988e7c 100755 (executable)
@@ -29,7 +29,7 @@ use C4::Koha;
 use C4::Context;
 use C4::Output;
 
-my $cgi = new CGI;
+my $cgi = CGI->new;
 my $dbh = C4::Context->dbh;
 
 my ( $status, $cookie, $sessionID ) = C4::Auth::check_api_auth( $cgi, { tools => 'edit_quotes' } );
index 05778e2..295a04b 100755 (executable)
@@ -32,7 +32,7 @@ BEGIN {
     $debug = $ENV{DEBUG} || 0;
 }
 
-my $input = new CGI;
+my $input = CGI->new;
 my $base;
 
 if ( C4::Context->config('supportdir') ) {
index 48f622a..c39d2ad 100755 (executable)
@@ -35,7 +35,7 @@ use C4::ImportBatch;
 use Koha::Biblios;
 
 # Input params
-my $input        = new CGI;
+my $input        = CGI->new;
 my $recordid = $input->param('id');
 my $importid     = $input->param('importid');
 my $batchid      = $input->param('batchid');
index 9684fab..0ea4363 100755 (executable)
@@ -43,7 +43,7 @@ use C4::BackgroundJob;
 use C4::MarcModificationTemplates;
 use Koha::Plugins;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $fileID                     = $input->param('uploadedfileid');
 my $runinbackground            = $input->param('runinbackground');
index 8317617..18891fa 100755 (executable)
@@ -38,7 +38,7 @@ use Koha::StockRotationStages;
 use Koha::Item;
 use Koha::Util::StockRotation qw(:ALL);
 
-my $input = new CGI;
+my $input = CGI->new;
 
 unless (C4::Context->preference('StockRotation')) {
     # redirect to Intranet home if self-check is not enabled
index 375cc09..69fc092 100755 (executable)
@@ -23,7 +23,7 @@ use C4::Output;
 use C4::Tags qw/get_count_by_tag_status/;
 use Koha::Reviews;
 
-my $query = new CGI;
+my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "tools/tools-home.tt",
index 6c19de1..82b0bb5 100755 (executable)
@@ -53,7 +53,7 @@ use C4::Log;
 
 my $debug = 1;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 my $fileID = $input->param('uploadedfileid');
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index bf7d1d6..dec1259 100755 (executable)
@@ -45,7 +45,7 @@ plugin that shows stats
 
 =cut
 
-my $input = new CGI;
+my $input = CGI->new;
 
 $debug or $debug = $cgi_debug;
 my $do_it    = $input->param('do_it');
index 8d43ab9..68e7da5 100755 (executable)
@@ -66,7 +66,7 @@ use C4::Auth;
 use Koha::Biblios;
 use Koha::Virtualshelves;
 
-my $query           = new CGI;
+my $query           = CGI->new;
 my $shelfnumber     = $query->param('shelfnumber');
 my $newvirtualshelf = $query->param('newvirtualshelf');
 my $newshelf        = $query->param('newshelf');
index 6d788d9..c6cb31f 100755 (executable)
@@ -33,7 +33,7 @@ use Koha::CsvProfiles;
 use Koha::Virtualshelves;
 
 use utf8;
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
     {
index e219e9a..d233eb1 100755 (executable)
@@ -37,7 +37,7 @@ use Koha::Virtualshelves;
 
 use constant ANYONE => 2;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {   template_name   => "virtualshelves/shelves.tt",
index 9d19537..3724d03 100755 (executable)
@@ -74,7 +74,7 @@ if ( $ENV{KOHA_PROVE_CPUS} ) {
     $ncpu = Sys::CPU::cpu_count();
 }
 
-my $pm   = new Parallel::ForkManager($ncpu);
+my $pm   = Parallel::ForkManager->new($ncpu);
 
 # Tests
 foreach my $theme ( @themes ) {