@@ -, +, @@ --- .perlcriticrc | 2 +- C4/Auth.pm | 2 +- C4/AuthoritiesMarc.pm | 2 +- C4/Breeding.pm | 6 ++--- C4/Context.pm | 2 +- C4/InstallAuth.pm | 4 ++-- C4/Languages.pm | 2 +- C4/Record.pm | 2 +- C4/SIP/Sip/Configuration.pm | 2 +- C4/SIP/t/SIPtest.pm | 2 +- C4/SIP/xmlparse.pl | 2 +- C4/Search.pm | 12 +++++----- C4/Service.pm | 8 +++---- Koha/Illrequest/Logger.pm | 2 +- Koha/OAI/Server/DeletedRecord.pm | 2 +- Koha/OAI/Server/GetRecord.pm | 2 +- Koha/OAI/Server/ListBase.pm | 6 ++--- Koha/OAI/Server/ListIdentifiers.pm | 2 +- Koha/OAI/Server/ListRecords.pm | 2 +- Koha/OAI/Server/ListSets.pm | 2 +- Koha/OAI/Server/Record.pm | 2 +- Koha/OAI/Server/Repository.pm | 2 +- Koha/Patron/Discharge.pm | 2 +- Koha/SuggestionEngine/Plugin/ExplodedTerms.pm | 2 +- Koha/pdfformat/layout2pages.pm | 2 +- Koha/pdfformat/layout2pagesde.pm | 2 +- Koha/pdfformat/layout3pages.pm | 4 ++-- Koha/pdfformat/layout3pagesfr.pm | 4 ++-- about.pl | 4 ++-- acqui/add_user_search.pl | 2 +- acqui/addorder.pl | 2 +- acqui/addorderiso2709.pl | 2 +- acqui/ajax-getauthvaluedropbox.pl | 2 +- acqui/basket.pl | 2 +- acqui/basketgroup.pl | 2 +- acqui/basketheader.pl | 2 +- acqui/cancelorder.pl | 2 +- acqui/check_budget_total.pl | 2 +- acqui/check_uniqueness.pl | 2 +- acqui/duplicate_orders.pl | 2 +- acqui/finishreceive.pl | 2 +- acqui/histsearch.pl | 2 +- acqui/invoice-files.pl | 2 +- acqui/invoice.pl | 2 +- acqui/lateorders-export.pl | 2 +- acqui/lateorders.pl | 2 +- acqui/modordernotes.pl | 2 +- acqui/neworderempty.pl | 2 +- acqui/newordersubscription.pl | 2 +- acqui/newordersuggestion.pl | 2 +- acqui/ordered.pl | 2 +- acqui/orderreceive.pl | 2 +- acqui/parcel.pl | 2 +- acqui/showorder.pl | 2 +- acqui/spent.pl | 2 +- acqui/transferorder.pl | 2 +- acqui/uncertainprice.pl | 2 +- acqui/updatesupplier.pl | 2 +- acqui/z3950_search.pl | 2 +- admin/add_user_search.pl | 2 +- admin/additional-fields.pl | 2 +- admin/admin-home.pl | 2 +- admin/adveditorshortcuts.pl | 2 +- admin/aqbudgetperiods.pl | 2 +- admin/aqbudgets.pl | 2 +- admin/aqcontract.pl | 2 +- admin/aqplan.pl | 2 +- admin/audio_alerts.pl | 2 +- admin/auth_subfields_structure.pl | 2 +- admin/auth_tag_structure.pl | 2 +- admin/authorised_values.pl | 2 +- admin/authtypes.pl | 2 +- admin/biblio_framework.pl | 2 +- admin/branch_transfer_limits.pl | 2 +- admin/categories.pl | 2 +- admin/check_budget_parent.pl | 2 +- admin/check_parent_total.pl | 2 +- admin/checkmarc.pl | 2 +- admin/cities.pl | 2 +- admin/classsources.pl | 2 +- admin/clone-rules.pl | 2 +- admin/columns_settings.pl | 2 +- admin/credit_types.pl | 2 +- admin/debit_types.pl | 2 +- admin/desks.pl | 2 +- admin/didyoumean.pl | 2 +- admin/import_export_framework.pl | 2 +- admin/item_circulation_alerts.pl | 2 +- admin/items_search_field.pl | 2 +- admin/items_search_fields.pl | 2 +- admin/itemtypes.pl | 2 +- admin/koha2marclinks.pl | 2 +- admin/library_groups.pl | 2 +- admin/localization.pl | 2 +- admin/marc_subfields_structure.pl | 2 +- admin/marctagstructure.pl | 2 +- admin/matching-rules.pl | 2 +- admin/oai_set_mappings.pl | 2 +- admin/oai_sets.pl | 2 +- admin/patron-attr-types.pl | 2 +- admin/preferences.pl | 4 ++-- admin/searchengine/elasticsearch/mappings.pl | 2 +- admin/share_content.pl | 2 +- admin/sms_providers.pl | 2 +- admin/sru_modmapping.pl | 2 +- admin/systempreferences.pl | 2 +- admin/transport-cost-matrix.pl | 2 +- admin/usage_statistics.pl | 2 +- admin/z3950servers.pl | 2 +- authorities/auth_finder.pl | 2 +- authorities/authorities-home.pl | 2 +- authorities/authorities.pl | 2 +- authorities/blinddetail-biblio-search.pl | 2 +- authorities/detail-biblio-search.pl | 2 +- authorities/detail.pl | 2 +- authorities/export.pl | 2 +- authorities/merge.pl | 2 +- authorities/ysearch.pl | 2 +- basket/basket.pl | 2 +- basket/downloadcart.pl | 2 +- catalogue/ISBDdetail.pl | 2 +- catalogue/MARCdetail.pl | 2 +- catalogue/export.pl | 2 +- catalogue/getitem-ajax.pl | 2 +- catalogue/image.pl | 2 +- catalogue/imageviewer.pl | 2 +- catalogue/issuehistory.pl | 2 +- catalogue/item-export.pl | 2 +- catalogue/itemsearch.pl | 2 +- catalogue/labeledMARCdetail.pl | 2 +- catalogue/moredetail.pl | 2 +- catalogue/search-history.pl | 2 +- catalogue/search.pl | 2 +- catalogue/showmarc.pl | 2 +- catalogue/stockrotation.pl | 2 +- catalogue/updateitem.pl | 2 +- cataloguing/addbiblio.pl | 2 +- cataloguing/addbooks.pl | 2 +- cataloguing/additem.pl | 4 ++-- cataloguing/merge.pl | 4 ++-- cataloguing/plugin_launcher.pl | 2 +- .../value_builder/unimarc_field_210c.pl | 2 +- .../value_builder/unimarc_field_4XX.pl | 2 +- cataloguing/ysearch.pl | 2 +- cataloguing/z3950_auth_search.pl | 2 +- cataloguing/z3950_search.pl | 2 +- changelanguage.pl | 2 +- circ/add_message.pl | 2 +- circ/article-request-slip.pl | 2 +- circ/article-requests.pl | 2 +- circ/bookcount.pl | 2 +- circ/branchoverdues.pl | 2 +- circ/branchtransfers.pl | 2 +- circ/checkout-notes.pl | 2 +- circ/circulation-home.pl | 2 +- circ/circulation.pl | 2 +- circ/del_message.pl | 2 +- circ/hold-transfer-slip.pl | 2 +- circ/offline-mf.pl | 2 +- circ/offline.pl | 2 +- circ/on-site_checkouts.pl | 2 +- circ/overdue.pl | 2 +- circ/pendingreserves.pl | 2 +- circ/renew.pl | 2 +- circ/request-article.pl | 2 +- circ/reserveratios.pl | 2 +- circ/returns.pl | 2 +- circ/transfer-slip.pl | 2 +- circ/transferstoreceive.pl | 2 +- circ/view_holdsqueue.pl | 2 +- circ/waitingreserves.pl | 2 +- circ/ypattrodue-attr-search-authvalue.pl | 2 +- circ/ysearch.pl | 2 +- clubs/club-enrollments.pl | 2 +- clubs/clubs-add-modify.pl | 2 +- clubs/clubs.pl | 2 +- clubs/patron-clubs-tab.pl | 2 +- clubs/patron-enroll.pl | 2 +- clubs/templates-add-modify.pl | 2 +- course_reserves/add_items.pl | 2 +- course_reserves/batch_add_items.pl | 2 +- course_reserves/course-details.pl | 2 +- course_reserves/course-reserves.pl | 2 +- course_reserves/course.pl | 2 +- course_reserves/mod_course.pl | 2 +- docs/CAS/CASProxy/examples/koha_webservice.pl | 2 +- docs/CAS/CASProxy/examples/proxy_cas.pl | 2 +- .../CASProxy/examples/proxy_cas_callback.pl | 2 +- docs/CAS/CASProxy/examples/proxy_cas_data.pl | 2 +- help.pl | 2 +- installer/install.pl | 2 +- installer/onboarding.pl | 2 +- labels/label-create-csv.pl | 2 +- labels/label-create-pdf.pl | 2 +- labels/label-create-xml.pl | 2 +- labels/label-edit-batch.pl | 2 +- labels/label-edit-layout.pl | 2 +- labels/label-edit-profile.pl | 2 +- labels/label-edit-range.pl | 2 +- labels/label-edit-template.pl | 2 +- labels/label-home.pl | 2 +- labels/label-item-search.pl | 2 +- labels/label-manage.pl | 2 +- labels/label-print.pl | 2 +- labels/spinelabel-home.pl | 2 +- labels/spinelabel-print.pl | 2 +- mainpage.pl | 2 +- members/accountline-details.pl | 2 +- members/apikeys.pl | 2 +- members/boraccount.pl | 2 +- members/deletemem.pl | 2 +- members/discharge.pl | 2 +- members/discharges.pl | 2 +- members/guarantor_search.pl | 2 +- members/ill-requests.pl | 2 +- members/mancredit.pl | 2 +- members/maninvoice.pl | 2 +- members/member-flags.pl | 2 +- members/member-password.pl | 2 +- members/member.pl | 2 +- members/memberentry.pl | 2 +- members/members-home.pl | 2 +- members/members-update-do.pl | 2 +- members/members-update.pl | 2 +- members/merge-patrons.pl | 2 +- members/mod_debarment.pl | 2 +- members/notices.pl | 2 +- members/patronimage.pl | 2 +- members/print_overdues.pl | 2 +- members/printfeercpt.pl | 2 +- members/printinvoice.pl | 2 +- members/printslip.pl | 2 +- members/purchase-suggestions.pl | 2 +- members/routing-lists.pl | 2 +- members/setstatus.pl | 2 +- members/statistics.pl | 2 +- members/update-child.pl | 2 +- misc/batchImportMARCWithBiblionumbers.pl | 2 +- misc/cronjobs/check-url.pl | 4 ++-- misc/cronjobs/cloud-kw.pl | 2 +- misc/cronjobs/gather_print_notices.pl | 2 +- ...MARC_sync_date_created_with_marc_biblio.pl | 8 +++---- misc/migration_tools/ifla/update.pl | 14 +++++------ misc/translator/LangInstaller.pm | 8 +++---- misc/translator/po2json | 2 +- offline_circ/download.pl | 2 +- opac/clubs/clubs-tab.pl | 2 +- opac/clubs/enroll.pl | 2 +- opac/errors/400.pl | 2 +- opac/errors/401.pl | 2 +- opac/errors/402.pl | 2 +- opac/errors/403.pl | 2 +- opac/errors/404.pl | 2 +- opac/errors/500.pl | 2 +- opac/external/overdrive/auth.pl | 2 +- opac/ilsdi.pl | 2 +- opac/maintenance.pl | 2 +- opac/opac-account-pay-paypal-return.pl | 2 +- opac/opac-account-pay-return.pl | 2 +- opac/opac-account-pay.pl | 2 +- opac/opac-account.pl | 2 +- opac/opac-addbybiblionumber.pl | 2 +- opac/opac-alert-subscribe.pl | 2 +- opac/opac-article-request-cancel.pl | 2 +- opac/opac-authorities-home.pl | 2 +- opac/opac-authoritiesdetail.pl | 2 +- opac/opac-basket.pl | 2 +- opac/opac-blocked.pl | 2 +- opac/opac-browse.pl | 2 +- opac/opac-browser.pl | 2 +- opac/opac-changelanguage.pl | 2 +- opac/opac-course-details.pl | 2 +- opac/opac-course-reserves.pl | 2 +- opac/opac-discharge.pl | 2 +- opac/opac-downloadshelf.pl | 2 +- opac/opac-ics.pl | 2 +- opac/opac-idref.pl | 2 +- opac/opac-illrequests.pl | 2 +- opac/opac-image.pl | 2 +- opac/opac-imageviewer.pl | 2 +- opac/opac-issue-note.pl | 2 +- opac/opac-main.pl | 2 +- opac/opac-memberentry.pl | 2 +- opac/opac-modrequest-suspend.pl | 2 +- opac/opac-modrequest.pl | 2 +- opac/opac-news-rss.pl | 2 +- opac/opac-overdrive-search.pl | 2 +- opac/opac-passwd.pl | 2 +- opac/opac-password-recovery.pl | 2 +- opac/opac-patron-consent.pl | 2 +- opac/opac-patron-image.pl | 2 +- opac/opac-privacy.pl | 2 +- opac/opac-readingrecord.pl | 2 +- opac/opac-recordedbooks-search.pl | 2 +- opac/opac-registration-verify.pl | 2 +- opac/opac-renew.pl | 2 +- opac/opac-reportproblem.pl | 2 +- opac/opac-request-article.pl | 2 +- opac/opac-reserve.pl | 2 +- opac/opac-restrictedpage.pl | 2 +- opac/opac-review.pl | 2 +- opac/opac-routing-lists.pl | 2 +- opac/opac-search-history.pl | 2 +- opac/opac-search.pl | 2 +- opac/opac-sendshelf.pl | 2 +- opac/opac-serial-issues.pl | 2 +- opac/opac-shareshelf.pl | 4 ++-- opac/opac-shelves.pl | 2 +- opac/opac-showmarc.pl | 2 +- opac/opac-showreviews.pl | 2 +- opac/opac-suggestions.pl | 2 +- opac/opac-tags_subject.pl | 2 +- opac/opac-topissues.pl | 2 +- opac/opac-user.pl | 2 +- opac/sci/sci-main.pl | 2 +- opac/sco/help.pl | 2 +- opac/sco/printslip.pl | 2 +- opac/sco/sco-main.pl | 2 +- opac/svc/checkout_notes | 2 +- opac/svc/club/cancel_enrollment | 2 +- opac/svc/club/enroll | 2 +- opac/svc/overdrive | 2 +- opac/svc/overdrive_proxy | 2 +- opac/svc/recordedbooks | 2 +- opac/svc/shelfbrowser.pl | 2 +- opac/svc/suggestion | 2 +- opac/tracklinks.pl | 2 +- patron_lists/add-modify.pl | 2 +- patron_lists/delete.pl | 2 +- patron_lists/list.pl | 2 +- patron_lists/lists.pl | 2 +- patron_lists/patrons.pl | 2 +- patroncards/add_user_search.pl | 2 +- patroncards/create-pdf.pl | 2 +- patroncards/edit-batch.pl | 2 +- patroncards/edit-layout.pl | 2 +- patroncards/edit-profile.pl | 2 +- patroncards/edit-template.pl | 2 +- patroncards/home.pl | 2 +- patroncards/manage.pl | 2 +- patroncards/print.pl | 2 +- plugins/plugins-enable.pl | 2 +- plugins/plugins-home.pl | 2 +- plugins/plugins-uninstall.pl | 2 +- plugins/plugins-upload.pl | 2 +- plugins/run.pl | 2 +- reports/acquisitions_stats.pl | 2 +- reports/bor_issues_top.pl | 2 +- reports/borrowers_out.pl | 2 +- reports/borrowers_stats.pl | 2 +- reports/cash_register_stats.pl | 2 +- reports/cat_issues_top.pl | 2 +- reports/catalogue_out.pl | 2 +- reports/catalogue_stats.pl | 2 +- reports/dictionary.pl | 2 +- reports/guided_reports.pl | 2 +- reports/issues_avg_stats.pl | 2 +- reports/itemslost.pl | 2 +- reports/manager.pl | 2 +- reports/orders_by_fund.pl | 2 +- reports/reports-home.pl | 2 +- reports/reserves_stats.pl | 2 +- reports/serials_stats.pl | 2 +- reserve/modrequest.pl | 2 +- reserve/modrequest_suspendall.pl | 2 +- reserve/request.pl | 2 +- reviews/reviewswaiting.pl | 2 +- rotating_collections/addItems.pl | 2 +- rotating_collections/editCollections.pl | 2 +- rotating_collections/rotatingCollections.pl | 2 +- rotating_collections/transferCollection.pl | 2 +- serials/acqui-search-result.pl | 2 +- serials/acqui-search.pl | 2 +- serials/add_user_search.pl | 2 +- serials/checkexpiration.pl | 2 +- serials/create-numberpattern.pl | 2 +- serials/lateissues-export.pl | 2 +- serials/routing-preview.pl | 2 +- serials/routing.pl | 2 +- serials/serials-collection.pl | 2 +- serials/serials-home.pl | 2 +- serials/serials-search.pl | 2 +- serials/showpredictionpattern.pl | 2 +- serials/subscription-batchedit.pl | 2 +- serials/subscription-bib-search.pl | 2 +- serials/subscription-detail.pl | 2 +- serials/subscription-frequencies.pl | 2 +- serials/subscription-frequency.pl | 2 +- serials/subscription-history.pl | 2 +- serials/subscription-numberpattern.pl | 2 +- serials/subscription-numberpatterns.pl | 2 +- serials/subscription-renew.pl | 2 +- serials/viewalerts.pl | 2 +- services/itemrecorddisplay.pl | 2 +- suggestion/add_user_search.pl | 2 +- suggestion/suggester_search.pl | 2 +- svc/article_request | 2 +- svc/authentication | 2 +- svc/barcode | 2 +- svc/bib | 2 +- svc/bib_framework | 2 +- svc/bib_profile | 2 +- svc/checkin | 2 +- svc/checkout_notes | 2 +- svc/checkouts | 2 +- svc/club/cancel_enrollment | 2 +- svc/club/delete | 2 +- svc/club/enroll | 2 +- svc/club/template/delete | 2 +- svc/cover_images | 2 +- svc/creator_batches | 2 +- svc/hold/resume | 2 +- svc/hold/suspend | 2 +- svc/holds | 2 +- svc/import_bib | 2 +- svc/letters/preview | 2 +- svc/mana/increment | 2 +- svc/mana/search | 4 ++-- svc/mana/share | 2 +- svc/mana/use | 2 +- svc/members/add_to_list | 2 +- svc/members/search | 2 +- svc/new_bib | 2 +- svc/problem_reports | 2 +- svc/renew | 2 +- svc/return_claims | 2 +- svc/virtualshelves/search | 2 +- t/Auth_with_shibboleth.t | 4 ++-- t/Calendar.t | 2 +- t/Context.t | 2 +- t/DateUtils.t | 2 +- t/Koha_MetadataRecord.t | 8 +++---- t/Koha_Template_Plugin_Koha.t | 4 ++-- t/Languages.t | 2 +- t/Output_JSONStream.t | 2 +- t/Search/History.t | 2 +- t/SuggestionEngine_AuthorityFile.t | 2 +- t/db_dependent/00-strict.t | 2 +- t/db_dependent/Accounts.t | 4 ++-- t/db_dependent/Acquisition.t | 2 +- t/db_dependent/Auth.t | 4 ++-- t/db_dependent/Auth_with_cas.t | 2 +- t/db_dependent/AuthoritiesMarc.t | 2 +- t/db_dependent/BackgroundJob.t | 2 +- t/db_dependent/Biblio.t | 4 ++-- t/db_dependent/Circulation.t | 2 +- .../Circulation/CheckIfIssuedToPatron.t | 2 +- .../Circulation/GetPendingOnSiteCheckouts.t | 2 +- t/db_dependent/Creators/Lib.t | 2 +- t/db_dependent/FrameworkPlugin.t | 8 +++---- t/db_dependent/ILSDI_Services.t | 24 +++++++++---------- t/db_dependent/Items.t | 8 +++---- t/db_dependent/Koha/Account.t | 2 +- t/db_dependent/Koha/Account/Line.t | 4 ++-- t/db_dependent/Koha/Patron/Messages.t | 2 +- t/db_dependent/Koha/Patrons.t | 2 +- .../Koha/Z3950Responder/GenericSession.t | 8 +++---- .../Koha/Z3950Responder/ZebraSession.t | 10 ++++---- t/db_dependent/Members/GetAllIssues.t | 2 +- t/db_dependent/Members/IssueSlip.t | 2 +- t/db_dependent/Record.t | 2 +- .../RecordProcessor_EmbedSeeFromHeadings.t | 4 ++-- t/db_dependent/Reserves/GetReserveFee.t | 2 +- t/db_dependent/Search.t | 12 +++++----- t/db_dependent/Search/History.t | 8 +++---- t/db_dependent/Serials.t | 2 +- .../SuggestionEngine_ExplodedTerms.t | 10 ++++---- t/db_dependent/TablesSettings.t | 2 +- t/db_dependent/Template/Plugin/KohaDates.t | 2 +- t/db_dependent/XISBN.t | 2 +- t/db_dependent/api/v1/checkouts.t | 2 +- t/lib/Mocks.pm | 4 ++-- tools/access_files.pl | 2 +- tools/ajax-inventory.pl | 2 +- tools/automatic_item_modification_by_age.pl | 2 +- tools/batchMod.pl | 2 +- tools/batch_delete_records.pl | 2 +- tools/batch_extend_due_dates.pl | 2 +- tools/batch_record_modification.pl | 2 +- tools/batch_records_ajax.pl | 2 +- tools/cleanborrowers.pl | 2 +- tools/copy-holidays.pl | 2 +- tools/csv-profiles.pl | 2 +- tools/exceptionHolidays.pl | 2 +- tools/export.pl | 2 +- tools/holidays.pl | 2 +- tools/koha-news.pl | 2 +- tools/letter.pl | 2 +- tools/manage-marc-import.pl | 2 +- tools/marc_modification_templates.pl | 2 +- tools/modborrowers.pl | 2 +- tools/newHolidays.pl | 2 +- tools/overduerules.pl | 2 +- tools/picture-upload.pl | 2 +- tools/problem-reports.pl | 2 +- tools/quotes-upload.pl | 2 +- tools/quotes.pl | 2 +- tools/quotes/quotes-upload_ajax.pl | 2 +- tools/scheduler.pl | 2 +- tools/showdiffmarc.pl | 2 +- tools/stage-marc-import.pl | 2 +- tools/stockrotation.pl | 2 +- tools/tools-home.pl | 2 +- tools/upload-cover-image.pl | 2 +- tools/viewlog.pl | 2 +- virtualshelves/addbybiblionumber.pl | 2 +- virtualshelves/downloadshelf.pl | 2 +- virtualshelves/shelves.pl | 2 +- xt/author/valid-templates.t | 2 +- 509 files changed, 590 insertions(+), 590 deletions(-) --- a/.perlcriticrc +++ a/.perlcriticrc @@ -1,5 +1,5 @@ severity = 5 -include = ProhibitUnusedVariables +include = ProhibitUnusedVariables Objects::ProhibitIndirectSyntax exclude = Miscellanea::RequireRcsKeywords [Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval] --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -1794,7 +1794,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} ); } --- a/C4/AuthoritiesMarc.pm +++ a/C4/AuthoritiesMarc.pm @@ -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) { --- a/C4/Breeding.pm +++ a/C4/Breeding.pm @@ -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"); --- a/C4/Context.pm +++ a/C4/Context.pm @@ -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; --- a/C4/InstallAuth.pm +++ a/C4/InstallAuth.pm @@ -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); --- a/C4/Languages.pm +++ a/C4/Languages.pm @@ -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; --- a/C4/Record.pm +++ a/C4/Record.pm @@ -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(); --- a/C4/SIP/Sip/Configuration.pm +++ a/C4/SIP/Sip/Configuration.pm @@ -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', --- a/C4/SIP/t/SIPtest.pm +++ a/C4/SIP/t/SIPtest.pm @@ -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; --- a/C4/SIP/xmlparse.pl +++ a/C4/SIP/xmlparse.pl @@ -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', --- a/C4/Search.pm +++ a/C4/Search.pm @@ -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 ($@) { --- a/C4/Service.pm +++ a/C4/Service.pm @@ -86,7 +86,7 @@ passed to C. 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 ); --- a/Koha/Illrequest/Logger.pm +++ a/Koha/Illrequest/Logger.pm @@ -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); --- a/Koha/OAI/Server/DeletedRecord.pm +++ a/Koha/OAI/Server/DeletedRecord.pm @@ -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, --- a/Koha/OAI/Server/GetRecord.pm +++ a/Koha/OAI/Server/GetRecord.pm @@ -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", ) ], --- a/Koha/OAI/Server/ListBase.pm +++ a/Koha/OAI/Server/ListBase.pm @@ -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 --- a/Koha/OAI/Server/ListIdentifiers.pm +++ a/Koha/OAI/Server/ListIdentifiers.pm @@ -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' ) ], ); } --- a/Koha/OAI/Server/ListRecords.pm +++ a/Koha/OAI/Server/ListRecords.pm @@ -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' ) ], ); } --- a/Koha/OAI/Server/ListSets.pm +++ a/Koha/OAI/Server/ListSets.pm @@ -54,7 +54,7 @@ sub new { } $self->resumptionToken( - new Koha::OAI::Server::ResumptionToken( + Koha::OAI::Server::ResumptionToken->new( metadataPrefix => $token->{metadata_prefix}, offset => $pos ) --- a/Koha/OAI/Server/Record.pm +++ a/Koha/OAI/Server/Record.pm @@ -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, ) ); --- a/Koha/OAI/Server/Repository.pm +++ a/Koha/OAI/Server/Repository.pm @@ -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", ); --- a/Koha/Patron/Discharge.pm +++ a/Koha/Patron/Discharge.pm @@ -118,7 +118,7 @@ sub generate_as_pdf { $letter->{'title'} =~ s/<>/$today/g; $letter->{'content'} =~ s/<>/$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, --- a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm +++ a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm @@ -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) { --- a/Koha/pdfformat/layout2pages.pm +++ a/Koha/pdfformat/layout2pages.pm @@ -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; --- a/Koha/pdfformat/layout2pagesde.pm +++ a/Koha/pdfformat/layout2pagesde.pm @@ -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; --- a/Koha/pdfformat/layout3pages.pm +++ a/Koha/pdfformat/layout3pages.pm @@ -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 --- a/Koha/pdfformat/layout3pagesfr.pm +++ a/Koha/pdfformat/layout3pagesfr.pm @@ -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 --- a/about.pl +++ a/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' ) --- a/acqui/add_user_search.pl +++ a/acqui/add_user_search.pl @@ -26,7 +26,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/acqui/addorder.pl +++ a/acqui/addorder.pl @@ -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 --- a/acqui/addorderiso2709.pl +++ a/acqui/addorderiso2709.pl @@ -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, --- a/acqui/ajax-getauthvaluedropbox.pl +++ a/acqui/ajax-getauthvaluedropbox.pl @@ -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'); --- a/acqui/basket.pl +++ a/acqui/basket.pl @@ -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'); --- a/acqui/basketgroup.pl +++ a/acqui/basketgroup.pl @@ -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", --- a/acqui/basketheader.pl +++ a/acqui/basketheader.pl @@ -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", --- a/acqui/cancelorder.pl +++ a/acqui/cancelorder.pl @@ -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, --- a/acqui/check_budget_total.pl +++ a/acqui/check_budget_total.pl @@ -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'); --- a/acqui/check_uniqueness.pl +++ a/acqui/check_uniqueness.pl @@ -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[]'); --- a/acqui/duplicate_orders.pl +++ a/acqui/duplicate_orders.pl @@ -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 --- a/acqui/finishreceive.pl +++ a/acqui/finishreceive.pl @@ -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'); --- a/acqui/histsearch.pl +++ a/acqui/histsearch.pl @@ -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; --- a/acqui/invoice-files.pl +++ a/acqui/invoice-files.pl @@ -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', --- a/acqui/invoice.pl +++ a/acqui/invoice.pl @@ -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', --- a/acqui/lateorders-export.pl +++ a/acqui/lateorders-export.pl @@ -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, --- a/acqui/lateorders.pl +++ a/acqui/lateorders.pl @@ -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", --- a/acqui/modordernotes.pl +++ a/acqui/modordernotes.pl @@ -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, --- a/acqui/neworderempty.pl +++ a/acqui/neworderempty.pl @@ -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'); --- a/acqui/newordersubscription.pl +++ a/acqui/newordersubscription.pl @@ -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'); --- a/acqui/newordersuggestion.pl +++ a/acqui/newordersuggestion.pl @@ -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'); --- a/acqui/ordered.pl +++ a/acqui/ordered.pl @@ -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'); --- a/acqui/orderreceive.pl +++ a/acqui/orderreceive.pl @@ -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'); --- a/acqui/parcel.pl +++ a/acqui/parcel.pl @@ -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) --- a/acqui/showorder.pl +++ a/acqui/showorder.pl @@ -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, --- a/acqui/spent.pl +++ a/acqui/spent.pl @@ -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'); --- a/acqui/transferorder.pl +++ a/acqui/transferorder.pl @@ -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, --- a/acqui/uncertainprice.pl +++ a/acqui/uncertainprice.pl @@ -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", --- a/acqui/updatesupplier.pl +++ a/acqui/updatesupplier.pl @@ -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' ); --- a/acqui/z3950_search.pl +++ a/acqui/z3950_search.pl @@ -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'); --- a/admin/add_user_search.pl +++ a/admin/add_user_search.pl @@ -26,7 +26,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/admin/additional-fields.pl +++ a/admin/additional-fields.pl @@ -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'; --- a/admin/admin-home.pl +++ a/admin/admin-home.pl @@ -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'); --- a/admin/adveditorshortcuts.pl +++ a/admin/adveditorshortcuts.pl @@ -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( --- a/admin/aqbudgetperiods.pl +++ a/admin/aqbudgetperiods.pl @@ -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'); --- a/admin/aqbudgets.pl +++ a/admin/aqbudgets.pl @@ -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( --- a/admin/aqcontract.pl +++ a/admin/aqcontract.pl @@ -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'; --- a/admin/aqplan.pl +++ a/admin/aqplan.pl @@ -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; --- a/admin/audio_alerts.pl +++ a/admin/audio_alerts.pl @@ -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'); --- a/admin/auth_subfields_structure.pl +++ a/admin/auth_subfields_structure.pl @@ -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'); --- a/admin/auth_tag_structure.pl +++ a/admin/auth_tag_structure.pl @@ -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) --- a/admin/authorised_values.pl +++ a/admin/authorised_values.pl @@ -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'); --- a/admin/authtypes.pl +++ a/admin/authtypes.pl @@ -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; --- a/admin/biblio_framework.pl +++ a/admin/biblio_framework.pl @@ -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(); --- a/admin/branch_transfer_limits.pl +++ a/admin/branch_transfer_limits.pl @@ -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", --- a/admin/categories.pl +++ a/admin/categories.pl @@ -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'; --- a/admin/check_budget_parent.pl +++ a/admin/check_budget_parent.pl @@ -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'); --- a/admin/check_parent_total.pl +++ a/admin/check_parent_total.pl @@ -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'); --- a/admin/checkmarc.pl +++ a/admin/checkmarc.pl @@ -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", --- a/admin/cities.pl +++ a/admin/cities.pl @@ -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'; --- a/admin/classsources.pl +++ a/admin/classsources.pl @@ -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'); --- a/admin/clone-rules.pl +++ a/admin/clone-rules.pl @@ -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", --- a/admin/columns_settings.pl +++ a/admin/columns_settings.pl @@ -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( { --- a/admin/credit_types.pl +++ a/admin/credit_types.pl @@ -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; --- a/admin/debit_types.pl +++ a/admin/debit_types.pl @@ -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; --- a/admin/desks.pl +++ a/admin/desks.pl @@ -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'; --- a/admin/didyoumean.pl +++ a/admin/didyoumean.pl @@ -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", --- a/admin/import_export_framework.pl +++ a/admin/import_export_framework.pl @@ -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'); --- a/admin/item_circulation_alerts.pl +++ a/admin/item_circulation_alerts.pl @@ -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; --- a/admin/items_search_field.pl +++ a/admin/items_search_field.pl @@ -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', --- a/admin/items_search_fields.pl +++ a/admin/items_search_fields.pl @@ -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', --- a/admin/itemtypes.pl +++ a/admin/itemtypes.pl @@ -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'; --- a/admin/koha2marclinks.pl +++ a/admin/koha2marclinks.pl @@ -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 ( { --- a/admin/library_groups.pl +++ a/admin/library_groups.pl @@ -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( { --- a/admin/localization.pl +++ a/admin/localization.pl @@ -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", --- a/admin/marc_subfields_structure.pl +++ a/admin/marc_subfields_structure.pl @@ -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'); --- a/admin/marctagstructure.pl +++ a/admin/marctagstructure.pl @@ -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; --- a/admin/matching-rules.pl +++ a/admin/matching-rules.pl @@ -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') || ''; --- a/admin/oai_set_mappings.pl +++ a/admin/oai_set_mappings.pl @@ -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, --- a/admin/oai_sets.pl +++ a/admin/oai_sets.pl @@ -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, --- a/admin/patron-attr-types.pl +++ a/admin/patron-attr-types.pl @@ -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') || ''; --- a/admin/preferences.pl +++ a/admin/preferences.pl @@ -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", --- a/admin/searchengine/elasticsearch/mappings.pl +++ a/admin/searchengine/elasticsearch/mappings.pl @@ -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', --- a/admin/share_content.pl +++ a/admin/share_content.pl @@ -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", --- a/admin/sms_providers.pl +++ a/admin/sms_providers.pl @@ -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( { --- a/admin/sru_modmapping.pl +++ a/admin/sru_modmapping.pl @@ -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( { --- a/admin/systempreferences.pl +++ a/admin/systempreferences.pl @@ -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; --- a/admin/transport-cost-matrix.pl +++ a/admin/transport-cost-matrix.pl @@ -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", --- a/admin/usage_statistics.pl +++ a/admin/usage_statistics.pl @@ -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", --- a/admin/z3950servers.pl +++ a/admin/z3950servers.pl @@ -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') || ''; --- a/authorities/auth_finder.pl +++ a/authorities/auth_finder.pl @@ -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') || ''; --- a/authorities/authorities-home.pl +++ a/authorities/authorities-home.pl @@ -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') || ''; --- a/authorities/authorities.pl +++ a/authorities/authorities.pl @@ -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. --- a/authorities/blinddetail-biblio-search.pl +++ a/authorities/blinddetail-biblio-search.pl @@ -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; --- a/authorities/detail-biblio-search.pl +++ a/authorities/detail-biblio-search.pl @@ -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; --- a/authorities/detail.pl +++ a/authorities/detail.pl @@ -164,7 +164,7 @@ sub build_tabs { # -my $query=new CGI; +my $query=CGI->new; my $dbh=C4::Context->dbh; --- a/authorities/export.pl +++ a/authorities/export.pl @@ -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", --- a/authorities/merge.pl +++ a/authorities/merge.pl @@ -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'); --- a/authorities/ysearch.pl +++ a/authorities/ysearch.pl @@ -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 } ); --- a/basket/basket.pl +++ a/basket/basket.pl @@ -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 ( { --- a/basket/downloadcart.pl +++ a/basket/downloadcart.pl @@ -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 ( { --- a/catalogue/ISBDdetail.pl +++ a/catalogue/ISBDdetail.pl @@ -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'); --- a/catalogue/MARCdetail.pl +++ a/catalogue/MARCdetail.pl @@ -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); --- a/catalogue/export.pl +++ a/catalogue/export.pl @@ -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, --- a/catalogue/getitem-ajax.pl +++ a/catalogue/getitem-ajax.pl @@ -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") { --- a/catalogue/image.pl +++ a/catalogue/image.pl @@ -32,7 +32,7 @@ use C4::Images; $| = 1; my $DEBUG = 0; -my $data = new CGI; +my $data = CGI->new; my $imagenumber; =head1 NAME --- a/catalogue/imageviewer.pl +++ a/catalogue/imageviewer.pl @@ -30,7 +30,7 @@ use C4::Search; use Koha::Biblios; use Koha::Patrons; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "catalogue/imageviewer.tt", --- a/catalogue/issuehistory.pl +++ a/catalogue/issuehistory.pl @@ -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", --- a/catalogue/item-export.pl +++ a/catalogue/item-export.pl @@ -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', --- a/catalogue/itemsearch.pl +++ a/catalogue/itemsearch.pl @@ -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'); --- a/catalogue/labeledMARCdetail.pl +++ a/catalogue/labeledMARCdetail.pl @@ -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); --- a/catalogue/moredetail.pl +++ a/catalogue/moredetail.pl @@ -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( { --- a/catalogue/search-history.pl +++ a/catalogue/search-history.pl @@ -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', --- a/catalogue/search.pl +++ a/catalogue/search.pl @@ -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; --- a/catalogue/showmarc.pl +++ a/catalogue/showmarc.pl @@ -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", --- a/catalogue/stockrotation.pl +++ a/catalogue/stockrotation.pl @@ -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 --- a/catalogue/updateitem.pl +++ a/catalogue/updateitem.pl @@ -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'); --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -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'); --- a/cataloguing/addbooks.pl +++ a/cataloguing/addbooks.pl @@ -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'); --- a/cataloguing/additem.pl +++ a/cataloguing/additem.pl @@ -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; --- a/cataloguing/merge.pl +++ a/cataloguing/merge.pl @@ -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, --- a/cataloguing/plugin_launcher.pl +++ a/cataloguing/plugin_launcher.pl @@ -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"), }); --- a/cataloguing/value_builder/unimarc_field_210c.pl +++ a/cataloguing/value_builder/unimarc_field_210c.pl @@ -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'); --- a/cataloguing/value_builder/unimarc_field_4XX.pl +++ a/cataloguing/value_builder/unimarc_field_4XX.pl @@ -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'); --- a/cataloguing/ysearch.pl +++ a/cataloguing/ysearch.pl @@ -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'); --- a/cataloguing/z3950_auth_search.pl +++ a/cataloguing/z3950_auth_search.pl @@ -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; --- a/cataloguing/z3950_search.pl +++ a/cataloguing/z3950_search.pl @@ -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'); --- a/changelanguage.pl +++ a/changelanguage.pl @@ -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}); --- a/circ/add_message.pl +++ a/circ/add_message.pl @@ -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", --- a/circ/article-request-slip.pl +++ a/circ/article-request-slip.pl @@ -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'); --- a/circ/article-requests.pl +++ a/circ/article-requests.pl @@ -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", --- a/circ/bookcount.pl +++ a/circ/bookcount.pl @@ -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'); --- a/circ/branchoverdues.pl +++ a/circ/branchoverdues.pl @@ -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({ --- a/circ/branchtransfers.pl +++ a/circ/branchtransfers.pl @@ -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"); --- a/circ/checkout-notes.pl +++ a/circ/checkout-notes.pl @@ -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( { --- a/circ/circulation-home.pl +++ a/circ/circulation-home.pl @@ -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", --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -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'); --- a/circ/del_message.pl +++ a/circ/del_message.pl @@ -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", --- a/circ/hold-transfer-slip.pl +++ a/circ/hold-transfer-slip.pl @@ -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); --- a/circ/offline-mf.pl +++ a/circ/offline-mf.pl @@ -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", --- a/circ/offline.pl +++ a/circ/offline.pl @@ -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", --- a/circ/on-site_checkouts.pl +++ a/circ/on-site_checkouts.pl @@ -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( { --- a/circ/overdue.pl +++ a/circ/overdue.pl @@ -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') || ''; --- a/circ/pendingreserves.pl +++ a/circ/pendingreserves.pl @@ -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 --- a/circ/renew.pl +++ a/circ/renew.pl @@ -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( { --- a/circ/request-article.pl +++ a/circ/request-article.pl @@ -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( { --- a/circ/reserveratios.pl +++ a/circ/reserveratios.pl @@ -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'); --- a/circ/returns.pl +++ a/circ/returns.pl @@ -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( --- a/circ/transfer-slip.pl +++ a/circ/transfer-slip.pl @@ -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); --- a/circ/transferstoreceive.pl +++ a/circ/transferstoreceive.pl @@ -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( --- a/circ/view_holdsqueue.pl +++ a/circ/view_holdsqueue.pl @@ -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", --- a/circ/waitingreserves.pl +++ a/circ/waitingreserves.pl @@ -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'); --- a/circ/ypattrodue-attr-search-authvalue.pl +++ a/circ/ypattrodue-attr-search-authvalue.pl @@ -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|^/||; --- a/circ/ysearch.pl +++ a/circ/ysearch.pl @@ -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)"; --- a/clubs/club-enrollments.pl +++ a/clubs/club-enrollments.pl @@ -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( { --- a/clubs/clubs-add-modify.pl +++ a/clubs/clubs-add-modify.pl @@ -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( { --- a/clubs/clubs.pl +++ a/clubs/clubs.pl @@ -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( { --- a/clubs/patron-clubs-tab.pl +++ a/clubs/patron-clubs-tab.pl @@ -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( { --- a/clubs/patron-enroll.pl +++ a/clubs/patron-enroll.pl @@ -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( { --- a/clubs/templates-add-modify.pl +++ a/clubs/templates-add-modify.pl @@ -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( { --- a/course_reserves/add_items.pl +++ a/course_reserves/add_items.pl @@ -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') || ''; --- a/course_reserves/batch_add_items.pl +++ a/course_reserves/batch_add_items.pl @@ -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{}; --- a/course_reserves/course-details.pl +++ a/course_reserves/course-details.pl @@ -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'); --- a/course_reserves/course-reserves.pl +++ a/course_reserves/course-reserves.pl @@ -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( { --- a/course_reserves/course.pl +++ a/course_reserves/course.pl @@ -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", --- a/course_reserves/mod_course.pl +++ a/course_reserves/mod_course.pl @@ -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, --- a/docs/CAS/CASProxy/examples/koha_webservice.pl +++ a/docs/CAS/CASProxy/examples/koha_webservice.pl @@ -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'); --- a/docs/CAS/CASProxy/examples/proxy_cas.pl +++ a/docs/CAS/CASProxy/examples/proxy_cas.pl @@ -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; --- a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl +++ a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl @@ -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; --- a/docs/CAS/CASProxy/examples/proxy_cas_data.pl +++ a/docs/CAS/CASProxy/examples/proxy_cas_data.pl @@ -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"); --- a/help.pl +++ a/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 --- a/installer/install.pl +++ a/installer/install.pl @@ -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'); --- a/installer/onboarding.pl +++ a/installer/onboarding.pl @@ -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"); --- a/labels/label-create-csv.pl +++ a/labels/label-create-csv.pl @@ -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; --- a/labels/label-create-pdf.pl +++ a/labels/label-create-pdf.pl @@ -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", --- a/labels/label-create-xml.pl +++ a/labels/label-create-xml.pl @@ -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; --- a/labels/label-edit-batch.pl +++ a/labels/label-edit-batch.pl @@ -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", --- a/labels/label-edit-layout.pl +++ a/labels/label-edit-layout.pl @@ -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", --- a/labels/label-edit-profile.pl +++ a/labels/label-edit-profile.pl @@ -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", --- a/labels/label-edit-range.pl +++ a/labels/label-edit-range.pl @@ -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", --- a/labels/label-edit-template.pl +++ a/labels/label-edit-template.pl @@ -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", --- a/labels/label-home.pl +++ a/labels/label-home.pl @@ -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", --- a/labels/label-item-search.pl +++ a/labels/label-item-search.pl @@ -45,7 +45,7 @@ BEGIN { } } -my $query = new CGI; +my $query = CGI->new; my $type = $query->param('type'); my $op = $query->param('op') || ''; --- a/labels/label-manage.pl +++ a/labels/label-manage.pl @@ -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", --- a/labels/label-print.pl +++ a/labels/label-print.pl @@ -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", --- a/labels/spinelabel-home.pl +++ a/labels/spinelabel-home.pl @@ -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, --- a/labels/spinelabel-print.pl +++ a/labels/spinelabel-print.pl @@ -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, --- a/mainpage.pl +++ a/mainpage.pl @@ -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( { --- a/members/accountline-details.pl +++ a/members/accountline-details.pl @@ -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( { --- a/members/apikeys.pl +++ a/members/apikeys.pl @@ -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', --- a/members/boraccount.pl +++ a/members/boraccount.pl @@ -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( --- a/members/deletemem.pl +++ a/members/deletemem.pl @@ -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", --- a/members/discharge.pl +++ a/members/discharge.pl @@ -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', --- a/members/discharges.pl +++ a/members/discharges.pl @@ -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({ --- a/members/guarantor_search.pl +++ a/members/guarantor_search.pl @@ -26,7 +26,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/members/ill-requests.pl +++ a/members/ill-requests.pl @@ -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( { --- a/members/mancredit.pl +++ a/members/mancredit.pl @@ -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", --- a/members/maninvoice.pl +++ a/members/maninvoice.pl @@ -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", --- a/members/member-flags.pl +++ a/members/member-flags.pl @@ -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'); --- a/members/member-password.pl +++ a/members/member-password.pl @@ -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"; --- a/members/member.pl +++ a/members/member.pl @@ -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", --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -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; --- a/members/members-home.pl +++ a/members/members-home.pl @@ -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", --- a/members/members-update-do.pl +++ a/members/members-update-do.pl @@ -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( --- a/members/members-update.pl +++ a/members/members-update.pl @@ -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", --- a/members/merge-patrons.pl +++ a/members/merge-patrons.pl @@ -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( { --- a/members/mod_debarment.pl +++ a/members/mod_debarment.pl @@ -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' ); --- a/members/notices.pl +++ a/members/notices.pl @@ -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'); --- a/members/patronimage.pl +++ a/members/patronimage.pl @@ -31,7 +31,7 @@ use Koha::Patron::Images; $|=1; my $DEBUG = 0; -my $query = new CGI; +my $query = CGI->new; my $borrowernumber; =head1 NAME --- a/members/print_overdues.pl +++ a/members/print_overdues.pl @@ -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" }; --- a/members/printfeercpt.pl +++ a/members/printfeercpt.pl @@ -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) --- a/members/printinvoice.pl +++ a/members/printinvoice.pl @@ -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", --- a/members/printslip.pl +++ a/members/printslip.pl @@ -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); --- a/members/purchase-suggestions.pl +++ a/members/purchase-suggestions.pl @@ -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", --- a/members/routing-lists.pl +++ a/members/routing-lists.pl @@ -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 ( { --- a/members/setstatus.pl +++ a/members/setstatus.pl @@ -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'); --- a/members/statistics.pl +++ a/members/statistics.pl @@ -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", --- a/members/update-child.pl +++ a/members/update-child.pl @@ -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( { --- a/misc/batchImportMARCWithBiblionumbers.pl +++ a/misc/batchImportMARCWithBiblionumbers.pl @@ -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) ; }; --- a/misc/cronjobs/check-url.pl +++ a/misc/cronjobs/check-url.pl @@ -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 <> ''" ); --- a/misc/cronjobs/cloud-kw.pl +++ a/misc/cronjobs/cloud-kw.pl @@ -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} --- a/misc/cronjobs/gather_print_notices.pl +++ a/misc/cronjobs/gather_print_notices.pl @@ -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"), --- a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl +++ a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl @@ -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."; --- a/misc/migration_tools/ifla/update.pl +++ a/misc/migration_tools/ifla/update.pl @@ -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 => '', );; --- a/misc/translator/LangInstaller.pm +++ a/misc/translator/LangInstaller.pm @@ -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; --- a/misc/translator/po2json +++ a/misc/translator/po2json @@ -165,7 +165,7 @@ sub main } - my $jsonobj = new JSON; + my $jsonobj = JSON->new; my $basename = basename($src); $basename =~ s/\.pot?$//; if ($pretty) --- a/offline_circ/download.pl +++ a/offline_circ/download.pl @@ -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" ); --- a/opac/clubs/clubs-tab.pl +++ a/opac/clubs/clubs-tab.pl @@ -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( { --- a/opac/clubs/enroll.pl +++ a/opac/clubs/enroll.pl @@ -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( { --- a/opac/errors/400.pl +++ a/opac/errors/400.pl @@ -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( { --- a/opac/errors/401.pl +++ a/opac/errors/401.pl @@ -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( { --- a/opac/errors/402.pl +++ a/opac/errors/402.pl @@ -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( { --- a/opac/errors/403.pl +++ a/opac/errors/403.pl @@ -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( { --- a/opac/errors/404.pl +++ a/opac/errors/404.pl @@ -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( { --- a/opac/errors/500.pl +++ a/opac/errors/500.pl @@ -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( { --- a/opac/external/overdrive/auth.pl +++ a/opac/external/overdrive/auth.pl @@ -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); --- a/opac/ilsdi.pl +++ a/opac/ilsdi.pl @@ -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 = ( --- a/opac/maintenance.pl +++ a/opac/maintenance.pl @@ -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'); --- a/opac/opac-account-pay-paypal-return.pl +++ a/opac/opac-account-pay-paypal-return.pl @@ -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"); --- a/opac/opac-account-pay-return.pl +++ a/opac/opac-account-pay-return.pl @@ -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' ); --- a/opac/opac-account-pay.pl +++ a/opac/opac-account-pay.pl @@ -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'); --- a/opac/opac-account.pl +++ a/opac/opac-account.pl @@ -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", --- a/opac/opac-addbybiblionumber.pl +++ a/opac/opac-addbybiblionumber.pl @@ -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'); --- a/opac/opac-alert-subscribe.pl +++ a/opac/opac-alert-subscribe.pl @@ -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; --- a/opac/opac-article-request-cancel.pl +++ a/opac/opac-article-request-cancel.pl @@ -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( { --- a/opac/opac-authorities-home.pl +++ a/opac/opac-authorities-home.pl @@ -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; --- a/opac/opac-authoritiesdetail.pl +++ a/opac/opac-authoritiesdetail.pl @@ -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; --- a/opac/opac-basket.pl +++ a/opac/opac-basket.pl @@ -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 ( { --- a/opac/opac-blocked.pl +++ a/opac/opac-blocked.pl @@ -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", --- a/opac/opac-browse.pl +++ a/opac/opac-browse.pl @@ -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 --- a/opac/opac-browser.pl +++ a/opac/opac-browser.pl @@ -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; --- a/opac/opac-changelanguage.pl +++ a/opac/opac-changelanguage.pl @@ -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 }); --- a/opac/opac-course-details.pl +++ a/opac/opac-course-details.pl @@ -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", --- a/opac/opac-course-reserves.pl +++ a/opac/opac-course-reserves.pl @@ -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", --- a/opac/opac-discharge.pl +++ a/opac/opac-discharge.pl @@ -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"); --- a/opac/opac-downloadshelf.pl +++ a/opac/opac-downloadshelf.pl @@ -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') ) { --- a/opac/opac-ics.pl +++ a/opac/opac-ics.pl @@ -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", --- a/opac/opac-idref.pl +++ a/opac/opac-idref.pl @@ -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", --- a/opac/opac-illrequests.pl +++ a/opac/opac-illrequests.pl @@ -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 --- a/opac/opac-image.pl +++ a/opac/opac-image.pl @@ -32,7 +32,7 @@ use C4::Images; $| = 1; my $DEBUG = 0; -my $data = new CGI; +my $data = CGI->new; my $imagenumber; =head1 NAME --- a/opac/opac-imageviewer.pl +++ a/opac/opac-imageviewer.pl @@ -27,7 +27,7 @@ use C4::Images; use Koha::Biblios; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "opac-imageviewer.tt", --- a/opac/opac-issue-note.pl +++ a/opac/opac-issue-note.pl @@ -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( { --- a/opac/opac-main.pl +++ a/opac/opac-main.pl @@ -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( --- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -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( --- a/opac/opac-modrequest-suspend.pl +++ a/opac/opac-modrequest-suspend.pl @@ -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", --- a/opac/opac-modrequest.pl +++ a/opac/opac-modrequest.pl @@ -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( { --- a/opac/opac-news-rss.pl +++ a/opac/opac-news-rss.pl @@ -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( --- a/opac/opac-overdrive-search.pl +++ a/opac/opac-overdrive-search.pl @@ -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) --- a/opac/opac-passwd.pl +++ a/opac/opac-passwd.pl @@ -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( { --- a/opac/opac-password-recovery.pl +++ a/opac/opac-password-recovery.pl @@ -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/; --- a/opac/opac-patron-consent.pl +++ a/opac/opac-patron-consent.pl @@ -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{}; --- a/opac/opac-patron-image.pl +++ a/opac/opac-patron-image.pl @@ -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'); --- a/opac/opac-privacy.pl +++ a/opac/opac-privacy.pl @@ -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') ) { --- a/opac/opac-readingrecord.pl +++ a/opac/opac-readingrecord.pl @@ -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') ) { --- a/opac/opac-recordedbooks-search.pl +++ a/opac/opac-recordedbooks-search.pl @@ -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( { --- a/opac/opac-registration-verify.pl +++ a/opac/opac-registration-verify.pl @@ -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') ) { --- a/opac/opac-renew.pl +++ a/opac/opac-renew.pl @@ -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( { --- a/opac/opac-reportproblem.pl +++ a/opac/opac-reportproblem.pl @@ -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( { --- a/opac/opac-request-article.pl +++ a/opac/opac-request-article.pl @@ -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( { --- a/opac/opac-reserve.pl +++ a/opac/opac-reserve.pl @@ -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') ) { --- a/opac/opac-restrictedpage.pl +++ a/opac/opac-restrictedpage.pl @@ -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", --- a/opac/opac-review.pl +++ a/opac/opac-review.pl @@ -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'); --- a/opac/opac-routing-lists.pl +++ a/opac/opac-routing-lists.pl @@ -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"); --- a/opac/opac-search-history.pl +++ a/opac/opac-search-history.pl @@ -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( --- a/opac/opac-search.pl +++ a/opac/opac-search.pl @@ -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 ) { --- a/opac/opac-sendshelf.pl +++ a/opac/opac-sendshelf.pl @@ -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') ) { --- a/opac/opac-serial-issues.pl +++ a/opac/opac-serial-issues.pl @@ -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'); --- a/opac/opac-shareshelf.pl +++ a/opac/opac-shareshelf.pl @@ -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') || ''; --- a/opac/opac-shelves.pl +++ a/opac/opac-shelves.pl @@ -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"; --- a/opac/opac-showmarc.pl +++ a/opac/opac-showmarc.pl @@ -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, --- a/opac/opac-showreviews.pl +++ a/opac/opac-showreviews.pl @@ -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; --- a/opac/opac-suggestions.pl +++ a/opac/opac-suggestions.pl @@ -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; --- a/opac/opac-tags_subject.pl +++ a/opac/opac-tags_subject.pl @@ -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; --- a/opac/opac-topissues.pl +++ a/opac/opac-topissues.pl @@ -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') ) { --- a/opac/opac-user.pl +++ a/opac/opac-user.pl @@ -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 --- a/opac/sci/sci-main.pl +++ a/opac/sci/sci-main.pl @@ -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') ) { --- a/opac/sco/help.pl +++ a/opac/sco/help.pl @@ -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; --- a/opac/sco/printslip.pl +++ a/opac/sco/printslip.pl @@ -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; --- a/opac/sco/sco-main.pl +++ a/opac/sco/sco-main.pl @@ -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 --- a/opac/svc/checkout_notes +++ a/opac/svc/checkout_notes @@ -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; --- a/opac/svc/club/cancel_enrollment +++ a/opac/svc/club/cancel_enrollment @@ -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') ); --- a/opac/svc/club/enroll +++ a/opac/svc/club/enroll @@ -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') ); --- a/opac/svc/overdrive +++ a/opac/svc/overdrive @@ -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' ); --- a/opac/svc/overdrive_proxy +++ a/opac/svc/overdrive_proxy @@ -43,7 +43,7 @@ use C4::Output; use Koha; -my $query = new CGI; +my $query = CGI->new; my $token; --- a/opac/svc/recordedbooks +++ a/opac/svc/recordedbooks @@ -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(); --- a/opac/svc/shelfbrowser.pl +++ a/opac/svc/shelfbrowser.pl @@ -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( { --- a/opac/svc/suggestion +++ a/opac/svc/suggestion @@ -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; --- a/opac/tracklinks.pl +++ a/opac/tracklinks.pl @@ -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; --- a/patron_lists/add-modify.pl +++ a/patron_lists/add-modify.pl @@ -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( { --- a/patron_lists/delete.pl +++ a/patron_lists/delete.pl @@ -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( { --- a/patron_lists/list.pl +++ a/patron_lists/list.pl @@ -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( { --- a/patron_lists/lists.pl +++ a/patron_lists/lists.pl @@ -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( { --- a/patron_lists/patrons.pl +++ a/patron_lists/patrons.pl @@ -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( { --- a/patroncards/add_user_search.pl +++ a/patroncards/add_user_search.pl @@ -26,7 +26,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/patroncards/create-pdf.pl +++ a/patroncards/create-pdf.pl @@ -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", --- a/patroncards/edit-batch.pl +++ a/patroncards/edit-batch.pl @@ -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", --- a/patroncards/edit-layout.pl +++ a/patroncards/edit-layout.pl @@ -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", --- a/patroncards/edit-profile.pl +++ a/patroncards/edit-profile.pl @@ -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", --- a/patroncards/edit-template.pl +++ a/patroncards/edit-template.pl @@ -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", --- a/patroncards/home.pl +++ a/patroncards/home.pl @@ -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", --- a/patroncards/manage.pl +++ a/patroncards/manage.pl @@ -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", --- a/patroncards/print.pl +++ a/patroncards/print.pl @@ -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", --- a/plugins/plugins-enable.pl +++ a/plugins/plugins-enable.pl @@ -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' } ); --- a/plugins/plugins-home.pl +++ a/plugins/plugins-home.pl @@ -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'); --- a/plugins/plugins-uninstall.pl +++ a/plugins/plugins-uninstall.pl @@ -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", --- a/plugins/plugins-upload.pl +++ a/plugins/plugins-upload.pl @@ -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", --- a/plugins/run.pl +++ a/plugins/run.pl @@ -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'); --- a/reports/acquisitions_stats.pl +++ a/reports/acquisitions_stats.pl @@ -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"); --- a/reports/bor_issues_top.pl +++ a/reports/bor_issues_top.pl @@ -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"); --- a/reports/borrowers_out.pl +++ a/reports/borrowers_out.pl @@ -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"); --- a/reports/borrowers_stats.pl +++ a/reports/borrowers_stats.pl @@ -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"); --- a/reports/cash_register_stats.pl +++ a/reports/cash_register_stats.pl @@ -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({ --- a/reports/cat_issues_top.pl +++ a/reports/cat_issues_top.pl @@ -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"); --- a/reports/catalogue_out.pl +++ a/reports/catalogue_out.pl @@ -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"); --- a/reports/catalogue_stats.pl +++ a/reports/catalogue_stats.pl @@ -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"); --- a/reports/dictionary.pl +++ a/reports/dictionary.pl @@ -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'; --- a/reports/guided_reports.pl +++ a/reports/guided_reports.pl @@ -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') // ''; --- a/reports/issues_avg_stats.pl +++ a/reports/issues_avg_stats.pl @@ -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"); --- a/reports/itemslost.pl +++ a/reports/itemslost.pl @@ -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", --- a/reports/manager.pl +++ a/reports/manager.pl @@ -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"; --- a/reports/orders_by_fund.pl +++ a/reports/orders_by_fund.pl @@ -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", --- a/reports/reports-home.pl +++ a/reports/reports-home.pl @@ -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, --- a/reports/reserves_stats.pl +++ a/reports/reserves_stats.pl @@ -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"); --- a/reports/serials_stats.pl +++ a/reports/serials_stats.pl @@ -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"); --- a/reserve/modrequest.pl +++ a/reserve/modrequest.pl @@ -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", --- a/reserve/modrequest_suspendall.pl +++ a/reserve/modrequest_suspendall.pl @@ -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", --- a/reserve/request.pl +++ a/reserve/request.pl @@ -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", --- a/reviews/reviewswaiting.pl +++ a/reviews/reviewswaiting.pl @@ -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", --- a/rotating_collections/addItems.pl +++ a/rotating_collections/addItems.pl @@ -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( { --- a/rotating_collections/editCollections.pl +++ a/rotating_collections/editCollections.pl @@ -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( { --- a/rotating_collections/rotatingCollections.pl +++ a/rotating_collections/rotatingCollections.pl @@ -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( { --- a/rotating_collections/transferCollection.pl +++ a/rotating_collections/transferCollection.pl @@ -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'); --- a/serials/acqui-search-result.pl +++ a/serials/acqui-search-result.pl @@ -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, --- a/serials/acqui-search.pl +++ a/serials/acqui-search.pl @@ -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( { --- a/serials/add_user_search.pl +++ a/serials/add_user_search.pl @@ -26,7 +26,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/serials/checkexpiration.pl +++ a/serials/checkexpiration.pl @@ -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 ( { --- a/serials/create-numberpattern.pl +++ a/serials/create-numberpattern.pl @@ -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") { --- a/serials/lateissues-export.pl +++ a/serials/lateissues-export.pl @@ -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{}; --- a/serials/routing-preview.pl +++ a/serials/routing-preview.pl @@ -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; --- a/serials/routing.pl +++ a/serials/routing.pl @@ -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'); --- a/serials/serials-collection.pl +++ a/serials/serials-collection.pl @@ -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; --- a/serials/serials-home.pl +++ a/serials/serials-home.pl @@ -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( --- a/serials/serials-search.pl +++ a/serials/serials-search.pl @@ -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') || ''; --- a/serials/showpredictionpattern.pl +++ a/serials/showpredictionpattern.pl @@ -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, --- a/serials/subscription-batchedit.pl +++ a/serials/subscription-batchedit.pl @@ -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', --- a/serials/subscription-bib-search.pl +++ a/serials/subscription-bib-search.pl @@ -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; --- a/serials/subscription-detail.pl +++ a/serials/subscription-detail.pl @@ -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; --- a/serials/subscription-frequencies.pl +++ a/serials/subscription-frequencies.pl @@ -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, --- a/serials/subscription-frequency.pl +++ a/serials/subscription-frequency.pl @@ -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") { --- a/serials/subscription-history.pl +++ a/serials/subscription-history.pl @@ -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, --- a/serials/subscription-numberpattern.pl +++ a/serials/subscription-numberpattern.pl @@ -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") { --- a/serials/subscription-numberpatterns.pl +++ a/serials/subscription-numberpatterns.pl @@ -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, --- a/serials/subscription-renew.pl +++ a/serials/subscription-renew.pl @@ -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{}; --- a/serials/viewalerts.pl +++ a/serials/viewalerts.pl @@ -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', --- a/services/itemrecorddisplay.pl +++ a/services/itemrecorddisplay.pl @@ -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, --- a/suggestion/add_user_search.pl +++ a/suggestion/add_user_search.pl @@ -24,7 +24,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/suggestion/suggester_search.pl +++ a/suggestion/suggester_search.pl @@ -26,7 +26,7 @@ use C4::Members; use Koha::Patron::Categories; -my $input = new CGI; +my $input = CGI->new; my $dbh = C4::Context->dbh; --- a/svc/article_request +++ a/svc/article_request @@ -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' } ); --- a/svc/authentication +++ a/svc/authentication @@ -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. --- a/svc/barcode +++ a/svc/barcode @@ -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 => '*' } ); --- a/svc/bib +++ a/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'} ); --- a/svc/bib_framework +++ a/svc/bib_framework @@ -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'); --- a/svc/bib_profile +++ a/svc/bib_profile @@ -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'} ); --- a/svc/checkin +++ a/svc/checkin @@ -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'), --- a/svc/checkout_notes +++ a/svc/checkout_notes @@ -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; --- a/svc/checkouts +++ a/svc/checkouts @@ -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')); --- a/svc/club/cancel_enrollment +++ a/svc/club/cancel_enrollment @@ -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' } ); --- a/svc/club/delete +++ a/svc/club/delete @@ -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" ) { --- a/svc/club/enroll +++ a/svc/club/enroll @@ -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' } ); --- a/svc/club/template/delete +++ a/svc/club/template/delete @@ -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" ) { --- a/svc/cover_images +++ a/svc/cover_images @@ -25,7 +25,7 @@ use C4::Auth qw/check_cookie_auth/; use C4::Images; use JSON qw/to_json/; -my $input = new CGI; +my $input = CGI->new; my ( $auth_status, $sessionID ) = check_cookie_auth( --- a/svc/creator_batches +++ a/svc/creator_batches @@ -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; --- a/svc/hold/resume +++ a/svc/hold/resume @@ -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' } ); --- a/svc/hold/suspend +++ a/svc/hold/suspend @@ -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' } ); --- a/svc/holds +++ a/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'), --- a/svc/import_bib +++ a/svc/import_bib @@ -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'} ); --- a/svc/letters/preview +++ a/svc/letters/preview @@ -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( { --- a/svc/mana/increment +++ a/svc/mana/increment @@ -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' ); --- a/svc/mana/search +++ a/svc/mana/search @@ -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; +output_html_with_http_headers $input, $cookie, $template->output; --- a/svc/mana/share +++ a/svc/mana/share @@ -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' ); --- a/svc/mana/use +++ a/svc/mana/use @@ -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' ); --- a/svc/members/add_to_list +++ a/svc/members/add_to_list @@ -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'), --- a/svc/members/search +++ a/svc/members/search @@ -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'); --- a/svc/new_bib +++ a/svc/new_bib @@ -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'} ); --- a/svc/problem_reports +++ a/svc/problem_reports @@ -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; --- a/svc/renew +++ a/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'), --- a/svc/return_claims +++ a/svc/return_claims @@ -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') ); --- a/svc/virtualshelves/search +++ a/svc/virtualshelves/search @@ -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'); --- a/t/Auth_with_shibboleth.t +++ a/t/Auth_with_shibboleth.t @@ -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 ); --- a/t/Calendar.t +++ a/t/Calendar.t @@ -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 { --- a/t/Context.t +++ a/t/Context.t @@ -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 { --- a/t/DateUtils.t +++ a/t/DateUtils.t @@ -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 { --- a/t/Koha_MetadataRecord.t +++ a/t/Koha_MetadataRecord.t @@ -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', --- a/t/Koha_Template_Plugin_Koha.t +++ a/t/Koha_Template_Plugin_Koha.t @@ -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'); --- a/t/Languages.t +++ a/t/Languages.t @@ -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 { --- a/t/Output_JSONStream.t +++ a/t/Output_JSONStream.t @@ -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."); --- a/t/Search/History.t +++ a/t/Search/History.t @@ -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'); --- a/t/SuggestionEngine_AuthorityFile.t +++ a/t/SuggestionEngine_AuthorityFile.t @@ -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, --- a/t/db_dependent/00-strict.t +++ a/t/db_dependent/00-strict.t @@ -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 --- a/t/db_dependent/Accounts.t +++ a/t/db_dependent/Accounts.t @@ -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, --- a/t/db_dependent/Acquisition.t +++ a/t/db_dependent/Acquisition.t @@ -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 { --- a/t/db_dependent/Auth.t +++ a/t/db_dependent/Auth.t @@ -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( --- a/t/db_dependent/Auth_with_cas.t +++ a/t/db_dependent/Auth_with_cas.t @@ -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 --- a/t/db_dependent/AuthoritiesMarc.t +++ a/t/db_dependent/AuthoritiesMarc.t @@ -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' => ''}; }); --- a/t/db_dependent/BackgroundJob.t +++ a/t/db_dependent/BackgroundJob.t @@ -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; --- a/t/db_dependent/Biblio.t +++ a/t/db_dependent/Biblio.t @@ -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 { --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -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( --- a/t/db_dependent/Circulation/CheckIfIssuedToPatron.t +++ a/t/db_dependent/Circulation/CheckIfIssuedToPatron.t @@ -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 } }); --- a/t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t +++ a/t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t @@ -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'); --- a/t/db_dependent/Creators/Lib.t +++ a/t/db_dependent/Creators/Lib.t @@ -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( --- a/t/db_dependent/FrameworkPlugin.t +++ a/t/db_dependent/FrameworkPlugin.t @@ -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 --- a/t/db_dependent/ILSDI_Services.t +++ a/t/db_dependent/ILSDI_Services.t @@ -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 ); --- a/t/db_dependent/Items.t +++ a/t/db_dependent/Items.t @@ -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, '', '', --- a/t/db_dependent/Koha/Account.t +++ a/t/db_dependent/Koha/Account.t @@ -959,7 +959,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( --- a/t/db_dependent/Koha/Account/Line.t +++ a/t/db_dependent/Koha/Account/Line.t @@ -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; --- a/t/db_dependent/Koha/Patron/Messages.t +++ a/t/db_dependent/Koha/Patron/Messages.t @@ -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}, --- a/t/db_dependent/Koha/Patrons.t +++ a/t/db_dependent/Koha/Patrons.t @@ -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'; }); --- a/t/db_dependent/Koha/Z3950Responder/GenericSession.t +++ a/t/db_dependent/Koha/Z3950Responder/GenericSession.t @@ -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'); --- a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t +++ a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t @@ -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'); --- a/t/db_dependent/Members/GetAllIssues.t +++ a/t/db_dependent/Members/GetAllIssues.t @@ -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(); --- a/t/db_dependent/Members/IssueSlip.t +++ a/t/db_dependent/Members/IssueSlip.t @@ -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; --- a/t/db_dependent/Record.t +++ a/t/db_dependent/Record.t @@ -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( 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; --- a/t/db_dependent/Reserves/GetReserveFee.t +++ a/t/db_dependent/Reserves/GetReserveFee.t @@ -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} }; }); --- a/t/db_dependent/Search.t +++ a/t/db_dependent/Search.t @@ -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'); --- a/t/db_dependent/Search/History.t +++ a/t/db_dependent/Search/History.t @@ -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'); --- a/t/db_dependent/Serials.t +++ a/t/db_dependent/Serials.t @@ -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" ), --- a/t/db_dependent/SuggestionEngine_ExplodedTerms.t +++ a/t/db_dependent/SuggestionEngine_ExplodedTerms.t @@ -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) = @_; --- a/t/db_dependent/TablesSettings.t +++ a/t/db_dependent/TablesSettings.t @@ -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 { --- a/t/db_dependent/Template/Plugin/KohaDates.t +++ a/t/db_dependent/Template/Plugin/KohaDates.t @@ -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(); --- a/t/db_dependent/XISBN.t +++ a/t/db_dependent/XISBN.t @@ -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 ); --- a/t/db_dependent/api/v1/checkouts.t +++ a/t/db_dependent/api/v1/checkouts.t @@ -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" ) --- a/t/lib/Mocks.pm +++ a/t/lib/Mocks.pm @@ -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); --- a/tools/access_files.pl +++ a/tools/access_files.pl @@ -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'); --- a/tools/ajax-inventory.pl +++ a/tools/ajax-inventory.pl @@ -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' }); --- a/tools/automatic_item_modification_by_age.pl +++ a/tools/automatic_item_modification_by_age.pl @@ -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( --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -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'); --- a/tools/batch_delete_records.pl +++ a/tools/batch_delete_records.pl @@ -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'; --- a/tools/batch_extend_due_dates.pl +++ a/tools/batch_extend_due_dates.pl @@ -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'); --- a/tools/batch_record_modification.pl +++ a/tools/batch_record_modification.pl @@ -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'; --- a/tools/batch_records_ajax.pl +++ a/tools/batch_records_ajax.pl @@ -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/; --- a/tools/cleanborrowers.pl +++ a/tools/cleanborrowers.pl @@ -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 --- a/tools/copy-holidays.pl +++ a/tools/copy-holidays.pl @@ -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'); --- a/tools/csv-profiles.pl +++ a/tools/csv-profiles.pl @@ -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; --- a/tools/exceptionHolidays.pl +++ a/tools/exceptionHolidays.pl @@ -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'); --- a/tools/export.pl +++ a/tools/export.pl @@ -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"); --- a/tools/holidays.pl +++ a/tools/holidays.pl @@ -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 --- a/tools/koha-news.pl +++ a/tools/koha-news.pl @@ -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'); --- a/tools/letter.pl +++ a/tools/letter.pl @@ -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'); --- a/tools/manage-marc-import.pl +++ a/tools/manage-marc-import.pl @@ -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'); --- a/tools/marc_modification_templates.pl +++ a/tools/marc_modification_templates.pl @@ -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'); --- a/tools/modborrowers.pl +++ a/tools/modborrowers.pl @@ -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", --- a/tools/newHolidays.pl +++ a/tools/newHolidays.pl @@ -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'); --- a/tools/overduerules.pl +++ a/tools/overduerules.pl @@ -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 } } ); --- a/tools/picture-upload.pl +++ a/tools/picture-upload.pl @@ -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 --- a/tools/problem-reports.pl +++ a/tools/problem-reports.pl @@ -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( { --- a/tools/quotes-upload.pl +++ a/tools/quotes-upload.pl @@ -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( { --- a/tools/quotes.pl +++ a/tools/quotes.pl @@ -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( { --- a/tools/quotes/quotes-upload_ajax.pl +++ a/tools/quotes/quotes-upload_ajax.pl @@ -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' } ); --- a/tools/scheduler.pl +++ a/tools/scheduler.pl @@ -32,7 +32,7 @@ BEGIN { $debug = $ENV{DEBUG} || 0; } -my $input = new CGI; +my $input = CGI->new; my $base; if ( C4::Context->config('supportdir') ) { --- a/tools/showdiffmarc.pl +++ a/tools/showdiffmarc.pl @@ -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'); --- a/tools/stage-marc-import.pl +++ a/tools/stage-marc-import.pl @@ -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'); --- a/tools/stockrotation.pl +++ a/tools/stockrotation.pl @@ -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 --- a/tools/tools-home.pl +++ a/tools/tools-home.pl @@ -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", --- a/tools/upload-cover-image.pl +++ a/tools/upload-cover-image.pl @@ -51,7 +51,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( --- a/tools/viewlog.pl +++ a/tools/viewlog.pl @@ -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'); --- a/virtualshelves/addbybiblionumber.pl +++ a/virtualshelves/addbybiblionumber.pl @@ -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'); --- a/virtualshelves/downloadshelf.pl +++ a/virtualshelves/downloadshelf.pl @@ -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 ( { --- a/virtualshelves/shelves.pl +++ a/virtualshelves/shelves.pl @@ -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", --- a/xt/author/valid-templates.t +++ a/xt/author/valid-templates.t @@ -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 ) { --