From be9d8dfc494374480f45a7fec1b10e82da9db42e 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 --- .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/branches.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 +- basket/sendbasket.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-sendbasket.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/Letters.t | 2 +- 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/sendshelf.pl | 2 +- virtualshelves/shelves.pl | 2 +- xt/author/valid-templates.t | 2 +- 514 files changed, 595 insertions(+), 595 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 6889c2532c..420899064c 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1771,7 +1771,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 bd25837c36..d2b7d1a1be 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -226,7 +226,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 109cda8950..2780ea72a6 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++; } @@ -429,7 +429,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} ); @@ -567,7 +567,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 8c621e8576..4b46164677 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -640,7 +640,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 ddc923d353..82d1e209a8 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( @@ -282,7 +282,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 f4a75818dd..825d8d5abe 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 a9448e483b..1a22a14488 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 57bc67a665..46248fa4ae 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 066db24e44..c88d4ff27d 100755 --- a/about.pl +++ b/about.pl @@ -56,7 +56,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", @@ -203,7 +203,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 d2481c6237..871eca1b2c 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 abbea1e0c2..d18e4668d7 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 1caee77950..faaa1d8e89 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 92f3614676..0f20d40f5b 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 5a49f77114..63c3de8bfd 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 1e6fde50ad..c0e57fd21e 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 bb5086bb4d..467837a91f 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 4981b83e07..aed365ab3a 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 eb975da035..3be879db02 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 1f097d828f..b333f3185c 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 ce674e437b..848442aca0 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 26717e99fe..a22b353699 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 397535428c..9225760b61 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 565d6b5c5a..0a9f08e0e6 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 d0bd672e44..779d80af27 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 cf2e7ee945..063ad0e4ac 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 51151af7f2..d93bbc5d3f 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 8f095302dd..2c2267a644 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 d73f61b6d3..d2570e5408 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 8d094d8ffe..6019d17e02 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 5b21612e81..0abec7e7f5 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 083429a338..40b1cb56dd 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 bd98a71001..b9e39e20c9 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 ba3989aa51..427df5f743 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 f2516d71cf..6275b20dcc 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 f6d609fb45..88af4d628a 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 555ddc9ef6..ab61195884 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 aa2998d91a..e2a48e607f 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 684e0e2159..08b1c01f43 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 e4f1d8d139..edf0bdc443 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 0ba3d25fef..1785229672 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 1ee2e4cb67..921ea89559 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 866e5f7407..1005d0c8ef 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 b66cbff017..55d08e63fa 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 8717556086..fde096cfff 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 c864db792a..805cb30593 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 0c30e95774..a00d8030e9 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/branches.pl b/admin/branches.pl index b609c20d83..d190ca845a 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -28,7 +28,7 @@ use Koha::Patrons; use Koha::Items; use Koha::Libraries; -my $input = new CGI; +my $input = CGI->new; my $branchcode = $input->param('branchcode'); my $categorycode = $input->param('categorycode'); my $op = $input->param('op') || 'list'; diff --git a/admin/categories.pl b/admin/categories.pl index f9144e7ced..899f128213 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 0fdedfbfc9..47c3050108 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 6da8d28668..1e80cc6cc6 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 3f5f61b6b4..a5200b556e 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 0688852246..d13a096424 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 697db41e45..c8588d6d0c 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 cefc11ede8..45734a770d 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 51d1d56d75..89d12f7fbc 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 75baff90bb..bb808cd91d 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 fe09d0b839..5ee88aa62a 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 6cc0a2f9ec..a278a66b06 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 9ea89a5b53..9644d3d766 100755 --- a/admin/item_circulation_alerts.pl +++ b/admin/item_circulation_alerts.pl @@ -112,7 +112,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 f6ea777ec3..6ff1daee1b 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 ed0ff8577a..e8c86bc27d 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 7b13dac7b7..09fb629e40 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 0f987cfdf5..c0ce2cf7f6 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 dcf71c87a3..7fdba53fc0 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 f8bc553c05..805deaca05 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 0dce186c6f..370ded355f 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -60,7 +60,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 d6b7d14b88..681467d544 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 a9f85c63db..72bc2d32cf 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 f6477943ab..dbf7f405ea 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 0c75680b36..34e10215f8 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 8aab052be4..f369d7df15 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 3b1676e0e2..83c915b7e3 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -216,7 +216,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; @@ -295,7 +295,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 57a9656f9c..1af2f9fee0 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 3c76aba96d..612289b590 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 16efa374d6..90f9c03618 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 80d284c668..0df427f069 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 32a5c93782..6ef2ddbecf 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 beea9d2877..c6f82939e8 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 58df2655b8..392feea6a2 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 d2e85c6014..bee57f9207 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 208f076a13..427909c7e3 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 76748aa66a..b9c4823567 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 e422cafb36..1b0d0ef2ae 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -551,7 +551,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 993615dfdb..30f45d4047 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 4936b176bf..e0ef9f3777 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 ca1654461d..31789c95f8 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 fbb675eec0..0743671008 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 37043bb5b5..a900a20a51 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 487e9c626a..449f448752 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/basket/sendbasket.pl b/basket/sendbasket.pl index 2076c425fa..90aa24d14a 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -32,7 +32,7 @@ use C4::Templates (); use Koha::Email; use Koha::Token; -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 9f333e1b33..ccbb956a96 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -52,7 +52,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 44bc8d0801..5c7a4902a4 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 ac8a202dad..5ea21af71c 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 d1fcba72d2..2214163fa8 100755 --- a/catalogue/image.pl +++ b/catalogue/image.pl @@ -32,7 +32,7 @@ use C4::Images; $| = 1; my $DEBUG = 0; -my $data = new CGI; +my $data = CGI->new; my $imagenumber; =head1 NAME diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl index 67ded03c46..2db25051d1 100755 --- a/catalogue/imageviewer.pl +++ b/catalogue/imageviewer.pl @@ -31,7 +31,7 @@ use C4::Acquisition qw(GetOrdersByBiblionumber); use Koha::Biblios; use Koha::Patrons; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "catalogue/imageviewer.tt", diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl index 0c50dcbb88..ed3b473bb7 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 90eae81169..2497ea7ca4 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 2c68bfe35f..a0b78ce6b5 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 446a679fba..9eb2f01464 100755 --- a/catalogue/labeledMARCdetail.pl +++ b/catalogue/labeledMARCdetail.pl @@ -34,7 +34,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 a736c30c8c..a0b6a26aa0 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 f6714e11c6..6c13c729c6 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 6e5d929413..0a48b6c5ee 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 e61801171e..09f93a04bb 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 ab57923202..a5f5283a95 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 f8295a0314..d9098ea112 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 7d48842c6a..52f1a85c03 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -683,7 +683,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 9f6fec7f05..3f2d5825f6 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 130ff0a3f2..376391dba4 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -162,7 +162,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'); } @@ -376,7 +376,7 @@ sub removeFieldsForPrefill { } -my $input = new CGI; +my $input = CGI->new; my $error = $input->param('error'); my $biblionumber = $input->param('biblionumber'); my $itemnumber = $input->param('itemnumber'); diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index 146e88e598..38740fed10 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'); @@ -208,7 +208,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 f6602a0e1b..ecc28c099c 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 259a903817..2f495e9297 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 67a6844c43..8c2668a83d 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 4330214c25..07eeae2f02 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 d0c2805250..662832f37d 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 0d869464cc..ab745ca71e 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 e696d77ed7..eee2dc50a7 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 4ed1fb3c34..4c7049f0c7 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 324d15e65b..9515bac2e1 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 1d08a03f84..08b40de01e 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 5ec80c8f15..6f2409493c 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 8889431943..bc50abc5df 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 a0cb0ef1ea..b1917a1959 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 43ad061226..e39162e8bb 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 c1d8f6cbd3..7666ff3709 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 96cea5a66f..fb259d6a1a 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 ac5fc1e70e..f6261b3023 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 22c93f7130..eedc036f4c 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 c3f1d2a4b3..a8400f996f 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 7c0877bff8..e6a5e8a2ec 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 77117934d0..9fd1599657 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 e1bce3c3f1..4fd3251d03 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 8ffbeaae72..d44310c9f3 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 b9123f6c01..70c6a59291 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 f7dbbc23c6..562a3b9fdf 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 abefc095e5..94151c5c85 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 01ef24d19f..200f772a7a 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 dabac245fa..f2d31e2f02 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 4429e236a8..a880d221fe 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 f50da65a5a..137a88e6c8 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 bc836277af..2a834e4694 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 11f4606fb9..53181840e9 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 33763d8ee9..fd1d10d1a0 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 e97991bfa7..a9e33de679 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 af1eb62337..f2fd7d93f2 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 0a07d4f419..ec7b56821d 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 5a87cdae94..2c1969d6a6 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 cef6988e88..3a1ca57793 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 041438160a..dc26236d6e 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 5d10d23c11..3c689f9b0e 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 97c01851b1..be0bf38bc0 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 83c74e9c25..7ac367a252 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 e14135abb2..9249401d3a 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 07e34caf1d..038f00ca4a 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 ebd2fce6f5..099033e7f3 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 d4afc5eede..50853ea038 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 b5b361ca5c..99cb530b6c 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 fdade75a4e..02da20bd63 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 762b6a25a9..7cece7887e 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 2ef72ed572..664ac7027c 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 dcb9d12c88..596d5a29ce 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 d1e81ea14b..5afae65865 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 ff234f6baa..6d4cdb83e3 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -33,7 +33,7 @@ use Koha::Reviews; use Koha::ArticleRequests; use Koha::ProblemReports; -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 1ac40a0210..d11ed45bf6 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 ffbd40d329..9accb6d96a 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 a1ca911724..f55b853033 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 8593a76885..d9d54e5205 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 f4a70236b4..43976a1bf9 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 de21e498fb..fec28726f4 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 0287047740..2472109fd4 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 911fc3801b..c43127c491 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 8ed7ffd72c..860d59bb9e 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 c39a323cae..eb84e64bc5 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -38,7 +38,7 @@ use Koha::Patrons; 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 14bdd5ca63..dde5a4f465 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 e9d5f54d9f..508c80e712 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 11cbc41a32..a272c9da05 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 ec6c08c4c5..9312a70e6e 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 73a370dc81..ec7e4a9ed0 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 6f9b370a3e..9baa73df7d 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 84019f4e20..55bb072457 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 b4ea721a10..f33d6cdb86 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 1d4d2e9afa..aeef91191e 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 eb42beec08..4903cb6d8d 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 5c56514a96..53d0c5df73 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 38950e3647..21647b315b 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 f27083e18d..0d7ac4f42d 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 2efbeb788b..e51f2673de 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 392b9e7f00..d1270677bc 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 3bf9dd64b6..78cbfed533 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 42cfe27d80..2048b3b0a5 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..35d6aec362 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 701d8cfb69..691e81c431 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 91b395ed6e..5e679cf4de 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 cbf51c3458..f6d19d6614 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 bd6316ab31..ad36987ea9 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 c5a149dfff..8bea25e9f2 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 67b88f8064..e34fdcdf0a 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 ef9f75345d..9c4b6a4a7e 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 51ece6cd2e..edec9f1f93 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 ac6e910ebd..fea1d34bda 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 fb1ae4db68..ab98d411fe 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 f81edf41ce..4ab7fe874e 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 7a94e81d52..53129ad68e 100755 --- a/opac/opac-image.pl +++ b/opac/opac-image.pl @@ -32,7 +32,7 @@ use C4::Images; $| = 1; my $DEBUG = 0; -my $data = new CGI; +my $data = CGI->new; my $imagenumber; =head1 NAME diff --git a/opac/opac-imageviewer.pl b/opac/opac-imageviewer.pl index 09be474226..0949961200 100755 --- a/opac/opac-imageviewer.pl +++ b/opac/opac-imageviewer.pl @@ -27,7 +27,7 @@ use C4::Images; use Koha::Biblios; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "opac-imageviewer.tt", diff --git a/opac/opac-issue-note.pl b/opac/opac-issue-note.pl index 3e7f0a1111..0a5dfaf085 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 de5ad8e945..45b3505620 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 3825403029..f75b103599 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -44,7 +44,7 @@ use Koha::Patron::Modifications; use Koha::Patrons; 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 debeb30f6d..ff11a250c2 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 e86cd43b34..2fda4de2f7 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 bff0214a9f..7ef318666e 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 a695165b56..f292a71706 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 789def3b0a..41ddd4da2b 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 7d7f445c39..f859ad13e2 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 c13faacaa3..d515d462e6 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 d408d5c5ae..0c52d48aa1 100755 --- a/opac/opac-registration-verify.pl +++ b/opac/opac-registration-verify.pl @@ -28,7 +28,7 @@ use Koha::Patrons; use Koha::Patron::Consent; use Koha::Patron::Modifications; -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 cb9043d9ad..9cb3d68b09 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 e6ea45cdd8..addcdce8c2 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 2a11ad48e5..3c30601524 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 8c806e905c..7a3d206dfe 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 2f2043e77c..1eb82fbb98 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -71,7 +71,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-sendbasket.pl b/opac/opac-sendbasket.pl index d5e6c7fdfd..22536fe548 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -36,7 +36,7 @@ use Koha::Email; use Koha::Patrons; use Koha::Token; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( { diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl index acbc27e6d2..87c6755a10 100755 --- a/opac/opac-sendshelf.pl +++ b/opac/opac-sendshelf.pl @@ -35,7 +35,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 e2ac9aafc8..57641aaf8a 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 74e3079dfe..504bacfa49 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 6d967c8803..2f2dc3cf83 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 84d2a6cb67..5cae5dc8c1 100755 --- a/opac/sci/sci-main.pl +++ b/opac/sci/sci-main.pl @@ -26,7 +26,7 @@ use C4::Output; 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 83a37aca46..82476b0c19 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 956d882448..2b9f288b39 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 f9d1aef19c..4f2408a80e 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 71bfa3814a..083da29ea0 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 a5cdf2b74c..c42adef2d7 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 658f92de8f..8ad9a5d302 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 c8eca5fa74..7cc96c1b3c 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 c38ce43306..c2ca174b4f 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 236706e1bc..5b5a1ae7ef 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 3c7612992d..a58eb7d741 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 d84fb19b13..1c0bf0c0ca 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 3712a6fd82..9524d7e401 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 cb8e7a5b06..201ba5c7bb 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 42503fe196..6bd3f444fc 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 4ade2c1995..fc2a8e6f5b 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 e3335ab4bd..4752723564 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 39334b26a5..abaa5ff64f 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 6ad52abccf..9a9ce813c2 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 54bdf840b3..6464be41b8 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 eb56a05b31..262239b403 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 63bdd6db1f..970a3838fd 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 31ba73aa8b..86136411fd 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 6a95f01b56..3a52ed1538 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 98390ac52d..e8f0ae90ae 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 604258e9c9..a99be0a147 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 7713b14d1b..948693dcc8 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 536a76b266..5012968940 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 bca95ce0bd..ba28d6ee7c 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 fa2817f1c7..b86177ff91 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 baa4e69e1b..bc6dc85bfa 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 cd5fbe4b95..7a64fc6549 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 2ff27e8283..ab4e62be21 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 4e797c2d25..00815aac5b 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 6bcc996466..1dc298510c 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 1d22561b19..930da60fec 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 a27c404292..518079ffb1 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 6c134efe3a..8227fc95ab 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 e53e06011e..5a6d0594ac 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 26e40dd685..efd480dcf4 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 6dc51f1349..55b2ab73bf 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 4c79328f3f..19f6404d0e 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 c8ed8ed03b..c70163c2df 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 acf4586568..ab4bca4900 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 49b09b3113..474b2ccced 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 ede6c89a7b..7d616753cc 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 bc25c69e58..0b9f7c589c 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 6cb177acbe..33990ed7d9 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 ae88841444..41d964d1af 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 2bf7eb3918..e647966466 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 8d893f66de..9ffe69e7eb 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 d4b266576c..100c567250 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 cf59cb8b7d..f3b82c97a8 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 fe9347eb03..2aceffe0b3 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 4a3f7b2a64..e432ab3db5 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 fa114a18e2..e10035cde0 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 743fe512f6..f62cf0be19 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 b7137bdbc7..ac294cddf2 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 f3c6d572d3..ba411b8631 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 8934cf1c06..ec81708697 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 2bcce3a077..c6255ec3bc 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 1889f9a5b6..067ade8d72 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 39539e1172..fd7a16d004 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 fa470b3a2a..5398382495 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 590a243dc8..1e3574ffb2 100755 --- a/svc/cover_images +++ b/svc/cover_images @@ -25,7 +25,7 @@ use C4::Auth qw/check_cookie_auth/; use C4::Images; use JSON qw/to_json/; -my $input = new CGI; +my $input = CGI->new; my ( $auth_status, $sessionID ) = check_cookie_auth( 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 2d0c73faeb..de06cf87cd 100644 --- 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 836e6b2adb..d4bddc231e 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'), @@ -79,4 +79,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 76c5749f22..bcb594e13c 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 055bd34605..fae5769169 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 100644 --- 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 b3dc02ffaf..b10a36fc7d 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 c2dbbfddff..43c3f49349 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 100644 --- 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 100644 --- 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 100644 --- 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 56665ae7cf..39e073f7bf 100644 --- 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 912a451e25..f7a13c3a35 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 e149aec867..3e7a1e60ed 100644 --- 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 100644 --- 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 e9f28b55d9..7232093a11 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -3564,7 +3564,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 100644 --- 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 100644 --- 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 288257e7f8..1696ffc1f1 100644 --- a/t/db_dependent/Creators/Lib.t +++ b/t/db_dependent/Creators/Lib.t @@ -1451,7 +1451,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 100644 --- 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 3f253149e3..54ca2c36c2 100644 --- 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' ); @@ -329,7 +329,7 @@ subtest 'Holds test' => sub { } }); - my $query = new CGI; + my $query = CGI->new; $query->param( 'patron_id', $patron->{borrowernumber}); $query->param( 'bib_id', $biblio->{biblionumber}); @@ -355,7 +355,7 @@ subtest 'Holds test' => sub { source => 'Biblio', }); - $query = new CGI; + $query = CGI->new; $query->param( 'patron_id', $patron->{borrowernumber}); $query->param( 'bib_id', $biblio_with_no_item->{biblionumber}); @@ -393,7 +393,7 @@ subtest 'Holds test' => sub { } ); - $query = new CGI; + $query = CGI->new; $query->param( 'patron_id', $patron->{borrowernumber}); $query->param( 'bib_id', $biblio2->{biblionumber}); $query->param( 'item_id', $item2->{itemnumber}); @@ -441,7 +441,7 @@ subtest 'Holds test' => sub { } ); - $query = new CGI; + $query = CGI->new; $query->param( 'patron_id', $patron->{borrowernumber}); $query->param( 'bib_id', $biblio3->{biblionumber}); $query->param( 'item_id', $item4->{itemnumber}); @@ -520,7 +520,7 @@ subtest 'Holds test for branch transfer limits' => sub { itemtype => $item->{itype}, })->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', $biblio->{biblionumber}); @@ -580,7 +580,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); @@ -643,7 +643,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 => $biblio->{biblionumber}); @@ -666,7 +666,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_object( { class => 'Koha::Items' } ); $cgi->param( patron_id => $patron->borrowernumber ); @@ -714,7 +714,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); @@ -724,7 +724,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 61a691b458..fc25894b41 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -566,9 +566,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} @@ -992,7 +992,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, '', '', @@ -1009,7 +1009,7 @@ subtest 'ModItemFromMarc' => sub { my $item = Koha::Items->find($itemnumber); is( $item->itemlost, 1, 'itemlost picked from the item marc'); - 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 ebab6b0ae5..f115ade66e 100755 --- a/t/db_dependent/Koha/Account.t +++ b/t/db_dependent/Koha/Account.t @@ -952,7 +952,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 0b35a590c6..e074c61fbf 100644 --- a/t/db_dependent/Koha/Account/Line.t +++ b/t/db_dependent/Koha/Account/Line.t @@ -285,7 +285,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' }); @@ -413,7 +413,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 1260185ebf..6e506dd77f 100644 --- 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 4f434adc3c..912b835a74 100644 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -354,7 +354,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 100644 --- 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 100644 --- 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/Letters.t b/t/db_dependent/Letters.t index 2389bf33d1..4eb804e111 100644 --- a/t/db_dependent/Letters.t +++ b/t/db_dependent/Letters.t @@ -25,7 +25,7 @@ use Test::Warn; use MARC::Record; my %mail; -my $module = new Test::MockModule('Mail::Sendmail'); +my $module = Test::MockModule->new('Mail::Sendmail'); $module->mock( 'sendmail', sub { diff --git a/t/db_dependent/Members/GetAllIssues.t b/t/db_dependent/Members/GetAllIssues.t index 679cd45352..45c3682d4e 100644 --- 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 100644 --- 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 4645c49901..f2fd513ebe 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 024e9aba29..78700cfd83 100644 --- 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', }, @@ -694,7 +694,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) { @@ -826,7 +826,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 2e3aa1fd1e..6b136149e1 100644 --- 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 100644 --- 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 100644 --- 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 100644 --- 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 100644 --- 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 3ca89afad5..3387ac8e17 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 12a1c006e1..01555ee419 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 fe40f84c7e..9b84c1b209 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -45,7 +45,7 @@ use Koha::Items; use Koha::ItemTypes; use Koha::Patrons; -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 1dccbae99f..ca438b13d8 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 572e57bdc9..3ec555c3b3 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 ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl index 0203b0bb69..64331c51a5 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -34,7 +34,7 @@ use Koha::Biblios; 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 3040b1d777..1ff1f0c83f 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 dd09677676..06365f0632 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 5ef531ae90..1294d31f42 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 207439befc..482653dea7 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 b90a8c4521..52ee703035 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 a0e2d373e4..c8925f3e4b 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 6f9405d281..cf9f52a770 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 f88f7d5de0..135153bf1e 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 589059f429..7b8392fa89 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 f13e52447b..76f6112a8e 100755 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -30,7 +30,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 ecfac84795..bf81cc0179 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 c114a86a32..30daaebd86 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 833942217f..349b15304b 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 4781d2965a..c18da38c16 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 3cf6b7e7fc..f81b6dd797 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 cfd981163c..0839ff0b2b 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 78424bbc6f..1d5089540a 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 da23c83cc7..fddb932592 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 99fde6391d..d5748f77ae 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 1d2922c112..4cd986be6b 100755 --- a/tools/upload-cover-image.pl +++ b/tools/upload-cover-image.pl @@ -51,7 +51,7 @@ use C4::Log; my $debug = 1; -my $input = new CGI; +my $input = CGI->new; my $fileID = $input->param('uploadedfileid'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 2ccd472f0e..564ee03890 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 a60c88fd53..eff6c30918 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 b8b37fb4a2..2b6f580e67 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/sendshelf.pl b/virtualshelves/sendshelf.pl index 0103df3e71..66595b1194 100755 --- a/virtualshelves/sendshelf.pl +++ b/virtualshelves/sendshelf.pl @@ -33,7 +33,7 @@ use C4::Output; use Koha::Email; use Koha::Virtualshelves; -my $query = new CGI; +my $query = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index aeb65c9496..3b28b7ebcc 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 100644 --- 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.20.1