From 96cc447045f3f1d3702a3c69b36f596d88f38eda Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 29 Jun 2020 21:07:54 +0400 Subject: [PATCH] Bug 25898: Prohibit indirect object notation Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .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(-) diff --git a/.perlcriticrc b/.perlcriticrc index 9a4dcf4f02..1e92686067 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -1,5 +1,5 @@ severity = 5 -include = ProhibitUnusedVariables +include = ProhibitUnusedVariables Objects::ProhibitIndirectSyntax exclude = Miscellanea::RequireRcsKeywords [Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval] diff --git a/C4/Auth.pm b/C4/Auth.pm index a252eaee84..9c52c79bf0 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1804,7 +1804,7 @@ sub _get_session_params { sub get_session { my $sessionID = shift; my $params = _get_session_params(); - return new CGI::Session( $params->{dsn}, $sessionID, $params->{dsn_args} ); + return CGI::Session->new( $params->{dsn}, $sessionID, $params->{dsn_args} ); } diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index cbf59cdc03..9fa4d4f96f 100644 --- a/C4/AuthoritiesMarc.pm +++ b/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) { diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 8287cf4b6f..2a4ce3c2ac 100644 --- a/C4/Breeding.pm +++ b/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"); diff --git a/C4/Context.pm b/C4/Context.pm index 585332c326..58a6ad5e05 100644 --- a/C4/Context.pm +++ b/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; diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm index a753754462..7ed980b467 100644 --- a/C4/InstallAuth.pm +++ b/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); diff --git a/C4/Languages.pm b/C4/Languages.pm index 6aa1201c55..2dc838a353 100644 --- a/C4/Languages.pm +++ b/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; diff --git a/C4/Record.pm b/C4/Record.pm index 1916a1beca..c390c7ea06 100644 --- a/C4/Record.pm +++ b/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(); diff --git a/C4/SIP/Sip/Configuration.pm b/C4/SIP/Sip/Configuration.pm index fd2c3e79cd..3f5bdaaa4b 100644 --- a/C4/SIP/Sip/Configuration.pm +++ b/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', diff --git a/C4/SIP/t/SIPtest.pm b/C4/SIP/t/SIPtest.pm index a9a1ea5d12..6d750a793a 100644 --- a/C4/SIP/t/SIPtest.pm +++ b/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; diff --git a/C4/SIP/xmlparse.pl b/C4/SIP/xmlparse.pl index 77ed535065..0d8460f382 100755 --- a/C4/SIP/xmlparse.pl +++ b/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', diff --git a/C4/Search.pm b/C4/Search.pm index 5509a5b4cb..f2e73ee5a4 100644 --- a/C4/Search.pm +++ b/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 ($@) { diff --git a/C4/Service.pm b/C4/Service.pm index fa95a61cdb..bdb2ba17ff 100644 --- a/C4/Service.pm +++ b/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 ); diff --git a/Koha/Illrequest/Logger.pm b/Koha/Illrequest/Logger.pm index 45042a8ca0..a899a8db22 100644 --- a/Koha/Illrequest/Logger.pm +++ b/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); diff --git a/Koha/OAI/Server/DeletedRecord.pm b/Koha/OAI/Server/DeletedRecord.pm index 7d03f67015..e865b285e6 100644 --- a/Koha/OAI/Server/DeletedRecord.pm +++ b/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, diff --git a/Koha/OAI/Server/GetRecord.pm b/Koha/OAI/Server/GetRecord.pm index 30379c4246..db94c517c5 100644 --- a/Koha/OAI/Server/GetRecord.pm +++ b/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", ) ], diff --git a/Koha/OAI/Server/ListBase.pm b/Koha/OAI/Server/ListBase.pm index 92af1c3661..f1567dfb47 100644 --- a/Koha/OAI/Server/ListBase.pm +++ b/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 diff --git a/Koha/OAI/Server/ListIdentifiers.pm b/Koha/OAI/Server/ListIdentifiers.pm index 8793f66928..4f8dff8034 100644 --- a/Koha/OAI/Server/ListIdentifiers.pm +++ b/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' ) ], ); } diff --git a/Koha/OAI/Server/ListRecords.pm b/Koha/OAI/Server/ListRecords.pm index ff1c786395..f83af21a43 100644 --- a/Koha/OAI/Server/ListRecords.pm +++ b/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' ) ], ); } diff --git a/Koha/OAI/Server/ListSets.pm b/Koha/OAI/Server/ListSets.pm index 281b762011..68264787f1 100644 --- a/Koha/OAI/Server/ListSets.pm +++ b/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 ) diff --git a/Koha/OAI/Server/Record.pm b/Koha/OAI/Server/Record.pm index a916da411c..ecc4002201 100644 --- a/Koha/OAI/Server/Record.pm +++ b/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, ) ); diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index 558606d57d..ca34ee8d00 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/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", ); diff --git a/Koha/Patron/Discharge.pm b/Koha/Patron/Discharge.pm index 4cd596dfd1..f35f434109 100644 --- a/Koha/Patron/Discharge.pm +++ b/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, diff --git a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm b/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm index 7129d9b653..cb05267720 100644 --- a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm +++ b/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) { diff --git a/Koha/pdfformat/layout2pages.pm b/Koha/pdfformat/layout2pages.pm index dcb5ec731d..28f35a0e14 100644 --- a/Koha/pdfformat/layout2pages.pm +++ b/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; diff --git a/Koha/pdfformat/layout2pagesde.pm b/Koha/pdfformat/layout2pagesde.pm index 94f520c919..d7d69126de 100644 --- a/Koha/pdfformat/layout2pagesde.pm +++ b/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; diff --git a/Koha/pdfformat/layout3pages.pm b/Koha/pdfformat/layout3pages.pm index 78e698e29f..9c2456be55 100644 --- a/Koha/pdfformat/layout3pages.pm +++ b/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 diff --git a/Koha/pdfformat/layout3pagesfr.pm b/Koha/pdfformat/layout3pagesfr.pm index 2fdce7a4df..eb3d88e84a 100644 --- a/Koha/pdfformat/layout3pagesfr.pm +++ b/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 diff --git a/about.pl b/about.pl index 68abd8cab6..bade1ea0ae 100755 --- a/about.pl +++ b/about.pl @@ -60,7 +60,7 @@ use C4::Members::Statistics; #use Smart::Comments '####'; -my $query = new CGI; +my $query = CGI->new; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "about.tt", @@ -208,7 +208,7 @@ my $warnNoActiveCurrency = (! defined Koha::Acquisition::Currencies->get_active) my @xml_config_warnings; -my $context = new C4::Context; +my $context = C4::Context->new; if ( C4::Context->config('zebra_bib_index_mode') and C4::Context->config('zebra_bib_index_mode') eq 'grs1' ) diff --git a/acqui/add_user_search.pl b/acqui/add_user_search.pl index 8301f9aff0..a81053da1a 100755 --- a/acqui/add_user_search.pl +++ b/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; diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 049d8ad1e7..b9915e6aec 100755 --- a/acqui/addorder.pl +++ b/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 diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index acc386192c..af2af987b2 100755 --- a/acqui/addorderiso2709.pl +++ b/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, diff --git a/acqui/ajax-getauthvaluedropbox.pl b/acqui/ajax-getauthvaluedropbox.pl index d82d4a59c1..2693a25042 100755 --- a/acqui/ajax-getauthvaluedropbox.pl +++ b/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'); diff --git a/acqui/basket.pl b/acqui/basket.pl index 7d1687996f..a53160d70a 100755 --- a/acqui/basket.pl +++ b/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'); diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index db63b3faea..3b53bd9602 100755 --- a/acqui/basketgroup.pl +++ b/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", diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index 737f94cf6f..f06900ce85 100755 --- a/acqui/basketheader.pl +++ b/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", diff --git a/acqui/cancelorder.pl b/acqui/cancelorder.pl index 71deb630dc..84d03485b5 100755 --- a/acqui/cancelorder.pl +++ b/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, diff --git a/acqui/check_budget_total.pl b/acqui/check_budget_total.pl index c45360eabe..b502a1dd62 100755 --- a/acqui/check_budget_total.pl +++ b/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'); diff --git a/acqui/check_uniqueness.pl b/acqui/check_uniqueness.pl index 8b36e68af6..37c4a22204 100755 --- a/acqui/check_uniqueness.pl +++ b/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[]'); diff --git a/acqui/duplicate_orders.pl b/acqui/duplicate_orders.pl index 6db9018b73..7bbefea2ea 100755 --- a/acqui/duplicate_orders.pl +++ b/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 diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index a6519703c6..0ed88506c7 100755 --- a/acqui/finishreceive.pl +++ b/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'); diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index aa0187ab9c..de42d4222f 100755 --- a/acqui/histsearch.pl +++ b/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; diff --git a/acqui/invoice-files.pl b/acqui/invoice-files.pl index 8aa517ce11..d80ee02d7e 100755 --- a/acqui/invoice-files.pl +++ b/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', diff --git a/acqui/invoice.pl b/acqui/invoice.pl index d8a6008289..38577469c1 100755 --- a/acqui/invoice.pl +++ b/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', diff --git a/acqui/lateorders-export.pl b/acqui/lateorders-export.pl index 7cdc18a556..57a080dbd3 100755 --- a/acqui/lateorders-export.pl +++ b/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, diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index bd03be46fd..be12b3253b 100755 --- a/acqui/lateorders.pl +++ b/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", diff --git a/acqui/modordernotes.pl b/acqui/modordernotes.pl index 7801c7f911..ab7817eb70 100755 --- a/acqui/modordernotes.pl +++ b/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, diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 676bc98039..75624751fe 100755 --- a/acqui/neworderempty.pl +++ b/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'); diff --git a/acqui/newordersubscription.pl b/acqui/newordersubscription.pl index db14455c88..7d3e8ba40d 100755 --- a/acqui/newordersubscription.pl +++ b/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'); diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl index 54934967ab..f43e201c06 100755 --- a/acqui/newordersuggestion.pl +++ b/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'); diff --git a/acqui/ordered.pl b/acqui/ordered.pl index a3b3436049..20be8a0462 100755 --- a/acqui/ordered.pl +++ b/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'); diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 7fa239aac9..d3902de3bd 100755 --- a/acqui/orderreceive.pl +++ b/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'); diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 4ff5ba5133..d6024a0bf6 100755 --- a/acqui/parcel.pl +++ b/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) diff --git a/acqui/showorder.pl b/acqui/showorder.pl index fe434c9cec..89255c94e7 100755 --- a/acqui/showorder.pl +++ b/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, diff --git a/acqui/spent.pl b/acqui/spent.pl index e69f41e9e4..938ca90ccd 100755 --- a/acqui/spent.pl +++ b/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'); diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 6eeafdb12e..433821b587 100755 --- a/acqui/transferorder.pl +++ b/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, diff --git a/acqui/uncertainprice.pl b/acqui/uncertainprice.pl index 93f7975381..ac2964ebbe 100755 --- a/acqui/uncertainprice.pl +++ b/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", diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index 5b077f171e..60c65e4967 100755 --- a/acqui/updatesupplier.pl +++ b/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' ); diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index adb9890a90..10399d5755 100755 --- a/acqui/z3950_search.pl +++ b/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'); diff --git a/admin/add_user_search.pl b/admin/add_user_search.pl index d31cf11355..5d3b5de661 100755 --- a/admin/add_user_search.pl +++ b/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; diff --git a/admin/additional-fields.pl b/admin/additional-fields.pl index a7b4ffe701..e124878dd5 100755 --- a/admin/additional-fields.pl +++ b/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'; diff --git a/admin/admin-home.pl b/admin/admin-home.pl index 785901d8f4..23c92f3b4c 100755 --- a/admin/admin-home.pl +++ b/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'); diff --git a/admin/adveditorshortcuts.pl b/admin/adveditorshortcuts.pl index abd315ec8e..5910d3fd86 100755 --- a/admin/adveditorshortcuts.pl +++ b/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( diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 39588d626c..c96170dddf 100755 --- a/admin/aqbudgetperiods.pl +++ b/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'); diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index b9ba3b5855..16f62c5e79 100755 --- a/admin/aqbudgets.pl +++ b/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( diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index e942ae4d31..9bd4d47481 100755 --- a/admin/aqcontract.pl +++ b/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'; diff --git a/admin/aqplan.pl b/admin/aqplan.pl index d602513a36..95ddb36520 100755 --- a/admin/aqplan.pl +++ b/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; diff --git a/admin/audio_alerts.pl b/admin/audio_alerts.pl index 7cbad60242..793d2d1eea 100755 --- a/admin/audio_alerts.pl +++ b/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'); diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index 1115a9f361..c68a8aa28e 100755 --- a/admin/auth_subfields_structure.pl +++ b/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'); diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 311b52d751..a034d6fbbf 100755 --- a/admin/auth_tag_structure.pl +++ b/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) diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index 6f365e670a..62cabcc1b3 100755 --- a/admin/authorised_values.pl +++ b/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'); diff --git a/admin/authtypes.pl b/admin/authtypes.pl index 4141c68d40..4d032cfc03 100755 --- a/admin/authtypes.pl +++ b/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; diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index f3bd4435f9..20e40ef3b7 100755 --- a/admin/biblio_framework.pl +++ b/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(); diff --git a/admin/branch_transfer_limits.pl b/admin/branch_transfer_limits.pl index 82a8d214c9..94a348e120 100755 --- a/admin/branch_transfer_limits.pl +++ b/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", diff --git a/admin/categories.pl b/admin/categories.pl index 749db2d0a0..9bf5d365a1 100755 --- a/admin/categories.pl +++ b/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'; diff --git a/admin/check_budget_parent.pl b/admin/check_budget_parent.pl index c82e684245..a80c55d103 100755 --- a/admin/check_budget_parent.pl +++ b/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'); diff --git a/admin/check_parent_total.pl b/admin/check_parent_total.pl index 72f3b5ef06..49d4ba7be8 100755 --- a/admin/check_parent_total.pl +++ b/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'); diff --git a/admin/checkmarc.pl b/admin/checkmarc.pl index 174f0f90e6..d492374184 100755 --- a/admin/checkmarc.pl +++ b/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", diff --git a/admin/cities.pl b/admin/cities.pl index f5fa45fd20..eda3dc1d06 100755 --- a/admin/cities.pl +++ b/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'; diff --git a/admin/classsources.pl b/admin/classsources.pl index a937f7bc18..02b3e0e449 100755 --- a/admin/classsources.pl +++ b/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'); diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl index 76472d0c0e..7592c4da60 100755 --- a/admin/clone-rules.pl +++ b/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", diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl index f0a673434d..9d19808eaf 100755 --- a/admin/columns_settings.pl +++ b/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( { diff --git a/admin/credit_types.pl b/admin/credit_types.pl index 40ced7d8da..848a00b73e 100755 --- a/admin/credit_types.pl +++ b/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; diff --git a/admin/debit_types.pl b/admin/debit_types.pl index df268cd72d..5f7081d09e 100755 --- a/admin/debit_types.pl +++ b/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; diff --git a/admin/desks.pl b/admin/desks.pl index 4fee4770f7..352ff8ba50 100755 --- a/admin/desks.pl +++ b/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'; diff --git a/admin/didyoumean.pl b/admin/didyoumean.pl index 59078c39dd..9ac72dd51e 100755 --- a/admin/didyoumean.pl +++ b/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", diff --git a/admin/import_export_framework.pl b/admin/import_export_framework.pl index a1a05f9eae..bd5ee8331b 100755 --- a/admin/import_export_framework.pl +++ b/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'); diff --git a/admin/item_circulation_alerts.pl b/admin/item_circulation_alerts.pl index 940356f785..3a93cba336 100755 --- a/admin/item_circulation_alerts.pl +++ b/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; diff --git a/admin/items_search_field.pl b/admin/items_search_field.pl index 88bf4014cc..ab48babd86 100755 --- a/admin/items_search_field.pl +++ b/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', diff --git a/admin/items_search_fields.pl b/admin/items_search_fields.pl index 0923f57411..ac2548642b 100755 --- a/admin/items_search_fields.pl +++ b/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', diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index ff9bdad929..07866f72fb 100755 --- a/admin/itemtypes.pl +++ b/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'; diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index d26f6e5084..5c679b885c 100755 --- a/admin/koha2marclinks.pl +++ b/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 ( { diff --git a/admin/library_groups.pl b/admin/library_groups.pl index e8a02c4979..ec7064504d 100755 --- a/admin/library_groups.pl +++ b/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( { diff --git a/admin/localization.pl b/admin/localization.pl index e21a6346a9..81272d8c90 100755 --- a/admin/localization.pl +++ b/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", diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 1a35130f72..63ae97732d 100755 --- a/admin/marc_subfields_structure.pl +++ b/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'); diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index e53a339a27..68aeaa0f6a 100755 --- a/admin/marctagstructure.pl +++ b/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; diff --git a/admin/matching-rules.pl b/admin/matching-rules.pl index f6f8770135..eb308dde4a 100755 --- a/admin/matching-rules.pl +++ b/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') || ''; diff --git a/admin/oai_set_mappings.pl b/admin/oai_set_mappings.pl index c24dceb235..d322494f5c 100755 --- a/admin/oai_set_mappings.pl +++ b/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, diff --git a/admin/oai_sets.pl b/admin/oai_sets.pl index 4f2a640905..5f241856d1 100755 --- a/admin/oai_sets.pl +++ b/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, diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index cc6dcdfe76..af58243193 100755 --- a/admin/patron-attr-types.pl +++ b/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') || ''; diff --git a/admin/preferences.pl b/admin/preferences.pl index 6900425d6e..a39b6dd8f9 100755 --- a/admin/preferences.pl +++ b/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", diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl index 04440abc9b..88b8341604 100755 --- a/admin/searchengine/elasticsearch/mappings.pl +++ b/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', diff --git a/admin/share_content.pl b/admin/share_content.pl index dbd2c50471..0996f16c07 100755 --- a/admin/share_content.pl +++ b/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", diff --git a/admin/sms_providers.pl b/admin/sms_providers.pl index 007e001feb..7c39c30c35 100755 --- a/admin/sms_providers.pl +++ b/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( { diff --git a/admin/sru_modmapping.pl b/admin/sru_modmapping.pl index d798eea19d..298a4f5789 100755 --- a/admin/sru_modmapping.pl +++ b/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( { diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 97dee3c6c3..c232bb139f 100755 --- a/admin/systempreferences.pl +++ b/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; diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl index c146da975c..e28ee89b79 100755 --- a/admin/transport-cost-matrix.pl +++ b/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", diff --git a/admin/usage_statistics.pl b/admin/usage_statistics.pl index 8e35d6c56a..cc22948229 100755 --- a/admin/usage_statistics.pl +++ b/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", diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl index bff9bd2ca0..89c41d5034 100755 --- a/admin/z3950servers.pl +++ b/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') || ''; diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl index 98d413bc58..ed6774f599 100755 --- a/authorities/auth_finder.pl +++ b/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') || ''; diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index 828ba24b7d..66083d3285 100755 --- a/authorities/authorities-home.pl +++ b/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') || ''; diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 6a856c19dd..c8de9de788 100755 --- a/authorities/authorities.pl +++ b/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. diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl index ed091a2c08..478a1bf1fc 100755 --- a/authorities/blinddetail-biblio-search.pl +++ b/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; diff --git a/authorities/detail-biblio-search.pl b/authorities/detail-biblio-search.pl index 5370ce19e4..e2ba88b4db 100755 --- a/authorities/detail-biblio-search.pl +++ b/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; diff --git a/authorities/detail.pl b/authorities/detail.pl index dee6ae9422..6d8cb14ee1 100755 --- a/authorities/detail.pl +++ b/authorities/detail.pl @@ -164,7 +164,7 @@ sub build_tabs { # -my $query=new CGI; +my $query=CGI->new; my $dbh=C4::Context->dbh; diff --git a/authorities/export.pl b/authorities/export.pl index 2d7430983a..ee21e1e14e 100755 --- a/authorities/export.pl +++ b/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", diff --git a/authorities/merge.pl b/authorities/merge.pl index 250ff111cc..3b5f6c0fce 100755 --- a/authorities/merge.pl +++ b/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'); diff --git a/authorities/ysearch.pl b/authorities/ysearch.pl index 9861f877e6..92de7b1807 100755 --- a/authorities/ysearch.pl +++ b/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 } ); diff --git a/basket/basket.pl b/basket/basket.pl index 2ae309f9fe..aa4cd97dcf 100755 --- a/basket/basket.pl +++ b/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 ( { diff --git a/basket/downloadcart.pl b/basket/downloadcart.pl index 6115f96707..f8478770c2 100755 --- a/basket/downloadcart.pl +++ b/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 ( { diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index bef967c05c..898f57ab5d 100755 --- a/catalogue/ISBDdetail.pl +++ b/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'); diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 503b81c9d3..4f30839f2c 100755 --- a/catalogue/MARCdetail.pl +++ b/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); diff --git a/catalogue/export.pl b/catalogue/export.pl index 80f3f156cf..b42b95b7ab 100755 --- a/catalogue/export.pl +++ b/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, diff --git a/catalogue/getitem-ajax.pl b/catalogue/getitem-ajax.pl index 80c4f615cf..6180874555 100755 --- a/catalogue/getitem-ajax.pl +++ b/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") { diff --git a/catalogue/image.pl b/catalogue/image.pl index a314652df0..58358a78c4 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -34,7 +34,7 @@ use Koha::Exceptions; $| = 1; my $DEBUG = 0; -my $data = new CGI; +my $data = CGI->new; my $imagenumber; =head1 NAME diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl index df76644392..d78024bde9 100755 --- a/catalogue/imageviewer.pl +++ b/catalogue/imageviewer.pl @@ -30,7 +30,7 @@ use Koha::Biblios; use Koha::Items; use Koha::Patrons; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "catalogue/imageviewer.tt", diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl index 0630489a95..e81ec56de5 100755 --- a/catalogue/issuehistory.pl +++ b/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", diff --git a/catalogue/item-export.pl b/catalogue/item-export.pl index 10d7b5083c..fbc69bf71a 100755 --- a/catalogue/item-export.pl +++ b/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', diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index 48d4c775b4..431786cb81 100755 --- a/catalogue/itemsearch.pl +++ b/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'); diff --git a/catalogue/labeledMARCdetail.pl b/catalogue/labeledMARCdetail.pl index 22d1a08de4..16eb6cacd1 100755 --- a/catalogue/labeledMARCdetail.pl +++ b/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); diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index dd913b122f..3dca1f4f3b 100755 --- a/catalogue/moredetail.pl +++ b/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( { diff --git a/catalogue/search-history.pl b/catalogue/search-history.pl index 6a920c6027..092be2e89f 100755 --- a/catalogue/search-history.pl +++ b/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', diff --git a/catalogue/search.pl b/catalogue/search.pl index b6b38728d7..a5e0ecb408 100755 --- a/catalogue/search.pl +++ b/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; diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index d21683ee72..0c252c1229 100755 --- a/catalogue/showmarc.pl +++ b/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", diff --git a/catalogue/stockrotation.pl b/catalogue/stockrotation.pl index d87149c90f..015b1235dc 100755 --- a/catalogue/stockrotation.pl +++ b/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 diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index d8c280e261..9ff9f9b2d5 100755 --- a/catalogue/updateitem.pl +++ b/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'); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 996f61112b..a4614cc941 100755 --- a/cataloguing/addbiblio.pl +++ b/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'); diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index fdc04b2c2e..69a573186e 100755 --- a/cataloguing/addbooks.pl +++ b/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'); diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index bb578a1bf3..3621477630 100755 --- a/cataloguing/additem.pl +++ b/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; diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index baf2b3057a..7b1f81635c 100755 --- a/cataloguing/merge.pl +++ b/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, diff --git a/cataloguing/plugin_launcher.pl b/cataloguing/plugin_launcher.pl index 601784c73a..90105f326c 100755 --- a/cataloguing/plugin_launcher.pl +++ b/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"), }); diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl index 6298f0c922..9bf82f72b9 100755 --- a/cataloguing/value_builder/unimarc_field_210c.pl +++ b/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'); diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl index ed90394e27..0caebe1bd8 100755 --- a/cataloguing/value_builder/unimarc_field_4XX.pl +++ b/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'); diff --git a/cataloguing/ysearch.pl b/cataloguing/ysearch.pl index 3aa209c2d4..1683da4835 100755 --- a/cataloguing/ysearch.pl +++ b/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'); diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl index 1e25468785..615d7e7ce3 100755 --- a/cataloguing/z3950_auth_search.pl +++ b/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; diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index e4fce45597..f5f04246d6 100755 --- a/cataloguing/z3950_search.pl +++ b/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'); diff --git a/changelanguage.pl b/changelanguage.pl index 6fd31132ac..48d8c4657f 100755 --- a/changelanguage.pl +++ b/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}); diff --git a/circ/add_message.pl b/circ/add_message.pl index e5d6d6687f..455791b919 100755 --- a/circ/add_message.pl +++ b/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", diff --git a/circ/article-request-slip.pl b/circ/article-request-slip.pl index 7e42380681..2175561edb 100755 --- a/circ/article-request-slip.pl +++ b/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'); diff --git a/circ/article-requests.pl b/circ/article-requests.pl index 888918dfca..3e856bcafa 100755 --- a/circ/article-requests.pl +++ b/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", diff --git a/circ/bookcount.pl b/circ/bookcount.pl index a415fca23e..8509991ac4 100755 --- a/circ/bookcount.pl +++ b/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'); diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl index 24c49cfddf..43f3a86227 100755 --- a/circ/branchoverdues.pl +++ b/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({ diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index ff59c03a5a..14ee57eca1 100755 --- a/circ/branchtransfers.pl +++ b/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"); diff --git a/circ/checkout-notes.pl b/circ/checkout-notes.pl index dc891218ad..61ce7cc353 100755 --- a/circ/checkout-notes.pl +++ b/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( { diff --git a/circ/circulation-home.pl b/circ/circulation-home.pl index 87be24610f..f68535d1f1 100755 --- a/circ/circulation-home.pl +++ b/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", diff --git a/circ/circulation.pl b/circ/circulation.pl index f6c0d20d15..ee3878ca13 100755 --- a/circ/circulation.pl +++ b/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'); diff --git a/circ/del_message.pl b/circ/del_message.pl index 36c25c3f2e..496ab65567 100755 --- a/circ/del_message.pl +++ b/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", diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index 0cd57b1498..c0a3b6ea4c 100755 --- a/circ/hold-transfer-slip.pl +++ b/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); diff --git a/circ/offline-mf.pl b/circ/offline-mf.pl index c48aa23116..01b1d7c186 100755 --- a/circ/offline-mf.pl +++ b/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", diff --git a/circ/offline.pl b/circ/offline.pl index d35ad23ea0..d1500d6200 100755 --- a/circ/offline.pl +++ b/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", diff --git a/circ/on-site_checkouts.pl b/circ/on-site_checkouts.pl index 6118a56b69..c581e8ef9a 100755 --- a/circ/on-site_checkouts.pl +++ b/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( { diff --git a/circ/overdue.pl b/circ/overdue.pl index 7ebbafb031..1ce791fe24 100755 --- a/circ/overdue.pl +++ b/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') || ''; diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index dd6ae7699d..01cf877b55 100755 --- a/circ/pendingreserves.pl +++ b/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 diff --git a/circ/renew.pl b/circ/renew.pl index 29824187a8..1d6bdee076 100755 --- a/circ/renew.pl +++ b/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( { diff --git a/circ/request-article.pl b/circ/request-article.pl index 66d042b4e5..48b1d02e56 100755 --- a/circ/request-article.pl +++ b/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( { diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index c673e869ed..47b0375387 100755 --- a/circ/reserveratios.pl +++ b/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'); diff --git a/circ/returns.pl b/circ/returns.pl index bcafdae502..88d20d3c3f 100755 --- a/circ/returns.pl +++ b/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( diff --git a/circ/transfer-slip.pl b/circ/transfer-slip.pl index eb762535e2..1cbc98e092 100755 --- a/circ/transfer-slip.pl +++ b/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); diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index 37ae2a473c..bbf25368ae 100755 --- a/circ/transferstoreceive.pl +++ b/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( diff --git a/circ/view_holdsqueue.pl b/circ/view_holdsqueue.pl index 26c04fe78f..4e6384e317 100755 --- a/circ/view_holdsqueue.pl +++ b/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", diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 772477b62e..6db24ceb48 100755 --- a/circ/waitingreserves.pl +++ b/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'); diff --git a/circ/ypattrodue-attr-search-authvalue.pl b/circ/ypattrodue-attr-search-authvalue.pl index 4e8e2b3315..f0a694db86 100755 --- a/circ/ypattrodue-attr-search-authvalue.pl +++ b/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|^/||; diff --git a/circ/ysearch.pl b/circ/ysearch.pl index c50f772599..a52568640e 100755 --- a/circ/ysearch.pl +++ b/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)"; diff --git a/clubs/club-enrollments.pl b/clubs/club-enrollments.pl index 87b8debfa0..6163c70894 100755 --- a/clubs/club-enrollments.pl +++ b/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( { diff --git a/clubs/clubs-add-modify.pl b/clubs/clubs-add-modify.pl index 0337cf02bb..058d8222ba 100755 --- a/clubs/clubs-add-modify.pl +++ b/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( { diff --git a/clubs/clubs.pl b/clubs/clubs.pl index ca382ce414..d2d5a96372 100755 --- a/clubs/clubs.pl +++ b/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( { diff --git a/clubs/patron-clubs-tab.pl b/clubs/patron-clubs-tab.pl index 7a770bdfbb..1fc47b4dcb 100755 --- a/clubs/patron-clubs-tab.pl +++ b/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( { diff --git a/clubs/patron-enroll.pl b/clubs/patron-enroll.pl index 7dc5bed25a..3642996b5c 100755 --- a/clubs/patron-enroll.pl +++ b/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( { diff --git a/clubs/templates-add-modify.pl b/clubs/templates-add-modify.pl index da4ef21ef7..7e22af14ce 100755 --- a/clubs/templates-add-modify.pl +++ b/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( { diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl index 0a50be4385..7c16a143f5 100755 --- a/course_reserves/add_items.pl +++ b/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') || ''; diff --git a/course_reserves/batch_add_items.pl b/course_reserves/batch_add_items.pl index c47b74f1e4..829709930d 100755 --- a/course_reserves/batch_add_items.pl +++ b/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{}; diff --git a/course_reserves/course-details.pl b/course_reserves/course-details.pl index eed9650915..35b2bc7695 100755 --- a/course_reserves/course-details.pl +++ b/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'); diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl index d8052e0658..1ecda7ad9e 100755 --- a/course_reserves/course-reserves.pl +++ b/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( { diff --git a/course_reserves/course.pl b/course_reserves/course.pl index d655bf1542..c5fb37baa3 100755 --- a/course_reserves/course.pl +++ b/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", diff --git a/course_reserves/mod_course.pl b/course_reserves/mod_course.pl index b7b2943239..060b2a129f 100755 --- a/course_reserves/mod_course.pl +++ b/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, diff --git a/docs/CAS/CASProxy/examples/koha_webservice.pl b/docs/CAS/CASProxy/examples/koha_webservice.pl index 07bd4eacbd..da7fc8b10d 100755 --- a/docs/CAS/CASProxy/examples/koha_webservice.pl +++ b/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'); diff --git a/docs/CAS/CASProxy/examples/proxy_cas.pl b/docs/CAS/CASProxy/examples/proxy_cas.pl index 2db8d93f8d..c69d197f80 100755 --- a/docs/CAS/CASProxy/examples/proxy_cas.pl +++ b/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; diff --git a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl b/docs/CAS/CASProxy/examples/proxy_cas_callback.pl index fdda4274f0..9c6214795b 100755 --- a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl +++ b/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; diff --git a/docs/CAS/CASProxy/examples/proxy_cas_data.pl b/docs/CAS/CASProxy/examples/proxy_cas_data.pl index 4c72a63217..6346b5ec54 100755 --- a/docs/CAS/CASProxy/examples/proxy_cas_data.pl +++ b/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"); diff --git a/help.pl b/help.pl index b39c5773f1..4dd3ac3c12 100755 --- a/help.pl +++ b/help.pl @@ -24,7 +24,7 @@ use C4::Auth; use C4::Context; use Koha::Manual; -my $query = new CGI; +my $query = CGI->new; # We need to call get_template_and_user to let it does the job correctly # for the language diff --git a/installer/install.pl b/installer/install.pl index 067ba342ca..7aab43f89c 100755 --- a/installer/install.pl +++ b/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'); diff --git a/installer/onboarding.pl b/installer/onboarding.pl index f3be391f32..40b4c33169 100755 --- a/installer/onboarding.pl +++ b/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"); diff --git a/labels/label-create-csv.pl b/labels/label-create-csv.pl index 696374d717..4e8e66b702 100755 --- a/labels/label-create-csv.pl +++ b/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; diff --git a/labels/label-create-pdf.pl b/labels/label-create-pdf.pl index 0fea1dfe88..d35c5d36ea 100755 --- a/labels/label-create-pdf.pl +++ b/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", diff --git a/labels/label-create-xml.pl b/labels/label-create-xml.pl index 89d23db154..fe462a2a84 100755 --- a/labels/label-create-xml.pl +++ b/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; diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 7df5ff11ea..c6e5930e83 100755 --- a/labels/label-edit-batch.pl +++ b/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", diff --git a/labels/label-edit-layout.pl b/labels/label-edit-layout.pl index ac907f3bea..b5f279c1e0 100755 --- a/labels/label-edit-layout.pl +++ b/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", diff --git a/labels/label-edit-profile.pl b/labels/label-edit-profile.pl index 6a60c6c7f4..3569f574fc 100755 --- a/labels/label-edit-profile.pl +++ b/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", diff --git a/labels/label-edit-range.pl b/labels/label-edit-range.pl index daf8a43ffb..4ff6c9b996 100755 --- a/labels/label-edit-range.pl +++ b/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", diff --git a/labels/label-edit-template.pl b/labels/label-edit-template.pl index 6beb0b4cc4..197b336c43 100755 --- a/labels/label-edit-template.pl +++ b/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", diff --git a/labels/label-home.pl b/labels/label-home.pl index 245f22fa85..fee57edaa2 100755 --- a/labels/label-home.pl +++ b/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", diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl index 36631946e3..3eed6974b9 100755 --- a/labels/label-item-search.pl +++ b/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') || ''; diff --git a/labels/label-manage.pl b/labels/label-manage.pl index eca571d6f0..8f53a70ae7 100755 --- a/labels/label-manage.pl +++ b/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", diff --git a/labels/label-print.pl b/labels/label-print.pl index 93b86790e0..22d15ec327 100755 --- a/labels/label-print.pl +++ b/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", diff --git a/labels/spinelabel-home.pl b/labels/spinelabel-home.pl index defd2ef03e..74f2f1d1b0 100755 --- a/labels/spinelabel-home.pl +++ b/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, diff --git a/labels/spinelabel-print.pl b/labels/spinelabel-print.pl index 55c26bed37..f34c1f811d 100755 --- a/labels/spinelabel-print.pl +++ b/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, diff --git a/mainpage.pl b/mainpage.pl index 9ec4ae31db..183b5e0fcd 100755 --- a/mainpage.pl +++ b/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( { diff --git a/members/accountline-details.pl b/members/accountline-details.pl index 5e0b82da3a..a5c37079aa 100755 --- a/members/accountline-details.pl +++ b/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( { diff --git a/members/apikeys.pl b/members/apikeys.pl index 619fc30b8a..fb9051d1c4 100755 --- a/members/apikeys.pl +++ b/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', diff --git a/members/boraccount.pl b/members/boraccount.pl index 71546a7efc..cf593b6c76 100755 --- a/members/boraccount.pl +++ b/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( diff --git a/members/deletemem.pl b/members/deletemem.pl index 389a79c4d5..8980344df1 100755 --- a/members/deletemem.pl +++ b/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", diff --git a/members/discharge.pl b/members/discharge.pl index 46b12b02b3..7e055c6fd8 100755 --- a/members/discharge.pl +++ b/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', diff --git a/members/discharges.pl b/members/discharges.pl index f7ce929cf6..de19751ee0 100755 --- a/members/discharges.pl +++ b/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({ diff --git a/members/guarantor_search.pl b/members/guarantor_search.pl index 6b03a92565..3bd4165867 100755 --- a/members/guarantor_search.pl +++ b/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; diff --git a/members/ill-requests.pl b/members/ill-requests.pl index e60f95f84f..61737d7398 100755 --- a/members/ill-requests.pl +++ b/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( { diff --git a/members/mancredit.pl b/members/mancredit.pl index f0955d1436..c691bc05a3 100755 --- a/members/mancredit.pl +++ b/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", diff --git a/members/maninvoice.pl b/members/maninvoice.pl index 9ef1615cd7..a178a2be38 100755 --- a/members/maninvoice.pl +++ b/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", diff --git a/members/member-flags.pl b/members/member-flags.pl index 75fb9f2ca8..6ba2005ff9 100755 --- a/members/member-flags.pl +++ b/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'); diff --git a/members/member-password.pl b/members/member-password.pl index be83ab2269..323eb88f85 100755 --- a/members/member-password.pl +++ b/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"; diff --git a/members/member.pl b/members/member.pl index d31f43aac2..970015b22e 100755 --- a/members/member.pl +++ b/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", diff --git a/members/memberentry.pl b/members/memberentry.pl index bd1509eb09..221026acb9 100755 --- a/members/memberentry.pl +++ b/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; diff --git a/members/members-home.pl b/members/members-home.pl index a5ad3e1657..4dc06b1319 100755 --- a/members/members-home.pl +++ b/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", diff --git a/members/members-update-do.pl b/members/members-update-do.pl index fde62c7a0d..81a746ac41 100755 --- a/members/members-update-do.pl +++ b/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( diff --git a/members/members-update.pl b/members/members-update.pl index 650056c9c7..acccb2b380 100755 --- a/members/members-update.pl +++ b/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", diff --git a/members/merge-patrons.pl b/members/merge-patrons.pl index 0d1d17afcb..ca03168b00 100755 --- a/members/merge-patrons.pl +++ b/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( { diff --git a/members/mod_debarment.pl b/members/mod_debarment.pl index cf129e2072..1b7d4a4e91 100755 --- a/members/mod_debarment.pl +++ b/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' ); diff --git a/members/notices.pl b/members/notices.pl index ece7be8c3c..40bc6edf35 100755 --- a/members/notices.pl +++ b/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'); diff --git a/members/patronimage.pl b/members/patronimage.pl index f3534c3df4..42a82b9283 100755 --- a/members/patronimage.pl +++ b/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 diff --git a/members/print_overdues.pl b/members/print_overdues.pl index a642f35e2b..4c4bcc2914 100755 --- a/members/print_overdues.pl +++ b/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" }; diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl index 079b23e7e1..5777971868 100755 --- a/members/printfeercpt.pl +++ b/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) diff --git a/members/printinvoice.pl b/members/printinvoice.pl index f2ad628efd..9fd49fb178 100755 --- a/members/printinvoice.pl +++ b/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", diff --git a/members/printslip.pl b/members/printslip.pl index e59c625f91..debbbded6c 100755 --- a/members/printslip.pl +++ b/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); diff --git a/members/purchase-suggestions.pl b/members/purchase-suggestions.pl index 63c0aad855..ae1e021ff3 100755 --- a/members/purchase-suggestions.pl +++ b/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", diff --git a/members/routing-lists.pl b/members/routing-lists.pl index 67f7a33b03..dee5845a0d 100755 --- a/members/routing-lists.pl +++ b/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 ( { diff --git a/members/setstatus.pl b/members/setstatus.pl index a98d5554c1..66ae8b586c 100755 --- a/members/setstatus.pl +++ b/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'); diff --git a/members/statistics.pl b/members/statistics.pl index b6d5df66fa..93367b3ed7 100755 --- a/members/statistics.pl +++ b/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", diff --git a/members/update-child.pl b/members/update-child.pl index f138b1179f..0789ea553f 100755 --- a/members/update-child.pl +++ b/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( { diff --git a/misc/batchImportMARCWithBiblionumbers.pl b/misc/batchImportMARCWithBiblionumbers.pl index 02f275d61d..f8a12b5c5c 100755 --- a/misc/batchImportMARCWithBiblionumbers.pl +++ b/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) ; }; diff --git a/misc/cronjobs/check-url.pl b/misc/cronjobs/check-url.pl index 68a7b8e788..429a99110c 100755 --- a/misc/cronjobs/check-url.pl +++ b/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 <> ''" ); diff --git a/misc/cronjobs/cloud-kw.pl b/misc/cronjobs/cloud-kw.pl index 46a972e719..207312e3e1 100755 --- a/misc/cronjobs/cloud-kw.pl +++ b/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} diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index 10cf6304e5..ec9e32c2ce 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/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"), diff --git a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl b/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl index e3db4d49fe..5e0cd37fcc 100755 --- a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl +++ b/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."; diff --git a/misc/migration_tools/ifla/update.pl b/misc/migration_tools/ifla/update.pl index b736bf88ad..6f84cdc74b 100755 --- a/misc/migration_tools/ifla/update.pl +++ b/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 => '', );; diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm index b9c5c0d161..456532d101 100644 --- a/misc/translator/LangInstaller.pm +++ b/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; diff --git a/misc/translator/po2json b/misc/translator/po2json index 44cab9029e..410bd68c41 100755 --- a/misc/translator/po2json +++ b/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) diff --git a/offline_circ/download.pl b/offline_circ/download.pl index 386faebf41..63ed34bdb6 100755 --- a/offline_circ/download.pl +++ b/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" ); diff --git a/opac/clubs/clubs-tab.pl b/opac/clubs/clubs-tab.pl index bb73d0ba07..312f9b10f4 100755 --- a/opac/clubs/clubs-tab.pl +++ b/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( { diff --git a/opac/clubs/enroll.pl b/opac/clubs/enroll.pl index 5d16a4a46c..f486c7dfd2 100755 --- a/opac/clubs/enroll.pl +++ b/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( { diff --git a/opac/errors/400.pl b/opac/errors/400.pl index 4ed8cc410f..f1dc8da77a 100755 --- a/opac/errors/400.pl +++ b/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( { diff --git a/opac/errors/401.pl b/opac/errors/401.pl index 59e373f0cf..a3358a7ea2 100755 --- a/opac/errors/401.pl +++ b/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( { diff --git a/opac/errors/402.pl b/opac/errors/402.pl index 80256e790d..7dc8c9b99e 100755 --- a/opac/errors/402.pl +++ b/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( { diff --git a/opac/errors/403.pl b/opac/errors/403.pl index 3ea0306d99..ced08dd8ba 100755 --- a/opac/errors/403.pl +++ b/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( { diff --git a/opac/errors/404.pl b/opac/errors/404.pl index 5d2149507c..0ac32ca96c 100755 --- a/opac/errors/404.pl +++ b/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( { diff --git a/opac/errors/500.pl b/opac/errors/500.pl index f129a32cdb..22d86647d6 100755 --- a/opac/errors/500.pl +++ b/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( { diff --git a/opac/external/overdrive/auth.pl b/opac/external/overdrive/auth.pl index 97604c778f..f534c24885 100755 --- a/opac/external/overdrive/auth.pl +++ b/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); diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl index e1215cf75b..1b785211ce 100755 --- a/opac/ilsdi.pl +++ b/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 = ( diff --git a/opac/maintenance.pl b/opac/maintenance.pl index 380cf20db7..7ec3ec8093 100755 --- a/opac/maintenance.pl +++ b/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'); diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl index fd33e7217d..5fb9b8c1a3 100755 --- a/opac/opac-account-pay-paypal-return.pl +++ b/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"); diff --git a/opac/opac-account-pay-return.pl b/opac/opac-account-pay-return.pl index 21a8b2f9cf..841f84fbde 100755 --- a/opac/opac-account-pay-return.pl +++ b/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' ); diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl index e731280892..69384dbaca 100755 --- a/opac/opac-account-pay.pl +++ b/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'); diff --git a/opac/opac-account.pl b/opac/opac-account.pl index 15222de46b..8442281b36 100755 --- a/opac/opac-account.pl +++ b/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", diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl index 16ec335180..3563dfc300 100755 --- a/opac/opac-addbybiblionumber.pl +++ b/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'); diff --git a/opac/opac-alert-subscribe.pl b/opac/opac-alert-subscribe.pl index 66d2bf9807..08226e5cb3 100755 --- a/opac/opac-alert-subscribe.pl +++ b/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; diff --git a/opac/opac-article-request-cancel.pl b/opac/opac-article-request-cancel.pl index 2291249b2d..11893f656d 100755 --- a/opac/opac-article-request-cancel.pl +++ b/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( { diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index 059cbb44c5..2b9488381f 100755 --- a/opac/opac-authorities-home.pl +++ b/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; diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl index b35df75b8d..952bef3cf9 100755 --- a/opac/opac-authoritiesdetail.pl +++ b/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; diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index 1713de4993..14c44c4bee 100755 --- a/opac/opac-basket.pl +++ b/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 ( { diff --git a/opac/opac-blocked.pl b/opac/opac-blocked.pl index 3d2f2333b7..2876823c46 100755 --- a/opac/opac-blocked.pl +++ b/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", diff --git a/opac/opac-browse.pl b/opac/opac-browse.pl index cdc94bf4a6..bbad0d4f51 100755 --- a/opac/opac-browse.pl +++ b/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 diff --git a/opac/opac-browser.pl b/opac/opac-browser.pl index 519472f940..67851e9053 100755 --- a/opac/opac-browser.pl +++ b/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; diff --git a/opac/opac-changelanguage.pl b/opac/opac-changelanguage.pl index 895bc80c4d..eb1c296074 100755 --- a/opac/opac-changelanguage.pl +++ b/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 }); diff --git a/opac/opac-course-details.pl b/opac/opac-course-details.pl index 3afa8a921a..c7fe920b5a 100755 --- a/opac/opac-course-details.pl +++ b/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", diff --git a/opac/opac-course-reserves.pl b/opac/opac-course-reserves.pl index de1498b77f..f4cf89d707 100755 --- a/opac/opac-course-reserves.pl +++ b/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", diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl index 75b6af8056..58141c6459 100755 --- a/opac/opac-discharge.pl +++ b/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"); diff --git a/opac/opac-downloadshelf.pl b/opac/opac-downloadshelf.pl index 011fd0c5c5..99d14a73da 100755 --- a/opac/opac-downloadshelf.pl +++ b/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') ) { diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl index 94ea5fde91..bbb9b5bf40 100755 --- a/opac/opac-ics.pl +++ b/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", diff --git a/opac/opac-idref.pl b/opac/opac-idref.pl index ffd5505b71..8b95311f7e 100755 --- a/opac/opac-idref.pl +++ b/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", diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl index 4fa3852444..06012125a5 100755 --- a/opac/opac-illrequests.pl +++ b/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 diff --git a/opac/opac-image.pl b/opac/opac-image.pl index 30efbb2059..73426912b9 100755 --- a/opac/opac-image.pl +++ b/opac/opac-image.pl @@ -33,7 +33,7 @@ use Koha::CoverImages; $| = 1; my $DEBUG = 0; -my $data = new CGI; +my $data = CGI->new; my $imagenumber; =head1 NAME diff --git a/opac/opac-imageviewer.pl b/opac/opac-imageviewer.pl index 4e717c2d9d..6daa63d8e0 100755 --- a/opac/opac-imageviewer.pl +++ b/opac/opac-imageviewer.pl @@ -28,7 +28,7 @@ use Koha::Biblios; use Koha::CoverImages; use Koha::Items; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "opac-imageviewer.tt", diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl index f682e183fd..781a532695 100755 --- a/opac/opac-issue-note.pl +++ b/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( { diff --git a/opac/opac-main.pl b/opac/opac-main.pl index 74755a05a5..c572866284 100755 --- a/opac/opac-main.pl +++ b/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( diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index ee5771f430..6b7afc0175 100755 --- a/opac/opac-memberentry.pl +++ b/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( diff --git a/opac/opac-modrequest-suspend.pl b/opac/opac-modrequest-suspend.pl index 046b049f62..ca95ddad39 100755 --- a/opac/opac-modrequest-suspend.pl +++ b/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", diff --git a/opac/opac-modrequest.pl b/opac/opac-modrequest.pl index 45fc6bc680..d63781b8f9 100755 --- a/opac/opac-modrequest.pl +++ b/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( { diff --git a/opac/opac-news-rss.pl b/opac/opac-news-rss.pl index 95cbd6da73..f8c2b0e485 100755 --- a/opac/opac-news-rss.pl +++ b/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( diff --git a/opac/opac-overdrive-search.pl b/opac/opac-overdrive-search.pl index 632d2c49ee..f61b22227e 100755 --- a/opac/opac-overdrive-search.pl +++ b/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) diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl index 2e02d69f05..f6ab65075a 100755 --- a/opac/opac-passwd.pl +++ b/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( { diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl index 3d492dd205..57e13087c9 100755 --- a/opac/opac-password-recovery.pl +++ b/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/; diff --git a/opac/opac-patron-consent.pl b/opac/opac-patron-consent.pl index 95c64496d4..2de16abbe5 100755 --- a/opac/opac-patron-consent.pl +++ b/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{}; diff --git a/opac/opac-patron-image.pl b/opac/opac-patron-image.pl index 6c24e48420..b40788db7e 100755 --- a/opac/opac-patron-image.pl +++ b/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'); diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl index 0b2d414a30..2b0ed98dc3 100755 --- a/opac/opac-privacy.pl +++ b/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') ) { diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index 5cd38b9141..77b591bb4e 100755 --- a/opac/opac-readingrecord.pl +++ b/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') ) { diff --git a/opac/opac-recordedbooks-search.pl b/opac/opac-recordedbooks-search.pl index 4a390b37a5..1345080b85 100755 --- a/opac/opac-recordedbooks-search.pl +++ b/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( { diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl index f5cd15acd7..71ea329251 100755 --- a/opac/opac-registration-verify.pl +++ b/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') ) { diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl index b1111d0e07..55b20ebdfd 100755 --- a/opac/opac-renew.pl +++ b/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( { diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl index b7e133c3a7..293f2826c0 100755 --- a/opac/opac-reportproblem.pl +++ b/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( { diff --git a/opac/opac-request-article.pl b/opac/opac-request-article.pl index 30947363f6..d6ce08f8ad 100755 --- a/opac/opac-request-article.pl +++ b/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( { diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index a930ddbf76..2e3a8352ab 100755 --- a/opac/opac-reserve.pl +++ b/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') ) { diff --git a/opac/opac-restrictedpage.pl b/opac/opac-restrictedpage.pl index 19d0f72358..e9a325a2f2 100755 --- a/opac/opac-restrictedpage.pl +++ b/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", diff --git a/opac/opac-review.pl b/opac/opac-review.pl index 6c0ac3e688..9c27763384 100755 --- a/opac/opac-review.pl +++ b/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'); diff --git a/opac/opac-routing-lists.pl b/opac/opac-routing-lists.pl index 8e4771cce1..6982c1657d 100755 --- a/opac/opac-routing-lists.pl +++ b/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"); diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl index b058949984..a9a4a73cea 100755 --- a/opac/opac-search-history.pl +++ b/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( diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 0e679dab34..2d1ac14e0a 100755 --- a/opac/opac-search.pl +++ b/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 ) { diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index a8ca0899d8..c97aa450dc 100755 --- a/opac/opac-sendshelf.pl +++ b/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') ) { diff --git a/opac/opac-serial-issues.pl b/opac/opac-serial-issues.pl index cf095c1c41..74e5abbc55 100755 --- a/opac/opac-serial-issues.pl +++ b/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'); diff --git a/opac/opac-shareshelf.pl b/opac/opac-shareshelf.pl index 34a17788ed..7eecf6c45f 100755 --- a/opac/opac-shareshelf.pl +++ b/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') || ''; diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 180d0d2701..0bcd273798 100755 --- a/opac/opac-shelves.pl +++ b/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"; diff --git a/opac/opac-showmarc.pl b/opac/opac-showmarc.pl index a8b5849dd3..a30e3e5fdd 100755 --- a/opac/opac-showmarc.pl +++ b/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, diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index 3f0fef1381..cfb359c6b7 100755 --- a/opac/opac-showreviews.pl +++ b/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; diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index ae26ed3817..2c7dbfb7c7 100755 --- a/opac/opac-suggestions.pl +++ b/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; diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl index b083ef20d7..3c55c467d5 100755 --- a/opac/opac-tags_subject.pl +++ b/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; diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index fbf0081a38..1f6edaef76 100755 --- a/opac/opac-topissues.pl +++ b/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') ) { diff --git a/opac/opac-user.pl b/opac/opac-user.pl index a380d88f01..fd15abd95c 100755 --- a/opac/opac-user.pl +++ b/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 diff --git a/opac/sci/sci-main.pl b/opac/sci/sci-main.pl index e62f6a5c2f..88a3cf8ce1 100755 --- a/opac/sci/sci-main.pl +++ b/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') ) { diff --git a/opac/sco/help.pl b/opac/sco/help.pl index 845144558c..22fb99a2d0 100755 --- a/opac/sco/help.pl +++ b/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; diff --git a/opac/sco/printslip.pl b/opac/sco/printslip.pl index 98ded2a5c6..3b7074194e 100755 --- a/opac/sco/printslip.pl +++ b/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; diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 111e3a2562..75b64e5a13 100755 --- a/opac/sco/sco-main.pl +++ b/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 diff --git a/opac/svc/checkout_notes b/opac/svc/checkout_notes index 7814953f36..8913ab70d7 100755 --- a/opac/svc/checkout_notes +++ b/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; diff --git a/opac/svc/club/cancel_enrollment b/opac/svc/club/cancel_enrollment index d219933800..c9af28349d 100755 --- a/opac/svc/club/cancel_enrollment +++ b/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') ); diff --git a/opac/svc/club/enroll b/opac/svc/club/enroll index 98da33f22e..105cbb6064 100755 --- a/opac/svc/club/enroll +++ b/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') ); diff --git a/opac/svc/overdrive b/opac/svc/overdrive index 57333f0066..89d0865dd8 100755 --- a/opac/svc/overdrive +++ b/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' ); diff --git a/opac/svc/overdrive_proxy b/opac/svc/overdrive_proxy index d8fd7c666e..1404e9873c 100755 --- a/opac/svc/overdrive_proxy +++ b/opac/svc/overdrive_proxy @@ -43,7 +43,7 @@ use C4::Output; use Koha; -my $query = new CGI; +my $query = CGI->new; my $token; diff --git a/opac/svc/recordedbooks b/opac/svc/recordedbooks index d55a15c759..4a5c9376cc 100755 --- a/opac/svc/recordedbooks +++ b/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(); diff --git a/opac/svc/shelfbrowser.pl b/opac/svc/shelfbrowser.pl index 2b24a0e3aa..82e583ca81 100755 --- a/opac/svc/shelfbrowser.pl +++ b/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( { diff --git a/opac/svc/suggestion b/opac/svc/suggestion index f4fb1d8722..04b0655b34 100755 --- a/opac/svc/suggestion +++ b/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; diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl index 2c0d213617..ab07f033be 100755 --- a/opac/tracklinks.pl +++ b/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; diff --git a/patron_lists/add-modify.pl b/patron_lists/add-modify.pl index b0b39ccfbd..c10c208447 100755 --- a/patron_lists/add-modify.pl +++ b/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( { diff --git a/patron_lists/delete.pl b/patron_lists/delete.pl index 7751fe80c2..87c199b426 100755 --- a/patron_lists/delete.pl +++ b/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( { diff --git a/patron_lists/list.pl b/patron_lists/list.pl index 90b580106e..75f30e2989 100755 --- a/patron_lists/list.pl +++ b/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( { diff --git a/patron_lists/lists.pl b/patron_lists/lists.pl index cdb055a351..df84727426 100755 --- a/patron_lists/lists.pl +++ b/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( { diff --git a/patron_lists/patrons.pl b/patron_lists/patrons.pl index 2c10923ca8..98ac9593c2 100755 --- a/patron_lists/patrons.pl +++ b/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( { diff --git a/patroncards/add_user_search.pl b/patroncards/add_user_search.pl index 9551ab03cf..5c250e81ce 100755 --- a/patroncards/add_user_search.pl +++ b/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; diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index fc584a3daf..1ffaa0002a 100755 --- a/patroncards/create-pdf.pl +++ b/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", diff --git a/patroncards/edit-batch.pl b/patroncards/edit-batch.pl index 990642e9bf..992c58a753 100755 --- a/patroncards/edit-batch.pl +++ b/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", diff --git a/patroncards/edit-layout.pl b/patroncards/edit-layout.pl index 6ff61010df..8e415afa6b 100755 --- a/patroncards/edit-layout.pl +++ b/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", diff --git a/patroncards/edit-profile.pl b/patroncards/edit-profile.pl index 6f3782b1b6..e5ceb08b07 100755 --- a/patroncards/edit-profile.pl +++ b/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", diff --git a/patroncards/edit-template.pl b/patroncards/edit-template.pl index 8ac1e487b0..cce2a8f5ec 100755 --- a/patroncards/edit-template.pl +++ b/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", diff --git a/patroncards/home.pl b/patroncards/home.pl index bd0c16c826..7bb2bc41a1 100755 --- a/patroncards/home.pl +++ b/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", diff --git a/patroncards/manage.pl b/patroncards/manage.pl index 1611e7950b..4ea36eb9d0 100755 --- a/patroncards/manage.pl +++ b/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", diff --git a/patroncards/print.pl b/patroncards/print.pl index 758afff62d..60cff0ea87 100755 --- a/patroncards/print.pl +++ b/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", diff --git a/plugins/plugins-enable.pl b/plugins/plugins-enable.pl index 9e7714c3da..181550781a 100755 --- a/plugins/plugins-enable.pl +++ b/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' } ); diff --git a/plugins/plugins-home.pl b/plugins/plugins-home.pl index 5757811fce..1efcc02ded 100755 --- a/plugins/plugins-home.pl +++ b/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'); diff --git a/plugins/plugins-uninstall.pl b/plugins/plugins-uninstall.pl index 0c0d56db25..8f933a2971 100755 --- a/plugins/plugins-uninstall.pl +++ b/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", diff --git a/plugins/plugins-upload.pl b/plugins/plugins-upload.pl index da538fc6dd..c81e6f175b 100755 --- a/plugins/plugins-upload.pl +++ b/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", diff --git a/plugins/run.pl b/plugins/run.pl index 3aa3ab1cd1..d050f47d69 100755 --- a/plugins/run.pl +++ b/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'); diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index d5de0a22f1..b560e459a4 100755 --- a/reports/acquisitions_stats.pl +++ b/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"); diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index a41985b752..d88d701a8f 100755 --- a/reports/bor_issues_top.pl +++ b/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"); diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index 357719c407..394bf38b15 100755 --- a/reports/borrowers_out.pl +++ b/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"); diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 3eaba08964..c53491a070 100755 --- a/reports/borrowers_stats.pl +++ b/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"); diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl index 0e92d5c489..b9a3fe818d 100755 --- a/reports/cash_register_stats.pl +++ b/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({ diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index 596ea00449..28025cce67 100755 --- a/reports/cat_issues_top.pl +++ b/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"); diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl index d85cebcc35..bea7fe9bf2 100755 --- a/reports/catalogue_out.pl +++ b/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"); diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 15ccefd75f..85293b7026 100755 --- a/reports/catalogue_stats.pl +++ b/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"); diff --git a/reports/dictionary.pl b/reports/dictionary.pl index 2c89904494..9cc7ed7697 100755 --- a/reports/dictionary.pl +++ b/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'; diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 6bf32e25b0..aab868ed19 100755 --- a/reports/guided_reports.pl +++ b/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') // ''; diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index d700664074..ca074b5dfd 100755 --- a/reports/issues_avg_stats.pl +++ b/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"); diff --git a/reports/itemslost.pl b/reports/itemslost.pl index de1e798609..3fcb75d632 100755 --- a/reports/itemslost.pl +++ b/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", diff --git a/reports/manager.pl b/reports/manager.pl index 82a9cb6c3c..45f2d60ac5 100755 --- a/reports/manager.pl +++ b/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"; diff --git a/reports/orders_by_fund.pl b/reports/orders_by_fund.pl index 7f50e9af38..d5fa1070f5 100755 --- a/reports/orders_by_fund.pl +++ b/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", diff --git a/reports/reports-home.pl b/reports/reports-home.pl index b8ba0aa853..78978c19fd 100755 --- a/reports/reports-home.pl +++ b/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, diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index 77d6eea72b..79d8db98eb 100755 --- a/reports/reserves_stats.pl +++ b/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"); diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl index 10c0a6e81c..9a0a071ff7 100755 --- a/reports/serials_stats.pl +++ b/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"); diff --git a/reserve/modrequest.pl b/reserve/modrequest.pl index ce07bec77d..b2d138378a 100755 --- a/reserve/modrequest.pl +++ b/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", diff --git a/reserve/modrequest_suspendall.pl b/reserve/modrequest_suspendall.pl index ea303f3083..dbe6b227db 100755 --- a/reserve/modrequest_suspendall.pl +++ b/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", diff --git a/reserve/request.pl b/reserve/request.pl index bff61851d2..503a6764c9 100755 --- a/reserve/request.pl +++ b/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", diff --git a/reviews/reviewswaiting.pl b/reviews/reviewswaiting.pl index e115941366..f5050d2ba5 100755 --- a/reviews/reviewswaiting.pl +++ b/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", diff --git a/rotating_collections/addItems.pl b/rotating_collections/addItems.pl index b52113a5dd..5cd49df436 100755 --- a/rotating_collections/addItems.pl +++ b/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( { diff --git a/rotating_collections/editCollections.pl b/rotating_collections/editCollections.pl index 4df8942508..33014e9831 100755 --- a/rotating_collections/editCollections.pl +++ b/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( { diff --git a/rotating_collections/rotatingCollections.pl b/rotating_collections/rotatingCollections.pl index 941f778681..7eb3975c03 100755 --- a/rotating_collections/rotatingCollections.pl +++ b/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( { diff --git a/rotating_collections/transferCollection.pl b/rotating_collections/transferCollection.pl index bdee62a83e..5cfc62699a 100755 --- a/rotating_collections/transferCollection.pl +++ b/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'); diff --git a/serials/acqui-search-result.pl b/serials/acqui-search-result.pl index 1897f5fec8..ece1232d19 100755 --- a/serials/acqui-search-result.pl +++ b/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, diff --git a/serials/acqui-search.pl b/serials/acqui-search.pl index 95b02c23ac..58d659d4f8 100755 --- a/serials/acqui-search.pl +++ b/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( { diff --git a/serials/add_user_search.pl b/serials/add_user_search.pl index 6b77c9e0c1..dedce1d279 100755 --- a/serials/add_user_search.pl +++ b/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; diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl index 4f0c1e8001..10d5dacc07 100755 --- a/serials/checkexpiration.pl +++ b/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 ( { diff --git a/serials/create-numberpattern.pl b/serials/create-numberpattern.pl index 52b303d8a8..506a539d39 100755 --- a/serials/create-numberpattern.pl +++ b/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") { diff --git a/serials/lateissues-export.pl b/serials/lateissues-export.pl index e36e7347bb..7af3395d1b 100755 --- a/serials/lateissues-export.pl +++ b/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{}; diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl index 12f2ebc81b..40a8344633 100755 --- a/serials/routing-preview.pl +++ b/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; diff --git a/serials/routing.pl b/serials/routing.pl index 49aa9c3e39..6a237f6f6e 100755 --- a/serials/routing.pl +++ b/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'); diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index e36e50e0f8..a1979eda63 100755 --- a/serials/serials-collection.pl +++ b/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; diff --git a/serials/serials-home.pl b/serials/serials-home.pl index 3fc15d03fb..8f7cb15417 100755 --- a/serials/serials-home.pl +++ b/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( diff --git a/serials/serials-search.pl b/serials/serials-search.pl index 456a6cd431..a0723286ca 100755 --- a/serials/serials-search.pl +++ b/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') || ''; diff --git a/serials/showpredictionpattern.pl b/serials/showpredictionpattern.pl index 78fbea98a5..d6bcfc7918 100755 --- a/serials/showpredictionpattern.pl +++ b/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, diff --git a/serials/subscription-batchedit.pl b/serials/subscription-batchedit.pl index fcc3aa43b0..b06f68d6c3 100755 --- a/serials/subscription-batchedit.pl +++ b/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', diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl index 20042cb7a6..049da968cc 100755 --- a/serials/subscription-bib-search.pl +++ b/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; diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 40e4cd9709..ac4abcef18 100755 --- a/serials/subscription-detail.pl +++ b/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; diff --git a/serials/subscription-frequencies.pl b/serials/subscription-frequencies.pl index 51f84a207f..ad14c0cd48 100755 --- a/serials/subscription-frequencies.pl +++ b/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, diff --git a/serials/subscription-frequency.pl b/serials/subscription-frequency.pl index f7fe7c0bdb..2532f8f186 100755 --- a/serials/subscription-frequency.pl +++ b/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") { diff --git a/serials/subscription-history.pl b/serials/subscription-history.pl index 084468c564..4001a5de87 100755 --- a/serials/subscription-history.pl +++ b/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, diff --git a/serials/subscription-numberpattern.pl b/serials/subscription-numberpattern.pl index 26745f1c14..db17860721 100755 --- a/serials/subscription-numberpattern.pl +++ b/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") { diff --git a/serials/subscription-numberpatterns.pl b/serials/subscription-numberpatterns.pl index 673acbecca..99969b1256 100755 --- a/serials/subscription-numberpatterns.pl +++ b/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, diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl index 4589f97da4..94f0f506ba 100755 --- a/serials/subscription-renew.pl +++ b/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{}; diff --git a/serials/viewalerts.pl b/serials/viewalerts.pl index 23a0a7d95c..444d39c04f 100755 --- a/serials/viewalerts.pl +++ b/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', diff --git a/services/itemrecorddisplay.pl b/services/itemrecorddisplay.pl index 2c2832f955..79ee88eb04 100755 --- a/services/itemrecorddisplay.pl +++ b/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, diff --git a/suggestion/add_user_search.pl b/suggestion/add_user_search.pl index 25014475ed..c810bba376 100755 --- a/suggestion/add_user_search.pl +++ b/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; diff --git a/suggestion/suggester_search.pl b/suggestion/suggester_search.pl index bdbb281137..83e8a98674 100755 --- a/suggestion/suggester_search.pl +++ b/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; diff --git a/svc/article_request b/svc/article_request index 4a0a3f5189..e5c1759b2b 100755 --- a/svc/article_request +++ b/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' } ); diff --git a/svc/authentication b/svc/authentication index 89aa648b77..d375a11b01 100755 --- a/svc/authentication +++ b/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. diff --git a/svc/barcode b/svc/barcode index 3c362a433a..1f71d43ff3 100755 --- a/svc/barcode +++ b/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 => '*' } ); diff --git a/svc/bib b/svc/bib index 11cc260916..43fc6f6857 100755 --- a/svc/bib +++ b/svc/bib @@ -27,7 +27,7 @@ use C4::Biblio; use C4::Items; use XML::Simple; -my $query = new CGI; +my $query = CGI->new; binmode STDOUT, ':encoding(UTF-8)'; my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} ); diff --git a/svc/bib_framework b/svc/bib_framework index 1b640101c2..5566d9462a 100755 --- a/svc/bib_framework +++ b/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'); diff --git a/svc/bib_profile b/svc/bib_profile index 7203f0ce9d..46ebe37963 100755 --- a/svc/bib_profile +++ b/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'} ); diff --git a/svc/checkin b/svc/checkin index 2d392769b8..93fa49503e 100755 --- a/svc/checkin +++ b/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'), diff --git a/svc/checkout_notes b/svc/checkout_notes index 5ad972c99a..3abd3a8c57 100755 --- a/svc/checkout_notes +++ b/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; diff --git a/svc/checkouts b/svc/checkouts index 3e92e40198..2dce8f3daf 100755 --- a/svc/checkouts +++ b/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')); diff --git a/svc/club/cancel_enrollment b/svc/club/cancel_enrollment index b4f19b704c..d67d547c96 100755 --- a/svc/club/cancel_enrollment +++ b/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' } ); diff --git a/svc/club/delete b/svc/club/delete index e48062f511..636b0ed724 100755 --- a/svc/club/delete +++ b/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" ) { diff --git a/svc/club/enroll b/svc/club/enroll index e9f75441d0..014ca4c6d4 100755 --- a/svc/club/enroll +++ b/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' } ); diff --git a/svc/club/template/delete b/svc/club/template/delete index c15e47a032..b3700b6f2b 100755 --- a/svc/club/template/delete +++ b/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" ) { diff --git a/svc/cover_images b/svc/cover_images index 688067fca9..82e68f2ee5 100755 --- a/svc/cover_images +++ b/svc/cover_images @@ -25,7 +25,7 @@ use C4::Auth qw/check_cookie_auth/; use Koha::CoverImages; use JSON qw/to_json/; -my $input = new CGI; +my $input = CGI->new; my ( $auth_status, $sessionID ) = check_cookie_auth( diff --git a/svc/creator_batches b/svc/creator_batches index 28436e033e..743cf11ffd 100755 --- a/svc/creator_batches +++ b/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; diff --git a/svc/hold/resume b/svc/hold/resume index 497a4975fd..e14c6b1b39 100755 --- a/svc/hold/resume +++ b/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' } ); diff --git a/svc/hold/suspend b/svc/hold/suspend index 6a1bd86cfc..41b4130a39 100755 --- a/svc/hold/suspend +++ b/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' } ); diff --git a/svc/holds b/svc/holds index 37254b6407..1a2fc337cb 100755 --- a/svc/holds +++ b/svc/holds @@ -32,7 +32,7 @@ use Koha::Holds; use Koha::ItemTypes; use Koha::Libraries; -my $input = new CGI; +my $input = CGI->new; my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), diff --git a/svc/import_bib b/svc/import_bib index 3073463893..092d8fd295 100755 --- a/svc/import_bib +++ b/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'} ); diff --git a/svc/letters/preview b/svc/letters/preview index 11c3d1843a..17d7ad8751 100755 --- a/svc/letters/preview +++ b/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( { diff --git a/svc/mana/increment b/svc/mana/increment index 5b58496ac7..2b0197bdc0 100755 --- a/svc/mana/increment +++ b/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' ); diff --git a/svc/mana/search b/svc/mana/search index 16b8ab6fdf..84b356c738 100755 --- a/svc/mana/search +++ b/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; \ No newline at end of file +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/svc/mana/share b/svc/mana/share index 504b201046..367b5e7ffa 100755 --- a/svc/mana/share +++ b/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' ); diff --git a/svc/mana/use b/svc/mana/use index f08e9d12d5..6b6d6bc235 100755 --- a/svc/mana/use +++ b/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' ); diff --git a/svc/members/add_to_list b/svc/members/add_to_list index 55021d936a..62bcfced9e 100755 --- a/svc/members/add_to_list +++ b/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'), diff --git a/svc/members/search b/svc/members/search index 06201ef4ae..7cad0e8ab0 100755 --- a/svc/members/search +++ b/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'); diff --git a/svc/new_bib b/svc/new_bib index c41d298b2c..0aa04fc6cf 100755 --- a/svc/new_bib +++ b/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'} ); diff --git a/svc/problem_reports b/svc/problem_reports index 9fedc92ebe..9df283efb5 100755 --- a/svc/problem_reports +++ b/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; diff --git a/svc/renew b/svc/renew index 51b915b004..786ce57202 100755 --- a/svc/renew +++ b/svc/renew @@ -28,7 +28,7 @@ use C4::Auth qw(check_cookie_auth); use Koha::DateUtils qw(output_pref dt_from_string); -my $input = new CGI; +my $input = CGI->new; my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), diff --git a/svc/return_claims b/svc/return_claims index e1971ef9bf..a37ac217c7 100755 --- a/svc/return_claims +++ b/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') ); diff --git a/svc/virtualshelves/search b/svc/virtualshelves/search index 1bbbeba750..403da12c21 100755 --- a/svc/virtualshelves/search +++ b/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'); diff --git a/t/Auth_with_shibboleth.t b/t/Auth_with_shibboleth.t index 7a91a009c4..622fd161fd 100755 --- a/t/Auth_with_shibboleth.t +++ b/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 ); diff --git a/t/Calendar.t b/t/Calendar.t index b4b94bf9c3..151e8b1874 100755 --- a/t/Calendar.t +++ b/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 { diff --git a/t/Context.t b/t/Context.t index 3ecdb31724..cbdaaedf42 100755 --- a/t/Context.t +++ b/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 { diff --git a/t/DateUtils.t b/t/DateUtils.t index 5248997058..5b00c77124 100755 --- a/t/DateUtils.t +++ b/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 { diff --git a/t/Koha_MetadataRecord.t b/t/Koha_MetadataRecord.t index 0c2c53e304..3851bafd96 100755 --- a/t/Koha_MetadataRecord.t +++ b/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', diff --git a/t/Koha_Template_Plugin_Koha.t b/t/Koha_Template_Plugin_Koha.t index 5cba73b22c..13079a9753 100755 --- a/t/Koha_Template_Plugin_Koha.t +++ b/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'); diff --git a/t/Languages.t b/t/Languages.t index 14b84135bb..22b7fbb2a1 100755 --- a/t/Languages.t +++ b/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 { diff --git a/t/Output_JSONStream.t b/t/Output_JSONStream.t index 13702a65f6..bf7b1842c1 100755 --- a/t/Output_JSONStream.t +++ b/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."); diff --git a/t/Search/History.t b/t/Search/History.t index 2808e44149..030bca2ab6 100755 --- a/t/Search/History.t +++ b/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'); diff --git a/t/SuggestionEngine_AuthorityFile.t b/t/SuggestionEngine_AuthorityFile.t index eab5fb60e0..486e9034a9 100755 --- a/t/SuggestionEngine_AuthorityFile.t +++ b/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, diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t index c91c6017f9..c1074b204b 100755 --- a/t/db_dependent/00-strict.t +++ b/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 diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t index 12e11f5ede..49ada1e445 100755 --- a/t/db_dependent/Accounts.t +++ b/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, diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t index 61063662f3..a5937a9df3 100755 --- a/t/db_dependent/Acquisition.t +++ b/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 { diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t index b836aa1cd0..afe4ccaa81 100755 --- a/t/db_dependent/Auth.t +++ b/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( diff --git a/t/db_dependent/Auth_with_cas.t b/t/db_dependent/Auth_with_cas.t index 5b87605545..b6d9e21f96 100755 --- a/t/db_dependent/Auth_with_cas.t +++ b/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 diff --git a/t/db_dependent/AuthoritiesMarc.t b/t/db_dependent/AuthoritiesMarc.t index a24d917f50..e57f6124b1 100755 --- a/t/db_dependent/AuthoritiesMarc.t +++ b/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' => ''}; }); diff --git a/t/db_dependent/BackgroundJob.t b/t/db_dependent/BackgroundJob.t index 2a9e821495..011c775119 100755 --- a/t/db_dependent/BackgroundJob.t +++ b/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; diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 4d3db2491e..21d2c07105 100755 --- a/t/db_dependent/Biblio.t +++ b/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 { diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 183909ac00..a51349b186 100755 --- a/t/db_dependent/Circulation.t +++ b/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( diff --git a/t/db_dependent/Circulation/CheckIfIssuedToPatron.t b/t/db_dependent/Circulation/CheckIfIssuedToPatron.t index bc0d093855..2d67ffc022 100755 --- a/t/db_dependent/Circulation/CheckIfIssuedToPatron.t +++ b/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 } }); diff --git a/t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t b/t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t index 33d186ceb4..2698578260 100755 --- a/t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t +++ b/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'); diff --git a/t/db_dependent/Creators/Lib.t b/t/db_dependent/Creators/Lib.t index 4a86b5db0a..7d10b353b1 100755 --- a/t/db_dependent/Creators/Lib.t +++ b/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( diff --git a/t/db_dependent/FrameworkPlugin.t b/t/db_dependent/FrameworkPlugin.t index 345499d7f0..3a28df4055 100755 --- a/t/db_dependent/FrameworkPlugin.t +++ b/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 diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t index 3b599b67f0..36b93293ed 100755 --- a/t/db_dependent/ILSDI_Services.t +++ b/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 ); diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index efd3bb9628..53ac9b8d93 100755 --- a/t/db_dependent/Items.t +++ b/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, '', '', diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t index dd54fff601..90ffc351cf 100755 --- a/t/db_dependent/Koha/Account.t +++ b/t/db_dependent/Koha/Account.t @@ -972,7 +972,7 @@ subtest 'pay() renews items when appropriate' => sub { # Enable renewing upon fine payment t::lib::Mocks::mock_preference( 'RenewAccruingItemWhenPaid', 1 ); my $called = 0; - my $module = new Test::MockModule('C4::Circulation'); + my $module = Test::MockModule->new('C4::Circulation'); $module->mock('AddRenewal', sub { $called = 1; }); $module->mock('CanBookBeRenewed', sub { return 1; }); $account->pay( diff --git a/t/db_dependent/Koha/Account/Line.t b/t/db_dependent/Koha/Account/Line.t index fe0376388c..183134613f 100755 --- a/t/db_dependent/Koha/Account/Line.t +++ b/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; diff --git a/t/db_dependent/Koha/Patron/Messages.t b/t/db_dependent/Koha/Patron/Messages.t index e1da75324f..06de4d2934 100755 --- a/t/db_dependent/Koha/Patron/Messages.t +++ b/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}, diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t index 0f00008588..60c9a7324c 100755 --- a/t/db_dependent/Koha/Patrons.t +++ b/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'; }); diff --git a/t/db_dependent/Koha/Z3950Responder/GenericSession.t b/t/db_dependent/Koha/Z3950Responder/GenericSession.t index 33dc662827..dfcad7a770 100755 --- a/t/db_dependent/Koha/Z3950Responder/GenericSession.t +++ b/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'); diff --git a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t b/t/db_dependent/Koha/Z3950Responder/ZebraSession.t index 3de0d2e838..6088169d47 100755 --- a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t +++ b/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'); diff --git a/t/db_dependent/Members/GetAllIssues.t b/t/db_dependent/Members/GetAllIssues.t index 679cd45352..45c3682d4e 100755 --- a/t/db_dependent/Members/GetAllIssues.t +++ b/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(); diff --git a/t/db_dependent/Members/IssueSlip.t b/t/db_dependent/Members/IssueSlip.t index 0ec870d18e..95867690a1 100755 --- a/t/db_dependent/Members/IssueSlip.t +++ b/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; diff --git a/t/db_dependent/Record.t b/t/db_dependent/Record.t index 613e5ea7ea..22fcdb3de0 100755 --- a/t/db_dependent/Record.t +++ b/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; diff --git a/t/db_dependent/Reserves/GetReserveFee.t b/t/db_dependent/Reserves/GetReserveFee.t index cd9bdfac9e..bb9b4dacba 100755 --- a/t/db_dependent/Reserves/GetReserveFee.t +++ b/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} }; }); diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index c8cc3d7f3b..6a520bc6f8 100755 --- a/t/db_dependent/Search.t +++ b/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'); diff --git a/t/db_dependent/Search/History.t b/t/db_dependent/Search/History.t index c1eaa383f2..db3a103858 100755 --- a/t/db_dependent/Search/History.t +++ b/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'); diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t index 53c697e2d0..ea9e5a972a 100755 --- a/t/db_dependent/Serials.t +++ b/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" ), diff --git a/t/db_dependent/SuggestionEngine_ExplodedTerms.t b/t/db_dependent/SuggestionEngine_ExplodedTerms.t index bac1b41c2e..65308fc086 100755 --- a/t/db_dependent/SuggestionEngine_ExplodedTerms.t +++ b/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) = @_; diff --git a/t/db_dependent/TablesSettings.t b/t/db_dependent/TablesSettings.t index eda462d817..97121093b4 100755 --- a/t/db_dependent/TablesSettings.t +++ b/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 { diff --git a/t/db_dependent/Template/Plugin/KohaDates.t b/t/db_dependent/Template/Plugin/KohaDates.t index 53449d8795..e40c79565e 100755 --- a/t/db_dependent/Template/Plugin/KohaDates.t +++ b/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(); diff --git a/t/db_dependent/XISBN.t b/t/db_dependent/XISBN.t index 4cc939d28a..0689273df5 100755 --- a/t/db_dependent/XISBN.t +++ b/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 ); diff --git a/t/db_dependent/api/v1/checkouts.t b/t/db_dependent/api/v1/checkouts.t index 5f7f4ed2fe..ee47e1ef47 100755 --- a/t/db_dependent/api/v1/checkouts.t +++ b/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" ) diff --git a/t/lib/Mocks.pm b/t/lib/Mocks.pm index df2d587b07..35aa8f900f 100644 --- a/t/lib/Mocks.pm +++ b/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); diff --git a/tools/access_files.pl b/tools/access_files.pl index 73a0ae47dc..5ead5814aa 100755 --- a/tools/access_files.pl +++ b/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'); diff --git a/tools/ajax-inventory.pl b/tools/ajax-inventory.pl index 2aeda40847..72175cfb7a 100755 --- a/tools/ajax-inventory.pl +++ b/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' }); diff --git a/tools/automatic_item_modification_by_age.pl b/tools/automatic_item_modification_by_age.pl index cd6a512e6f..ae9bcec192 100755 --- a/tools/automatic_item_modification_by_age.pl +++ b/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( diff --git a/tools/batchMod.pl b/tools/batchMod.pl index dc170a6bdb..dca2e41ad4 100755 --- a/tools/batchMod.pl +++ b/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'); diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index d07adf1432..ea87d8b6c8 100755 --- a/tools/batch_delete_records.pl +++ b/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'; diff --git a/tools/batch_extend_due_dates.pl b/tools/batch_extend_due_dates.pl index cae338c07e..77c80237ab 100755 --- a/tools/batch_extend_due_dates.pl +++ b/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'); diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl index d65883aff2..d118120768 100755 --- a/tools/batch_record_modification.pl +++ b/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'; diff --git a/tools/batch_records_ajax.pl b/tools/batch_records_ajax.pl index 8bfb4ab242..4ddb0f5369 100755 --- a/tools/batch_records_ajax.pl +++ b/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/; diff --git a/tools/cleanborrowers.pl b/tools/cleanborrowers.pl index 354c3159a9..c323eeb908 100755 --- a/tools/cleanborrowers.pl +++ b/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 diff --git a/tools/copy-holidays.pl b/tools/copy-holidays.pl index 6e35451226..e11353a09d 100755 --- a/tools/copy-holidays.pl +++ b/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'); diff --git a/tools/csv-profiles.pl b/tools/csv-profiles.pl index 27ee6a8cd6..e6a7bdaa0d 100755 --- a/tools/csv-profiles.pl +++ b/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; diff --git a/tools/exceptionHolidays.pl b/tools/exceptionHolidays.pl index 7095157617..6894074459 100755 --- a/tools/exceptionHolidays.pl +++ b/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'); diff --git a/tools/export.pl b/tools/export.pl index 5b252be05e..6d677abf5b 100755 --- a/tools/export.pl +++ b/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"); diff --git a/tools/holidays.pl b/tools/holidays.pl index 2a9f02dfb2..252882dbef 100755 --- a/tools/holidays.pl +++ b/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 diff --git a/tools/koha-news.pl b/tools/koha-news.pl index 821cd4bb15..2b62aaf057 100755 --- a/tools/koha-news.pl +++ b/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'); diff --git a/tools/letter.pl b/tools/letter.pl index 7af71dda2a..d6740a80ed 100755 --- a/tools/letter.pl +++ b/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'); diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl index 04c62e267c..32664c6e09 100755 --- a/tools/manage-marc-import.pl +++ b/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'); diff --git a/tools/marc_modification_templates.pl b/tools/marc_modification_templates.pl index aa31611710..27ace821e8 100755 --- a/tools/marc_modification_templates.pl +++ b/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'); diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl index eed17ea6eb..5a0193f75b 100755 --- a/tools/modborrowers.pl +++ b/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", diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index 7644006a2c..c402dfdf7f 100755 --- a/tools/newHolidays.pl +++ b/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'); diff --git a/tools/overduerules.pl b/tools/overduerules.pl index 2ec829162f..293c51c78a 100755 --- a/tools/overduerules.pl +++ b/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 } } ); diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index 334ee3e1bd..31dec5193e 100755 --- a/tools/picture-upload.pl +++ b/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 diff --git a/tools/problem-reports.pl b/tools/problem-reports.pl index c9a1afd222..0b07511cf3 100755 --- a/tools/problem-reports.pl +++ b/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( { diff --git a/tools/quotes-upload.pl b/tools/quotes-upload.pl index a065da0943..8ca4583471 100755 --- a/tools/quotes-upload.pl +++ b/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( { diff --git a/tools/quotes.pl b/tools/quotes.pl index 6ac4371542..a10e5747f7 100755 --- a/tools/quotes.pl +++ b/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( { diff --git a/tools/quotes/quotes-upload_ajax.pl b/tools/quotes/quotes-upload_ajax.pl index 7a429abc46..c988e7c540 100755 --- a/tools/quotes/quotes-upload_ajax.pl +++ b/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' } ); diff --git a/tools/scheduler.pl b/tools/scheduler.pl index 05778e21cc..295a04bfdc 100755 --- a/tools/scheduler.pl +++ b/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') ) { diff --git a/tools/showdiffmarc.pl b/tools/showdiffmarc.pl index 48f622aab5..c39d2ad91b 100755 --- a/tools/showdiffmarc.pl +++ b/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'); diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl index 9684fabeee..0ea436351f 100755 --- a/tools/stage-marc-import.pl +++ b/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'); diff --git a/tools/stockrotation.pl b/tools/stockrotation.pl index 8317617a5a..18891fa3db 100755 --- a/tools/stockrotation.pl +++ b/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 diff --git a/tools/tools-home.pl b/tools/tools-home.pl index 375cc09e76..69fc092ae1 100755 --- a/tools/tools-home.pl +++ b/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", diff --git a/tools/upload-cover-image.pl b/tools/upload-cover-image.pl index 6c19de1e99..82b0bb50b1 100755 --- a/tools/upload-cover-image.pl +++ b/tools/upload-cover-image.pl @@ -53,7 +53,7 @@ use C4::Log; my $debug = 1; -my $input = new CGI; +my $input = CGI->new; my $fileID = $input->param('uploadedfileid'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/tools/viewlog.pl b/tools/viewlog.pl index bf7d1d663b..dec1259019 100755 --- a/tools/viewlog.pl +++ b/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'); diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl index 8d43ab9439..68e7da5035 100755 --- a/virtualshelves/addbybiblionumber.pl +++ b/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'); diff --git a/virtualshelves/downloadshelf.pl b/virtualshelves/downloadshelf.pl index 6d788d91f8..c6cb31f496 100755 --- a/virtualshelves/downloadshelf.pl +++ b/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 ( { diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index e219e9a23a..d233eb1355 100755 --- a/virtualshelves/shelves.pl +++ b/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", diff --git a/xt/author/valid-templates.t b/xt/author/valid-templates.t index 9d195373e0..3724d03575 100755 --- a/xt/author/valid-templates.t +++ b/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 ) { -- 2.39.5