From eda5e07bbef3c37526d8f1e09f5c25c18429488a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 21 May 2021 18:39:10 +0200 Subject: [PATCH] Bug 17600: after perlimports pm Was missing the pm find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \; TODO: Restore permissions --- C4/Accounts.pm | 3 -- C4/Acquisition.pm | 14 +++--- C4/Auth.pm | 19 ++++---- C4/Auth_with_cas.pm | 3 +- C4/Auth_with_ldap.pm | 5 +-- C4/Auth_with_shibboleth.pm | 5 +-- C4/AuthoritiesMarc.pm | 5 +-- C4/AuthoritiesMarc/MARC21.pm | 1 - C4/BackgroundJob.pm | 2 +- C4/Barcodes.pm | 2 +- C4/Barcodes/EAN13.pm | 4 +- C4/Barcodes/annual.pm | 4 +- C4/Barcodes/hbyymmincr.pm | 2 +- C4/Biblio.pm | 25 ++++++----- C4/Breeding.pm | 4 +- C4/Budgets.pm | 2 +- C4/Calendar.pm | 4 +- C4/Charset.pm | 6 +-- C4/Circulation.pm | 43 ++++++++----------- C4/ClassSortRoutine.pm | 1 - C4/ClassSplitRoutine.pm | 1 - C4/Context.pm | 11 +++-- C4/CourseReserves.pm | 2 +- C4/Creators.pm | 18 +++++++- C4/Creators/Lib.pm | 2 +- C4/Creators/PDF.pm | 37 ++++++++++++++-- C4/Creators/Profile.pm | 3 +- C4/Creators/Template.pm | 4 +- C4/External/BakerTaylor.pm | 5 +-- C4/External/OverDrive.pm | 6 +-- C4/External/Syndetics.pm | 9 ++-- C4/Heading.pm | 4 +- C4/Heading/MARC21.pm | 1 - C4/Heading/UNIMARC.pm | 1 - C4/HoldsQueue.pm | 9 ++-- C4/ILSDI/Services.pm | 8 ++-- C4/ImportBatch.pm | 15 +++++-- C4/ImportExportFramework.pm | 10 ++--- C4/InstallAuth.pm | 4 +- C4/Installer.pm | 6 +-- C4/Installer/PerlModules.pm | 3 +- C4/Installer/UpgradeBackup.pm | 10 ++--- C4/ItemCirculationAlertPreference.pm | 2 +- C4/Items.pm | 16 +++---- C4/Koha.pm | 4 +- C4/Labels/Label.pm | 7 ++- C4/Languages.pm | 4 +- C4/Letters.pm | 14 +++--- C4/Linker.pm | 1 - C4/Linker/Default.pm | 1 - C4/Linker/FirstMatch.pm | 1 - C4/Linker/LastMatch.pm | 1 - C4/Log.pm | 1 - C4/MarcModificationTemplates.pm | 13 +++++- C4/Matcher.pm | 9 +++- C4/Members.pm | 13 ++---- C4/Message.pm | 6 +-- C4/NewsChannels.pm | 3 +- C4/Output.pm | 2 +- C4/Output/JSONStream.pm | 2 +- C4/Overdues.pm | 12 +++--- C4/Patroncards.pm | 11 ++++- C4/Patroncards/Patroncard.pm | 10 +++-- C4/Record.pm | 14 +++--- C4/Reports/Guided.pm | 7 ++- C4/Reserves.pm | 16 +++---- C4/Ris.pm | 6 +-- C4/RotatingCollections.pm | 3 +- C4/SIP/ILS.pm | 2 +- C4/SIP/ILS/Item.pm | 10 ++--- C4/SIP/ILS/Patron.pm | 10 ++--- C4/SIP/ILS/Transaction.pm | 4 +- C4/SIP/ILS/Transaction/Checkout.pm | 6 +-- C4/SIP/ILS/Transaction/Renew.pm | 1 - C4/SIP/ILS/Transaction/RenewAll.pm | 2 +- C4/SIP/SIPServer.pm | 11 ++--- C4/SIP/Sip.pm | 14 +++--- C4/SIP/Sip/Configuration.pm | 2 +- C4/SIP/Sip/MsgType.pm | 4 +- C4/SIP/t/SIPtest.pm | 8 ++-- C4/SMS.pm | 2 +- C4/Scrubber.pm | 2 +- C4/Search.pm | 17 +++++--- C4/Search/History.pm | 7 ++- C4/Search/PazPar2.pm | 6 +-- C4/Serials.pm | 10 ++--- C4/Service.pm | 2 +- C4/SocialData.pm | 2 +- C4/Stats.pm | 2 +- C4/Suggestions.pm | 3 +- C4/Tags.pm | 4 +- C4/Templates.pm | 6 +-- C4/TmplToken.pm | 2 +- C4/UsageStats.pm | 6 +-- C4/Utils/DataTables/Members.pm | 4 +- C4/Utils/DataTables/TablesSettings.pm | 2 +- C4/Utils/DataTables/VirtualShelves.pm | 2 +- C4/XISBN.pm | 9 ++-- C4/XSLT.pm | 3 +- Koha/Account.pm | 10 ++--- Koha/Account/CreditType.pm | 1 - Koha/Account/CreditTypes.pm | 1 - Koha/Account/DebitType.pm | 1 - Koha/Account/DebitTypes.pm | 1 - Koha/Account/Line.pm | 7 ++- Koha/Account/Lines.pm | 1 - Koha/Account/Offset.pm | 1 - Koha/Account/Offsets.pm | 1 - Koha/Acquisition/Basket.pm | 2 +- Koha/Acquisition/Bookseller/Contact.pm | 1 - Koha/Acquisition/Bookseller/Contacts.pm | 1 - Koha/Acquisition/Currencies.pm | 1 - Koha/Acquisition/Currency.pm | 1 - Koha/Acquisition/Invoice/Adjustment.pm | 1 - Koha/Acquisition/Invoice/Adjustments.pm | 1 - Koha/Acquisition/Order.pm | 3 +- Koha/Acquisition/Order/Claim.pm | 1 - Koha/Acquisition/Order/Claims.pm | 1 - Koha/Acquisition/Orders.pm | 1 - Koha/AdvancedEditorMacro.pm | 1 - Koha/AdvancedEditorMacros.pm | 1 - Koha/ApiKey.pm | 3 +- Koha/ApiKeys.pm | 1 - Koha/App/Plugin/CGIBinKoha.pm | 2 +- Koha/ArticleRequest.pm | 3 +- Koha/ArticleRequests.pm | 1 - Koha/AudioAlert.pm | 1 - Koha/AudioAlerts.pm | 1 - Koha/AuthUtils.pm | 8 ++-- Koha/AuthorisedValue.pm | 1 - Koha/AuthorisedValueCategories.pm | 1 - Koha/AuthorisedValueCategory.pm | 1 - Koha/AuthorisedValues.pm | 1 - Koha/Authorities.pm | 1 - Koha/Authority/MergeRequests.pm | 3 +- Koha/Authority/Type.pm | 1 - Koha/Authority/Types.pm | 1 - Koha/BackgroundJob.pm | 4 +- Koha/BackgroundJob/BatchUpdateAuthority.pm | 4 +- Koha/BackgroundJob/BatchUpdateBiblio.pm | 6 +-- Koha/Biblio.pm | 8 ++-- Koha/Biblio/Metadata.pm | 2 +- Koha/Biblio/Metadatas.pm | 1 - Koha/BiblioFramework.pm | 1 - Koha/BiblioFrameworks.pm | 1 - Koha/BiblioUtils.pm | 3 +- Koha/BiblioUtils/Iterator.pm | 6 +-- Koha/Biblioitem.pm | 1 - Koha/Biblioitems.pm | 1 - Koha/Biblios.pm | 1 - Koha/Cache.pm | 8 ++-- Koha/Cache/Object.pm | 2 +- Koha/Calendar.pm | 2 +- Koha/Cash/Register.pm | 1 - Koha/Cash/Register/Action.pm | 1 - Koha/Cash/Register/Actions.pm | 1 - Koha/Cash/Register/Cashup.pm | 1 - Koha/Cash/Register/Cashups.pm | 1 - Koha/Cash/Registers.pm | 1 - Koha/Charges/Fees.pm | 2 +- Koha/Checkout.pm | 5 +-- Koha/Checkouts.pm | 3 +- Koha/Checkouts/ReturnClaims.pm | 1 - Koha/CirculationRules.pm | 2 +- Koha/Cities.pm | 1 - Koha/City.pm | 1 - Koha/ClassSortRule.pm | 1 - Koha/ClassSortRules.pm | 1 - Koha/ClassSource.pm | 1 - Koha/ClassSources.pm | 1 - Koha/ClassSplitRule.pm | 2 +- Koha/Club.pm | 1 - Koha/Club/Enrollment.pm | 3 +- Koha/Club/Enrollment/Field.pm | 1 - Koha/Club/Enrollment/Fields.pm | 1 - Koha/Club/Enrollments.pm | 1 - Koha/Club/Field.pm | 1 - Koha/Club/Fields.pm | 1 - Koha/Club/Hold.pm | 3 +- Koha/Club/Hold/PatronHold.pm | 1 - Koha/Club/Hold/PatronHolds.pm | 1 - Koha/Club/Holds.pm | 1 - Koha/Club/Template.pm | 1 - Koha/Club/Template/EnrollmentField.pm | 1 - Koha/Club/Template/EnrollmentFields.pm | 1 - Koha/Club/Template/Field.pm | 1 - Koha/Club/Template/Fields.pm | 1 - Koha/Club/Templates.pm | 1 - Koha/Clubs.pm | 1 - Koha/Config/SysPref.pm | 3 +- Koha/Config/SysPrefs.pm | 1 - Koha/Course.pm | 1 - Koha/Course/Instructor.pm | 1 - Koha/Course/Instructors.pm | 1 - Koha/Course/Item.pm | 1 - Koha/Course/Items.pm | 1 - Koha/Course/Reserve.pm | 1 - Koha/Course/Reserves.pm | 1 - Koha/Courses.pm | 1 - Koha/CoverImage.pm | 3 +- Koha/CoverImages.pm | 1 - Koha/CsvProfile.pm | 1 - Koha/CsvProfiles.pm | 1 - Koha/Database.pm | 1 - Koha/Desk.pm | 1 - Koha/Desks.pm | 1 - Koha/EDI.pm | 17 +++++--- Koha/Edifact.pm | 5 +-- Koha/Edifact/Line.pm | 4 +- Koha/Edifact/Order.pm | 7 ++- Koha/Edifact/Transport.pm | 9 ++-- Koha/Email.pm | 2 +- Koha/Exporter/Record.pm | 4 +- Koha/ExternalContent.pm | 4 +- Koha/ExternalContent/OverDrive.pm | 2 +- Koha/ExternalContent/RecordedBooks.pm | 2 +- Koha/Filter/MARC/EmbedItems.pm | 2 +- Koha/Filter/MARC/EmbedItemsAvailability.pm | 2 +- Koha/Filter/MARC/EmbedSeeFromHeadings.pm | 3 +- Koha/Filter/MARC/Null.pm | 1 - Koha/Filter/MARC/ViewPolicy.pm | 1 - Koha/Hold.pm | 9 ++-- Koha/Holds.pm | 1 - Koha/I18N.pm | 7 ++- Koha/Illrequest.pm | 12 +++--- Koha/Illrequest/Availability.pm | 2 +- Koha/Illrequest/Config.pm | 2 +- Koha/Illrequest/Logger.pm | 3 +- Koha/Indexer/Utils.pm | 2 +- Koha/Item.pm | 8 ++-- Koha/Item/Transfer.pm | 4 +- Koha/Item/Transfer/Limit.pm | 1 - Koha/Item/Transfers.pm | 1 - Koha/ItemType.pm | 3 +- Koha/ItemTypes.pm | 3 +- Koha/Items.pm | 1 - Koha/KeyboardShortcut.pm | 1 - Koha/KeyboardShortcuts.pm | 1 - Koha/Libraries.pm | 1 - Koha/Library.pm | 1 - Koha/Library/Group.pm | 3 +- Koha/Library/Groups.pm | 1 - Koha/Library/OverDriveInfo.pm | 1 - Koha/Library/OverDriveInfos.pm | 1 - Koha/Linktracker.pm | 1 - Koha/List/Patron.pm | 2 +- Koha/Logger.pm | 1 - Koha/MarcSubfieldStructure.pm | 1 - Koha/MarcSubfieldStructures.pm | 1 - Koha/MessageAttribute.pm | 1 - Koha/MessageAttributes.pm | 1 - Koha/MetaSearcher.pm | 4 +- Koha/MetadataRecord.pm | 4 +- Koha/MetadataRecord/Authority.pm | 3 +- Koha/Middleware/RealIP.pm | 3 +- Koha/News.pm | 1 - Koha/NewsItem.pm | 1 - Koha/Notice/Message.pm | 1 - Koha/Notice/Messages.pm | 1 - Koha/Notice/Template.pm | 1 - Koha/Notice/Templates.pm | 1 - Koha/Number/Price.pm | 2 +- Koha/OAI/Server/GetRecord.pm | 3 +- Koha/OAI/Server/ListBase.pm | 3 +- Koha/OAI/Server/ListSets.pm | 2 +- Koha/OAI/Server/Record.pm | 2 +- Koha/OAI/Server/Repository.pm | 4 +- Koha/Object.pm | 8 ++-- Koha/Object/Limit/Library.pm | 2 +- Koha/Objects.pm | 2 +- Koha/Old/Holds.pm | 1 - Koha/Patron.pm | 13 +++--- Koha/Patron/Category.pm | 5 +-- Koha/Patron/Discharge.pm | 6 +-- Koha/Patron/Image.pm | 1 - Koha/Patron/Images.pm | 1 - Koha/Patron/Message.pm | 3 +- Koha/Patron/Messages.pm | 1 - Koha/Patron/Modification.pm | 7 ++- Koha/Patron/Modifications.pm | 4 +- Koha/Patron/Password/Recovery.pm | 4 +- Koha/Patron/Relationship.pm | 3 +- Koha/Patron/Relationships.pm | 1 - Koha/Patrons.pm | 4 +- Koha/Patrons/Import.pm | 9 ++-- Koha/Plugins.pm | 9 ++-- Koha/Plugins/Base.pm | 5 +-- Koha/Plugins/Handler.pm | 6 +-- Koha/Plugins/Method.pm | 1 - Koha/Plugins/Methods.pm | 1 - Koha/PseudonymizedTransaction.pm | 3 +- Koha/PseudonymizedTransactions.pm | 1 - Koha/Quote.pm | 1 - Koha/Quotes.pm | 3 +- Koha/RDF.pm | 2 +- Koha/REST/Plugin/Objects.pm | 2 +- Koha/REST/Plugin/PluginRoutes.pm | 4 +- Koha/REST/Plugin/Query.pm | 6 +-- Koha/REST/V1.pm | 2 +- Koha/REST/V1/Acquisitions/Funds.pm | 2 +- Koha/REST/V1/Acquisitions/Orders.pm | 6 +-- Koha/REST/V1/Acquisitions/Vendors.pm | 2 +- Koha/REST/V1/AdvancedEditorMacro.pm | 2 +- Koha/REST/V1/Auth.pm | 6 +-- Koha/REST/V1/Biblios.pm | 6 +-- Koha/REST/V1/CashRegisters/Cashups.pm | 3 +- Koha/REST/V1/Checkouts.pm | 4 +- Koha/REST/V1/CirculationRules.pm | 1 - Koha/REST/V1/Cities.pm | 2 +- Koha/REST/V1/Clubs/Holds.pm | 8 ++-- Koha/REST/V1/Config/SMTP/Servers.pm | 2 +- Koha/REST/V1/Holds.pm | 9 ++-- Koha/REST/V1/ImportBatchProfiles.pm | 2 +- Koha/REST/V1/Items.pm | 2 +- Koha/REST/V1/Libraries.pm | 2 +- Koha/REST/V1/OAuth.pm | 4 +- Koha/REST/V1/Patrons.pm | 5 +-- Koha/REST/V1/Patrons/Account.pm | 3 +- Koha/REST/V1/Patrons/Attributes.pm | 4 +- Koha/REST/V1/Patrons/Password.pm | 4 +- Koha/REST/V1/Quotes.pm | 2 +- Koha/REST/V1/ReturnClaims.pm | 3 +- Koha/REST/V1/Static.pm | 2 +- Koha/REST/V1/TransferLimits.pm | 2 +- Koha/Rating.pm | 1 - Koha/Ratings.pm | 1 - Koha/RecordProcessor.pm | 2 +- Koha/Report.pm | 2 - Koha/Reports.pm | 1 - Koha/Review.pm | 1 - Koha/Reviews.pm | 1 - Koha/SMS/Provider.pm | 1 - Koha/SMS/Providers.pm | 1 - Koha/SMTP/Server.pm | 2 +- Koha/Schema/Loader/mysql.pm | 2 +- Koha/Script.pm | 2 +- Koha/SearchEngine.pm | 2 +- Koha/SearchEngine/Elasticsearch.pm | 21 +++++---- Koha/SearchEngine/Elasticsearch/Indexer.pm | 9 ++-- .../Elasticsearch/QueryBuilder.pm | 7 ++- Koha/SearchEngine/Elasticsearch/Search.pm | 6 +-- Koha/SearchEngine/Indexer.pm | 1 - Koha/SearchEngine/QueryBuilder.pm | 2 +- Koha/SearchEngine/Search.pm | 4 +- Koha/SearchEngine/Zebra/Indexer.pm | 2 +- Koha/SearchField.pm | 1 - Koha/SearchFields.pm | 1 - Koha/SearchMarcMap.pm | 1 - Koha/SearchMarcMaps.pm | 1 - Koha/Serial.pm | 1 - Koha/Serial/Item.pm | 1 - Koha/Serial/Items.pm | 1 - Koha/Serials.pm | 1 - Koha/SharedContent.pm | 4 +- Koha/Sitemapper.pm | 2 +- Koha/Sitemapper/Writer.pm | 4 +- Koha/Statistic.pm | 1 - Koha/Statistics.pm | 1 - Koha/StockRotationItem.pm | 4 +- Koha/Subscription.pm | 2 - Koha/Subscription/Frequencies.pm | 1 - Koha/Subscription/Frequency.pm | 1 - Koha/Subscription/Histories.pm | 1 - Koha/Subscription/History.pm | 1 - Koha/Subscription/Routinglist.pm | 1 - Koha/Subscription/Routinglists.pm | 1 - Koha/Subscriptions.pm | 1 - Koha/Suggestion.pm | 3 +- Koha/SuggestionEngine.pm | 2 +- Koha/SuggestionEngine/Plugin/AuthorityFile.pm | 1 - Koha/SuggestionEngine/Plugin/ExplodedTerms.pm | 1 - .../Plugin/LibrisSpellcheck.pm | 4 +- Koha/SuggestionEngine/Plugin/Null.pm | 1 - Koha/Suggestions.pm | 1 - Koha/Tag.pm | 1 - Koha/Tags.pm | 1 - Koha/Tags/Approval.pm | 1 - Koha/Tags/Approvals.pm | 1 - Koha/Tags/Index.pm | 1 - Koha/Tags/Indexes.pm | 1 - Koha/Template/Plugin/Asset.pm | 4 +- Koha/Template/Plugin/AudioAlerts.pm | 3 +- Koha/Template/Plugin/Categories.pm | 2 +- Koha/Template/Plugin/I18N.pm | 2 +- Koha/Template/Plugin/KohaDates.pm | 2 +- Koha/Template/Plugin/KohaNews.pm | 2 +- Koha/Template/Plugin/KohaPlugins.pm | 2 +- Koha/Template/Plugin/Languages.pm | 2 +- Koha/Template/Plugin/To.pm | 2 +- Koha/Token.pm | 4 +- Koha/UploadedFile.pm | 2 +- Koha/UploadedFiles.pm | 2 +- Koha/Uploader.pm | 10 ++--- Koha/Util/MARC.pm | 1 - Koha/Util/OpenDocument.pm | 4 +- Koha/Virtualshelf.pm | 1 - Koha/Virtualshelfcontent.pm | 1 - Koha/Virtualshelfcontents.pm | 1 - Koha/Virtualshelfshare.pm | 3 +- Koha/Virtualshelfshares.pm | 1 - Koha/Virtualshelves.pm | 1 - Koha/XSLT/Base.pm | 2 +- Koha/XSLT/Security.pm | 1 - Koha/Z3950Server.pm | 1 - Koha/Z3950Servers.pm | 1 - Koha/pdfformat/layout2pages.pm | 3 +- Koha/pdfformat/layout2pagesde.pm | 3 +- Koha/pdfformat/layout3pages.pm | 5 +-- Koha/pdfformat/layout3pagesfr.pm | 5 +-- about.pl | 2 +- acqui/acqui-home.pl | 4 +- acqui/add_user_search.pl | 1 - acqui/addorder.pl | 6 +-- acqui/addorderiso2709.pl | 29 ++++++++++--- acqui/basket.pl | 22 ++++++++-- acqui/basketheader.pl | 2 +- acqui/booksellers.pl | 4 +- acqui/cancelorder.pl | 1 - acqui/check_budget_total.pl | 2 +- acqui/duplicate_orders.pl | 4 +- acqui/edimsg.pl | 1 - acqui/finishreceive.pl | 5 +-- acqui/histsearch.pl | 2 +- acqui/invoice-files.pl | 2 +- acqui/invoice.pl | 12 +++++- acqui/invoices.pl | 4 +- acqui/lateorders-export.pl | 3 +- acqui/lateorders.pl | 1 - acqui/modordernotes.pl | 2 +- acqui/neworderempty.pl | 13 +++--- acqui/newordersubscription.pl | 8 +++- acqui/newordersuggestion.pl | 3 +- acqui/ordered.pl | 2 +- acqui/orderreceive.pl | 12 ++++-- acqui/parcel.pl | 6 +-- acqui/parcels.pl | 4 +- acqui/spent.pl | 2 +- acqui/supplier.pl | 1 - acqui/transferorder.pl | 8 +++- acqui/uncertainprice.pl | 2 +- acqui/updatesupplier.pl | 2 - admin/aqbudgetperiods.pl | 10 ++++- admin/aqbudgets.pl | 19 ++++++-- admin/aqplan.pl | 13 +++++- admin/cash_registers.pl | 1 - admin/check_budget_parent.pl | 2 +- admin/check_parent_total.pl | 2 +- admin/searchengine/elasticsearch/mappings.pl | 3 +- authorities/auth_finder.pl | 1 - basket/basket.pl | 1 - catalogue/MARCdetail.pl | 1 - catalogue/detail.pl | 1 - catalogue/item-export.pl | 1 - catalogue/updateitem.pl | 1 - cataloguing/additem.pl | 2 +- cataloguing/merge.pl | 2 +- cataloguing/moveitem.pl | 1 - .../value_builder/unimarc_field_210c.pl | 2 +- circ/add_message.pl | 1 - circ/bookcount.pl | 1 - circ/branchtransfers.pl | 3 +- circ/circulation.pl | 9 ++-- circ/del_message.pl | 1 - circ/on-site_checkouts.pl | 2 +- circ/pendingreserves.pl | 1 - circ/renew.pl | 2 +- circ/request-article.pl | 2 +- circ/reserveratios.pl | 2 +- circ/returns.pl | 24 ++++++++--- circ/set-library.pl | 2 +- circ/transferstoreceive.pl | 4 +- circ/waitingreserves.pl | 4 +- docs/CAS/CASProxy/examples/koha_webservice.pl | 3 +- members/boraccount.pl | 2 +- members/deletemem.pl | 10 +++-- members/discharge.pl | 2 +- members/discharges.pl | 2 +- members/files.pl | 2 +- members/housebound.pl | 2 +- members/ill-requests.pl | 2 +- members/mancredit.pl | 6 ++- members/maninvoice.pl | 6 ++- members/member-password.pl | 6 ++- members/memberentry.pl | 6 ++- members/members-update-do.pl | 1 - members/moremember.pl | 2 +- members/notices.pl | 2 +- members/pay.pl | 2 +- members/paycollect.pl | 6 ++- members/print_overdues.pl | 2 +- members/printfeercpt.pl | 2 +- members/printinvoice.pl | 2 +- members/printslip.pl | 2 +- members/purchase-suggestions.pl | 4 +- members/readingrec.pl | 2 +- members/statistics.pl | 2 +- members/summary-print.pl | 2 +- members/update-child.pl | 2 +- misc/cronjobs/advance_notices.pl | 5 +-- misc/translator/LangInstaller.pm | 5 +-- misc/translator/TmplTokenizer.pm | 2 +- offline_circ/download.pl | 2 - offline_circ/enqueue_koc.pl | 3 -- offline_circ/list.pl | 3 +- offline_circ/process.pl | 6 ++- offline_circ/process_koc.pl | 5 +-- offline_circ/service.pl | 2 +- opac/opac-ISBDdetail.pl | 3 +- opac/opac-MARCdetail.pl | 3 +- opac/opac-account-pay.pl | 1 - opac/opac-authorities-home.pl | 3 +- opac/opac-memberentry.pl | 2 +- opac/opac-search.pl | 4 +- opac/opac-shelves.pl | 2 +- opac/opac-suggestions.pl | 7 ++- opac/opac-tags.pl | 6 ++- patron_lists/delete.pl | 1 - patroncards/add_user_search.pl | 1 - plugins/plugins-uninstall.pl | 1 - pos/printreceipt.pl | 2 +- reports/acquisitions_stats.pl | 1 - reports/bor_issues_top.pl | 2 - reports/borrowers_out.pl | 2 - reports/borrowers_stats.pl | 2 - reports/cash_register_stats.pl | 1 - reports/cat_issues_top.pl | 2 - reports/catalogue_stats.pl | 1 - reports/dictionary.pl | 10 ++++- reports/guided_reports.pl | 22 ++++++++-- reports/issues_avg_stats.pl | 1 - reports/issues_stats.pl | 2 - reports/manager.pl | 1 - reports/orders_by_fund.pl | 4 +- reports/reserves_stats.pl | 1 - reviews/reviewswaiting.pl | 2 +- rotating_collections/addItems.pl | 7 ++- rotating_collections/editCollections.pl | 7 ++- rotating_collections/rotatingCollections.pl | 2 +- rotating_collections/transferCollection.pl | 2 +- serials/claims.pl | 1 - serials/lateissues-export.pl | 2 - serials/subscription-add.pl | 1 - serials/subscription-detail.pl | 1 - suggestion/add_user_search.pl | 1 - suggestion/suggestion.pl | 17 ++++++-- t/lib/Dates.pm | 2 +- t/lib/Koha/BackgroundJob/BatchTest.pm | 2 +- t/lib/Koha/Plugin/BadAPIRoute.pm | 2 +- t/lib/Koha/Plugin/MarcFieldValues.pm | 2 +- t/lib/Koha/Plugin/Test.pm | 2 +- t/lib/Selenium.pm | 2 - t/lib/TestBuilder.pm | 10 ++--- tags/review.pl | 7 ++- tools/batchMod.pl | 1 - tools/copy-holidays.pl | 1 - tools/exceptionHolidays.pl | 1 - tools/newHolidays.pl | 1 - virtualshelves/shelves.pl | 5 +-- 558 files changed, 951 insertions(+), 1067 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index 7d7ac760184..7029ff6fbf3 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -22,14 +22,11 @@ use Modern::Perl; use C4::Context; use C4::Stats; use C4::Members; -use C4::Log qw(logaction); use Koha::Account; use Koha::Account::Lines; use Koha::Account::Offsets; use Koha::Items; -use Mojo::Util qw(deprecated); -use Data::Dumper qw(Dumper); use vars qw(@ISA @EXPORT); diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index d6a00f9ea74..3564904241a 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -19,13 +19,13 @@ package C4::Acquisition; use Modern::Perl; -use Carp; -use Text::CSV_XS; +use Carp qw( carp croak ); +use Text::CSV_XS (); use C4::Context; -use C4::Suggestions; +use C4::Suggestions qw( GetSuggestionFromBiblionumber ModSuggestion ); use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal ); -use C4::Contract; -use C4::Log qw(logaction); +use C4::Contract qw( GetContract ); +use C4::Log qw( logaction ); use C4::Templates qw(gettemplate); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Acquisition::Baskets; @@ -42,10 +42,8 @@ use Koha::Patrons; use C4::Koha qw( GetVariationsOfISBN ); use MARC::Field; -use MARC::Record; -use JSON qw(to_json); +use JSON qw( to_json ); -use Time::localtime; use vars qw(@ISA @EXPORT); diff --git a/C4/Auth.pm b/C4/Auth.pm index aabdf9d73eb..6820c14ff17 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -19,34 +19,31 @@ package C4::Auth; use strict; use warnings; -use Carp qw/croak/; +use Carp qw( croak ); -use Digest::MD5 qw(md5_base64); -use JSON qw/encode_json/; -use URI::Escape; +use Digest::MD5 qw( md5_base64 ); use CGI::Session; use C4::Context; use C4::Templates; # to get the template -use C4::Languages qw( getlanguage ); +use C4::Languages (); use C4::Search::History; use Koha; use Koha::Caches; use Koha::AuthUtils qw( get_script_name hash_password ); use Koha::Checkouts; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string ); use Koha::Library::Groups; use Koha::Libraries; use Koha::Cash::Registers; use Koha::Desks; use Koha::Patrons; use Koha::Patron::Consents; -use POSIX qw/strftime/; -use List::MoreUtils qw/ any /; -use Encode qw( encode is_utf8); +use List::MoreUtils qw( any ); +use Encode (); use C4::Auth_with_shibboleth qw( shib_ok get_login_shib login_shib_url logout_shib checkpw_shib ); -use Net::CIDR; -use C4::Log qw/logaction/; +use Net::CIDR (); +use C4::Log qw( logaction ); # use utf8; use vars qw($debug $ldap $cas $caslogout); diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm index 72bbba46f6e..b3d0b22a82d 100644 --- a/C4/Auth_with_cas.pm +++ b/C4/Auth_with_cas.pm @@ -24,8 +24,7 @@ use C4::Context; use Koha::AuthUtils qw( get_script_name ); use Authen::CAS::Client; use CGI qw ( -utf8 ); -use FindBin; -use YAML::XS; +use YAML::XS (); use vars qw($debug); diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index bfa7656a507..5abe9971cb2 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -18,14 +18,13 @@ package C4::Auth_with_ldap; # along with Koha; if not, see . use Modern::Perl; -use Carp; +use Carp qw( croak ); use C4::Context; use C4::Members::Messaging; -use C4::Auth qw( checkpw checkpw_internal ); +use C4::Auth qw( checkpw_internal ); use Koha::Patrons; use Koha::AuthUtils qw( hash_password ); -use List::MoreUtils qw( any ); use Net::LDAP; use Net::LDAP::Filter; diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm index f6f1bc339b6..f9158fcc7b2 100644 --- a/C4/Auth_with_shibboleth.pm +++ b/C4/Auth_with_shibboleth.pm @@ -24,9 +24,8 @@ use Koha::AuthUtils qw( get_script_name ); use Koha::Database; use Koha::Patrons; use C4::Members::Messaging; -use Carp; -use CGI; -use List::MoreUtils qw(any); +use Carp qw( carp ); +use List::MoreUtils qw( any ); use vars qw($debug); our (@ISA, @EXPORT_OK); diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index d2bdfccbf7b..0a83aad8188 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -21,13 +21,12 @@ package C4::AuthoritiesMarc; use strict; use warnings; use C4::Context; -use MARC::Record; -use C4::Biblio qw( GetMarcBiblio ModBiblio GetFrameworkCode ); +use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio ); use C4::Search qw( FindDuplicate new_record_from_zebra ); use C4::AuthoritiesMarc::MARC21; use C4::AuthoritiesMarc::UNIMARC; use C4::Charset qw( SetUTF8Flag ); -use C4::Log; +use C4::Log qw( logaction ); use Koha::MetadataRecord::Authority; use Koha::Authorities; use Koha::Authority::MergeRequests; diff --git a/C4/AuthoritiesMarc/MARC21.pm b/C4/AuthoritiesMarc/MARC21.pm index c704a682322..c3c6f847303 100644 --- a/C4/AuthoritiesMarc/MARC21.pm +++ b/C4/AuthoritiesMarc/MARC21.pm @@ -18,7 +18,6 @@ package C4::AuthoritiesMarc::MARC21; # along with Koha; if not, see . use Modern::Perl; -use MARC::Record; =head1 NAME diff --git a/C4/BackgroundJob.pm b/C4/BackgroundJob.pm index 733f72e11b1..a2b63cd3cc5 100644 --- a/C4/BackgroundJob.pm +++ b/C4/BackgroundJob.pm @@ -21,7 +21,7 @@ package C4::BackgroundJob; use Modern::Perl; use C4::Context; use C4::Auth qw( get_session ); -use Digest::MD5; +use Digest::MD5 (); diff --git a/C4/Barcodes.pm b/C4/Barcodes.pm index 27d36c6d00f..957d60f2835 100644 --- a/C4/Barcodes.pm +++ b/C4/Barcodes.pm @@ -20,7 +20,7 @@ package C4::Barcodes; use strict; use warnings; -use Carp; +use Carp qw( carp ); use C4::Context; use C4::Barcodes::hbyymmincr; diff --git a/C4/Barcodes/EAN13.pm b/C4/Barcodes/EAN13.pm index c691b0ec083..7927d195369 100644 --- a/C4/Barcodes/EAN13.pm +++ b/C4/Barcodes/EAN13.pm @@ -22,8 +22,8 @@ use warnings; use C4::Context; -use Algorithm::CheckDigits; -use Carp; +use Algorithm::CheckDigits qw( CheckDigits ); +use Carp qw( carp ); use vars qw(@ISA); diff --git a/C4/Barcodes/annual.pm b/C4/Barcodes/annual.pm index b0d46c13595..0d7e05ae00a 100644 --- a/C4/Barcodes/annual.pm +++ b/C4/Barcodes/annual.pm @@ -20,11 +20,11 @@ package C4::Barcodes::annual; use strict; use warnings; -use Carp; +use Carp qw( carp ); use C4::Context; -use Koha::DateUtils qw( output_pref dt_from_string ); +use Koha::DateUtils qw( dt_from_string output_pref ); use vars qw(@ISA); use vars qw($width); diff --git a/C4/Barcodes/hbyymmincr.pm b/C4/Barcodes/hbyymmincr.pm index 28cb3f81865..bd345a6d62d 100644 --- a/C4/Barcodes/hbyymmincr.pm +++ b/C4/Barcodes/hbyymmincr.pm @@ -19,7 +19,7 @@ package C4::Barcodes::hbyymmincr; use Modern::Perl; -use Carp; +use Carp qw( carp ); use C4::Context; diff --git a/C4/Biblio.pm b/C4/Biblio.pm index feb0665bda8..875fd629066 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -76,25 +76,30 @@ BEGIN { ); } -use Carp; -use Try::Tiny; +use Carp qw( carp ); +use Try::Tiny qw( catch try ); -use Encode qw( decode is_utf8 ); +use Encode (); use List::MoreUtils qw( uniq ); -use MARC::Record; +use MARC::Record (); use MARC::File::USMARC; use MARC::File::XML; -use POSIX qw(strftime); -use Module::Load::Conditional qw(can_load); +use POSIX qw( strftime ); +use Module::Load::Conditional qw( can_load ); use C4::Koha; -use C4::Log; # logaction +use C4::Log qw( logaction ); # logaction use C4::Budgets; use C4::ClassSource qw( GetClassSort ); -use C4::Charset qw( SetUTF8Flag SetMarcUnicodeFlag StripNonXmlChars nsb_clean ); +use C4::Charset qw( + nsb_clean + SetMarcUnicodeFlag + SetUTF8Flag + StripNonXmlChars +); use C4::Linker; -use C4::OAI::Sets; -use C4::Items qw( GetHiddenItemnumbers GetMarcItem ); +use C4::OAI::Sets (); +use C4::Items (); use Koha::Logger; use Koha::Caches; diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 18e9ca300a5..0b8d82b1c2a 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -21,14 +21,14 @@ package C4::Breeding; use strict; use warnings; -use C4::Biblio qw( AddBiblio TransformMarcToKoha TransformMarcToKohaOneField ); +use C4::Biblio (); use C4::Koha qw( GetNormalizedISBN ); use C4::Charset qw( MarcToUTF8Record SetUTF8Flag ); use MARC::File::USMARC; use MARC::Field; use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch ); use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority -use C4::Languages qw( getlanguage ); +use C4::Languages (); use Koha::Database; use Koha::XSLT::Base; diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 15d7e0e05f7..a22e843087c 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -22,7 +22,7 @@ use C4::Context; use Koha::Database; use Koha::Patrons; use Koha::Acquisition::Invoice::Adjustments; -use C4::Acquisition; +use C4::Acquisition (); use vars qw(@ISA @EXPORT); BEGIN { diff --git a/C4/Calendar.pm b/C4/Calendar.pm index 6a5d8a79a49..257119c8e32 100644 --- a/C4/Calendar.pm +++ b/C4/Calendar.pm @@ -19,8 +19,8 @@ use strict; use warnings; use vars qw(@EXPORT); -use Carp; -use Date::Calc qw( Date_to_Days Today); +use Carp qw( croak ); +use Date::Calc qw( Today ); use C4::Context; use Koha::Caches; diff --git a/C4/Charset.pm b/C4/Charset.pm index 0293dc014a3..475224de9bd 100644 --- a/C4/Charset.pm +++ b/C4/Charset.pm @@ -19,9 +19,9 @@ package C4::Charset; use Modern::Perl; -use MARC::Charset qw/marc8_to_utf8/; -use Text::Iconv; -use Unicode::Normalize; +use MARC::Charset (); +use Text::Iconv (); +use Unicode::Normalize qw( NFC NFD ); use Encode qw( decode encode is_utf8 ); use Koha::Logger; diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 1eedf40d4a6..82b5d9c916b 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -21,35 +21,35 @@ package C4::Circulation; use Modern::Perl; use DateTime; use POSIX qw( floor ); -use YAML::XS; -use Encode; +use YAML::XS (); +use Encode (); -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use C4::Context; -use C4::Stats; +use C4::Stats qw( UpdateStats ); use C4::Reserves qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority RevertWaitingStatus IsItemOnHoldAndFound IsAvailableForItemLevelRequest ); -use C4::Biblio qw( UpdateTotalIssues ModZebra ); -use C4::Items qw( ModItemTransfer ModDateLastSeen CartToShelf ); -use C4::Members; -use C4::Accounts; +use C4::Biblio qw( UpdateTotalIssues ); +use C4::Items qw( CartToShelf ModDateLastSeen ModItemTransfer ); +use C4::Members (); +use C4::Accounts (); use C4::ItemCirculationAlertPreference; use C4::Message; -use C4::Log; # logaction -use C4::Overdues qw( UpdateFine get_chargeable_units CalcFine ); +use C4::Log qw( logaction ); # logaction +use C4::Overdues (); use C4::RotatingCollections qw(GetCollectionItemBranches); -use Algorithm::CheckDigits; +use Algorithm::CheckDigits qw( CheckDigits ); -use Data::Dumper; +use Data::Dumper qw( Dumper ); use Koha::Account; use Koha::AuthorisedValues; use Koha::Biblioitems; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Calendar; use Koha::Checkouts; use Koha::Illrequests; use Koha::Items; use Koha::Patrons; -use Koha::Patron::Debarments; +use Koha::Patron::Debarments qw( DelUniqueDebarment GetDebarments ); use Koha::Database; use Koha::Libraries; use Koha::Account::Lines; @@ -62,19 +62,10 @@ use Koha::Config::SysPref; use Koha::Checkouts::ReturnClaims; use Koha::SearchEngine::Indexer; use Koha::Exceptions::Checkout; -use Carp; -use List::MoreUtils qw( uniq any ); +use Carp qw( carp ); +use List::MoreUtils qw( any ); use Scalar::Util qw( looks_like_number ); -use Try::Tiny; -use Date::Calc qw( - Today - Today_and_Now - Add_Delta_YM - Add_Delta_DHMS - Date_to_Days - Day_of_Week - Add_Delta_Days -); +use Date::Calc qw( Date_to_Days ); our (@ISA, @EXPORT_OK); BEGIN { diff --git a/C4/ClassSortRoutine.pm b/C4/ClassSortRoutine.pm index 3d8372fd8dc..387f48d2eae 100644 --- a/C4/ClassSortRoutine.pm +++ b/C4/ClassSortRoutine.pm @@ -20,7 +20,6 @@ package C4::ClassSortRoutine; use strict; use warnings; -use Class::Factory::Util; use C4::Context; our (@ISA, @EXPORT_OK); diff --git a/C4/ClassSplitRoutine.pm b/C4/ClassSplitRoutine.pm index cfa84033894..9d4876ae059 100644 --- a/C4/ClassSplitRoutine.pm +++ b/C4/ClassSplitRoutine.pm @@ -20,7 +20,6 @@ package C4::ClassSplitRoutine; use Modern::Perl; require Exporter; -use Class::Factory::Util; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); diff --git a/C4/Context.pm b/C4/Context.pm index db896ad4737..b8f172c2f73 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -35,14 +35,13 @@ BEGIN { } }; -use Carp; +use Carp qw( carp ); use DateTime::TimeZone; -use Encode; -use File::Spec; -use Module::Load::Conditional qw(can_load); +use Encode (); +use File::Spec (); use POSIX (); -use YAML::XS; -use ZOOM; +use YAML::XS (); +use ZOOM (); use Koha::Caches; use Koha::Config::SysPref; diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm index 73bc6e254cb..5342332d8c1 100644 --- a/C4/CourseReserves.pm +++ b/C4/CourseReserves.pm @@ -17,7 +17,7 @@ package C4::CourseReserves; use Modern::Perl; -use List::MoreUtils qw(any); +use List::MoreUtils qw( any ); use C4::Context; use C4::Circulation qw( GetOpenIssue ); diff --git a/C4/Creators.pm b/C4/Creators.pm index 27043227f20..de81a8bc393 100644 --- a/C4/Creators.pm +++ b/C4/Creators.pm @@ -38,7 +38,23 @@ BEGIN { get_unit_values html_table ); - use C4::Creators::Lib; + use C4::Creators::Lib qw( + get_all_image_names + get_all_layouts + get_all_profiles + get_all_templates + get_barcode_types + get_batch_summary + get_card_summary + get_font_types + get_label_summary + get_label_types + get_output_formats + get_table_names + get_text_justification_types + get_unit_values + html_table +); use C4::Creators::PDF; } diff --git a/C4/Creators/Lib.pm b/C4/Creators/Lib.pm index f64d871be0d..d4831ab4797 100644 --- a/C4/Creators/Lib.pm +++ b/C4/Creators/Lib.pm @@ -18,7 +18,7 @@ package C4::Creators::Lib; # along with Koha; if not, see . use Modern::Perl; -use Storable qw(dclone); +use Storable qw( dclone ); use autouse 'Data::Dumper' => qw(Dumper); diff --git a/C4/Creators/PDF.pm b/C4/Creators/PDF.pm index 9796feb8328..584162180f8 100644 --- a/C4/Creators/PDF.pm +++ b/C4/Creators/PDF.pm @@ -19,10 +19,41 @@ package C4::Creators::PDF; use strict; use warnings; -use PDF::Reuse; +use PDF::Reuse qw( + prAdd + prAltJpeg + prBookmark + prCompress + prDoc + prDocDir + prDocForm + prEnd + prExtract + prField + prFile + prFont + prFontSize + prForm + prGetLogBuffer + prGraphState + prImage + prInit + prInitVars + prJpeg + prJs + prLink + prLog + prLogDir + prMbox + prPage + prSinglePage + prStrWidth + prText + prTTFont +); use PDF::Reuse::Barcode; -use File::Temp; -use List::Util qw/first/; +use File::Temp (); +use List::Util qw( first ); sub _InitVars { diff --git a/C4/Creators/Profile.pm b/C4/Creators/Profile.pm index 2b2ab924b5a..2edb6d3d4b6 100644 --- a/C4/Creators/Profile.pm +++ b/C4/Creators/Profile.pm @@ -6,8 +6,7 @@ use warnings; use autouse 'Data::Dumper' => qw(Dumper); use C4::Context; -use C4::Creators::Lib qw(get_unit_values); - +use C4::Creators::Lib qw( get_unit_values ); sub _check_params { my $given_params = {}; diff --git a/C4/Creators/Template.pm b/C4/Creators/Template.pm index 30d27dd3e7e..1636c16cfb3 100644 --- a/C4/Creators/Template.pm +++ b/C4/Creators/Template.pm @@ -2,12 +2,12 @@ package C4::Creators::Template; use strict; use warnings; -use POSIX qw(ceil); +use POSIX qw( ceil ); use autouse 'Data::Dumper' => qw(Dumper); use C4::Context; use C4::Creators::Profile; -use C4::Creators::Lib qw(get_unit_values); +use C4::Creators::Lib qw( get_unit_values ); sub _check_params { diff --git a/C4/External/BakerTaylor.pm b/C4/External/BakerTaylor.pm index 1d16f038079..e4d881b52ac 100644 --- a/C4/External/BakerTaylor.pm +++ b/C4/External/BakerTaylor.pm @@ -18,9 +18,8 @@ package C4::External::BakerTaylor; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use XML::Simple; -use LWP::Simple; -use HTTP::Request::Common; +use XML::Simple (); +use LWP::Simple qw( get ); use C4::Context; diff --git a/C4/External/OverDrive.pm b/C4/External/OverDrive.pm index 897e2b3c48c..da9ddcb3b19 100644 --- a/C4/External/OverDrive.pm +++ b/C4/External/OverDrive.pm @@ -21,12 +21,12 @@ use strict; use warnings; use Koha; -use JSON; +use JSON qw( from_json ); use Koha::Caches; use HTTP::Request; -use HTTP::Request::Common; +use HTTP::Request::Common (); use LWP::Authen::Basic; -use LWP::UserAgent; +use LWP::UserAgent (); BEGIN { require Exporter; diff --git a/C4/External/Syndetics.pm b/C4/External/Syndetics.pm index 0570d0f7d6b..eb489a5c3ef 100644 --- a/C4/External/Syndetics.pm +++ b/C4/External/Syndetics.pm @@ -17,11 +17,10 @@ package C4::External::Syndetics; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use XML::Simple; -use XML::LibXML; -use LWP::Simple; -use LWP::UserAgent; -use HTTP::Request::Common; +use XML::Simple qw( XMLout ); +use XML::LibXML (); +use LWP::Simple qw( $ua ); +use LWP::UserAgent (); use strict; use warnings; diff --git a/C4/Heading.pm b/C4/Heading.pm index c65c127736c..bd4eed27deb 100644 --- a/C4/Heading.pm +++ b/C4/Heading.pm @@ -19,11 +19,9 @@ package C4::Heading; use Modern::Perl; -use MARC::Record; use MARC::Field; use C4::Context; -use Module::Load; -use Carp; +use Module::Load qw( load ); =head1 NAME diff --git a/C4/Heading/MARC21.pm b/C4/Heading/MARC21.pm index 6a1a3346b2f..b021447c88e 100644 --- a/C4/Heading/MARC21.pm +++ b/C4/Heading/MARC21.pm @@ -19,7 +19,6 @@ package C4::Heading::MARC21; use strict; use warnings; -use MARC::Record; use MARC::Field; diff --git a/C4/Heading/UNIMARC.pm b/C4/Heading/UNIMARC.pm index b998433a438..9767f751a75 100644 --- a/C4/Heading/UNIMARC.pm +++ b/C4/Heading/UNIMARC.pm @@ -20,7 +20,6 @@ package C4::Heading::UNIMARC; use 5.010; use strict; use warnings; -use MARC::Record; use MARC::Field; use C4::Context; diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index dd8eac135ad..9b518409251 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -25,16 +25,13 @@ use warnings; use C4::Context; use C4::Search; use C4::Circulation qw( GetTransfers GetBranchItemRule ); -use C4::Members; -use C4::Biblio; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Items; use Koha::Patrons; use Koha::Libraries; -use List::Util qw(shuffle); -use List::MoreUtils qw(any); -use Data::Dumper; +use List::Util qw( shuffle ); +use List::MoreUtils qw( any ); our (@ISA, @EXPORT_OK); BEGIN { diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index d0b46441053..9b41c48d7c6 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -27,13 +27,11 @@ use C4::Accounts; use C4::Biblio qw( GetMarcBiblio ); use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved ); use C4::Context; -use C4::Auth qw( checkpw ); -use XML::Simple; -use HTML::Entities; +use C4::Auth (); use CGI qw ( -utf8 ); use DateTime; -use C4::Auth qw( checkpw ); -use Koha::DateUtils; +use C4::Auth (); +use Koha::DateUtils qw( dt_from_string ); use Koha::Biblios; use Koha::Checkouts; diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 4d511b19294..a23fc479532 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -22,11 +22,18 @@ use warnings; use C4::Context; use C4::Koha qw( GetNormalizedISBN ); -use C4::Biblio qw( AddBiblio ModBiblio GetMarcFromKohaField GetXmlBiblio TransformMarcToKoha DelBiblio ); -use C4::Items qw( ModItemFromMarc AddItemFromMarc ); -use C4::Charset qw( SetUTF8Flag StripNonXmlChars MarcToUTF8Record ); +use C4::Biblio qw( + AddBiblio + DelBiblio + GetMarcFromKohaField + GetXmlBiblio + ModBiblio + TransformMarcToKoha +); +use C4::Items qw( AddItemFromMarc ModItemFromMarc ); +use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars ); use C4::AuthoritiesMarc; -use C4::MarcModificationTemplates; +use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate ); use Koha::Items; use Koha::Plugins::Handler; use Koha::Logger; diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm index f7fdb7495e2..8def081abd9 100644 --- a/C4/ImportExportFramework.pm +++ b/C4/ImportExportFramework.pm @@ -19,12 +19,12 @@ package C4::ImportExportFramework; use strict; use warnings; -use XML::LibXML; +use XML::LibXML (); use XML::LibXML::XPathContext; -use Digest::MD5 qw(); -use POSIX qw(strftime); -use Text::CSV_XS; -use List::MoreUtils qw(indexes); +use Digest::MD5 (); +use POSIX qw( strftime ); +use Text::CSV_XS (); +use List::MoreUtils qw( indexes ); use C4::Context; use Koha::Logger; diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm index 06ef6c716fa..cf499163dd6 100644 --- a/C4/InstallAuth.pm +++ b/C4/InstallAuth.pm @@ -18,16 +18,14 @@ package C4::InstallAuth; # along with Koha; if not, see . use Modern::Perl; -use Digest::MD5 qw(md5_base64); use CGI::Session; -use File::Spec; +use File::Spec (); require Exporter; use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Templates; -use C4::Koha; our (@ISA, @EXPORT_OK); BEGIN { diff --git a/C4/Installer.pm b/C4/Installer.pm index 2d6b523eed0..376ff7499c6 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -19,11 +19,11 @@ package C4::Installer; use Modern::Perl; -use Encode qw( encode is_utf8 ); +use Encode (); use DBIx::RunSQL; -use YAML::XS; +use YAML::XS (); use C4::Context; -use DBI; +use DBI (); use Koha; use vars qw(@ISA @EXPORT); diff --git a/C4/Installer/PerlModules.pm b/C4/Installer/PerlModules.pm index 01ccc53fea9..f143bc6cc17 100644 --- a/C4/Installer/PerlModules.pm +++ b/C4/Installer/PerlModules.pm @@ -3,8 +3,7 @@ package C4::Installer::PerlModules; use warnings; use strict; -use File::Spec; -use File::Basename; +use File::Basename qw( dirname ); use Module::CPANfile; sub new { diff --git a/C4/Installer/UpgradeBackup.pm b/C4/Installer/UpgradeBackup.pm index 2ca97b66936..5e6c8f033d7 100644 --- a/C4/Installer/UpgradeBackup.pm +++ b/C4/Installer/UpgradeBackup.pm @@ -18,11 +18,11 @@ package C4::Installer::UpgradeBackup; # along with Koha; if not, see . use Modern::Perl; -use File::Compare qw(compare); -use Cwd qw(cwd); -use File::Copy; -use File::Find; -use File::Spec; +use File::Compare qw( compare ); +use Cwd qw( cwd ); +use File::Copy (); +use File::Find qw( find ); +use File::Spec (); use Exporter; use vars qw(@ISA @EXPORT ); diff --git a/C4/ItemCirculationAlertPreference.pm b/C4/ItemCirculationAlertPreference.pm index c7935163f22..45d30d95b7b 100644 --- a/C4/ItemCirculationAlertPreference.pm +++ b/C4/ItemCirculationAlertPreference.pm @@ -20,7 +20,7 @@ package C4::ItemCirculationAlertPreference; use strict; use warnings; use C4::Context; -use Carp qw(carp croak); +use Carp qw( carp croak ); use Koha::ItemTypes; use Koha::Patron::Categories; diff --git a/C4/Items.pm b/C4/Items.pm index b8f60372181..65753b6ca6d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -48,22 +48,20 @@ BEGIN { ); } -use Carp; -use Try::Tiny; +use Carp qw( croak ); use C4::Context; use C4::Koha; -use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField TransformMarcToKoha _disambiguate AddBiblio GetMarcBiblio TransformKohaToMarc GetMarcStructure ); -use Koha::DateUtils; -use MARC::Record; +use C4::Biblio qw( _disambiguate GetMarcStructure TransformMarcToKoha ); +use Koha::DateUtils qw( dt_from_string output_pref ); +use MARC::Record (); use C4::ClassSource qw( GetClassSort GetClassSources GetClassSource ); -use C4::Log; -use List::MoreUtils qw(any); +use C4::Log qw( logaction ); +use List::MoreUtils qw( any ); use DateTime::Format::MySQL; -use Data::Dumper; # used as part of logging item record changes, not just for # debugging; so please don't remove this use Koha::AuthorisedValues; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Database; use Koha::Biblioitems; diff --git a/C4/Koha.pm b/C4/Koha.pm index 508caa432af..9dbde678a1d 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -27,8 +27,8 @@ use Koha::Caches; use Koha::AuthorisedValues; use Koha::Libraries; use Koha::MarcSubfieldStructures; -use Business::ISBN; -use Business::ISSN; +use Business::ISBN (); +use Business::ISSN (); use autouse 'Data::cselectall_arrayref' => qw(Dumper); our (@ISA, @EXPORT_OK); BEGIN { diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm index 187af7c52fe..a317ae8b2c2 100644 --- a/C4/Labels/Label.pm +++ b/C4/Labels/Label.pm @@ -3,10 +3,9 @@ package C4::Labels::Label; use strict; use warnings; -use Text::Wrap; -use Algorithm::CheckDigits; -use Text::CSV_XS; -use Data::Dumper; +use Text::Wrap qw( wrap ); +use Algorithm::CheckDigits qw( CheckDigits ); +use Text::CSV_XS (); use Text::Bidi qw( log2vis ); use C4::Context; diff --git a/C4/Languages.pm b/C4/Languages.pm index a5a73897e5f..bc2ea013721 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -22,8 +22,8 @@ package C4::Languages; use strict; use warnings; -use Carp; -use CGI; +use Carp qw( carp ); +use CGI (); use List::MoreUtils qw( any ); use C4::Context; use Koha::Caches; diff --git a/C4/Letters.pm b/C4/Letters.pm index bafaa06a39d..d9c22f611b8 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -20,25 +20,23 @@ package C4::Letters; use Modern::Perl; use MIME::Lite; -use Date::Calc qw( Add_Delta_Days ); -use Encode; -use Carp; +use Carp qw( carp croak ); use Template; -use Module::Load::Conditional qw(can_load); +use Module::Load::Conditional qw( can_load ); -use Try::Tiny; +use Try::Tiny qw( catch try ); use C4::Members; -use C4::Log; +use C4::Log qw( logaction ); use C4::SMS; use C4::Templates; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::SMS::Providers; use Koha::Email; use Koha::Notice::Messages; use Koha::Notice::Templates; -use Koha::DateUtils qw( format_sqldatetime dt_from_string ); +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Patrons; use Koha::SMTP::Servers; use Koha::Subscriptions; diff --git a/C4/Linker.pm b/C4/Linker.pm index 969d2eac99e..0648ee3e030 100644 --- a/C4/Linker.pm +++ b/C4/Linker.pm @@ -47,7 +47,6 @@ to the preferred form. use strict; use warnings; -use Carp; use C4::Context; use base qw(Class::Accessor); diff --git a/C4/Linker/Default.pm b/C4/Linker/Default.pm index 934e87536a2..c5cbee0e704 100644 --- a/C4/Linker/Default.pm +++ b/C4/Linker/Default.pm @@ -19,7 +19,6 @@ package C4::Linker::Default; use strict; use warnings; -use Carp; use MARC::Field; use C4::Heading; diff --git a/C4/Linker/FirstMatch.pm b/C4/Linker/FirstMatch.pm index 13c852532a5..873395a3628 100644 --- a/C4/Linker/FirstMatch.pm +++ b/C4/Linker/FirstMatch.pm @@ -19,7 +19,6 @@ package C4::Linker::FirstMatch; use strict; use warnings; -use Carp; use C4::Heading; use C4::Linker::Default; # Use Default for flipping diff --git a/C4/Linker/LastMatch.pm b/C4/Linker/LastMatch.pm index 1109f7aaef5..1f873d8c5b4 100644 --- a/C4/Linker/LastMatch.pm +++ b/C4/Linker/LastMatch.pm @@ -19,7 +19,6 @@ package C4::Linker::LastMatch; use strict; use warnings; -use Carp; use C4::Heading; use C4::Linker::Default; # Use Default for flipping diff --git a/C4/Log.pm b/C4/Log.pm index dc3c63fa809..45226f86c3d 100644 --- a/C4/Log.pm +++ b/C4/Log.pm @@ -27,7 +27,6 @@ use warnings; use JSON qw( to_json ); use C4::Context; -use Koha::DateUtils; use Koha::Logger; use vars qw(@ISA @EXPORT); diff --git a/C4/MarcModificationTemplates.pm b/C4/MarcModificationTemplates.pm index 5d6a2251680..1ead9374cf6 100644 --- a/C4/MarcModificationTemplates.pm +++ b/C4/MarcModificationTemplates.pm @@ -22,9 +22,18 @@ use Modern::Perl; use DateTime; use C4::Context; -use Koha::SimpleMARC qw( field_exists field_equals copy_field copy_and_replace_field add_field update_field move_field delete_field ); +use Koha::SimpleMARC qw( + add_field + copy_and_replace_field + copy_field + delete_field + field_equals + field_exists + move_field + update_field +); use Koha::MoreUtils; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use vars qw(@ISA @EXPORT); diff --git a/C4/Matcher.pm b/C4/Matcher.pm index 923b4accf1d..e8a8ec3f741 100644 --- a/C4/Matcher.pm +++ b/C4/Matcher.pm @@ -19,12 +19,17 @@ package C4::Matcher; use Modern::Perl; -use MARC::Record; use Koha::SearchEngine; use Koha::SearchEngine::Search; use Koha::SearchEngine::QueryBuilder; -use Koha::Util::Normalize qw/legacy_default remove_spaces upper_case lower_case ISBN/; +use Koha::Util::Normalize qw( + ISBN + legacy_default + lower_case + remove_spaces + upper_case +); =head1 NAME diff --git a/C4/Members.pm b/C4/Members.pm index 7ab39317993..0d7c972414c 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -22,25 +22,18 @@ package C4::Members; use Modern::Perl; use C4::Context; -use String::Random qw( random_string ); use Scalar::Util qw( looks_like_number ); -use Date::Calc qw/Today check_date Date_to_Days/; -use List::MoreUtils qw( uniq ); -use JSON qw(to_json); -use C4::Log; # logaction +use Date::Calc qw( check_date Date_to_Days ); use C4::Overdues qw( checkoverdues ); use C4::Reserves; use C4::Accounts; -use C4::Biblio; use C4::Letters qw( GetPreparedLetter ); -use C4::NewsChannels; #get slip news +use C4::NewsChannels qw( GetNewsToDisplay ); #get slip news use DateTime; use Koha::Database; -use Koha::DateUtils; -use Koha::AuthUtils qw(hash_password); +use Koha::DateUtils qw( dt_from_string ); use Koha::Database; use Koha::Holds; -use Koha::List::Patron; use Koha::Patrons; use Koha::Patron::Categories; diff --git a/C4/Message.pm b/C4/Message.pm index c4f216f557a..99df173f447 100644 --- a/C4/Message.pm +++ b/C4/Message.pm @@ -23,9 +23,9 @@ use strict; use warnings; use C4::Context; use C4::Letters qw( GetPreparedLetter EnqueueLetter getletter ); -use YAML::XS; -use Encode; -use Carp; +use YAML::XS qw( Dump ); +use Encode (); +use Carp qw( carp ); =head1 NAME diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index 4b3c68311ff..6b8b760b7a7 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -21,8 +21,9 @@ package C4::NewsChannels; use Modern::Perl; use C4::Context; use Koha::DateUtils; -use C4::Log qw(logaction); use Koha::News; +use Koha::DateUtils qw( dt_from_string output_pref ); +use C4::Log qw(logaction); use vars qw(@ISA @EXPORT); diff --git a/C4/Output.pm b/C4/Output.pm index bad0fbdd399..cf98daa4b44 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -27,7 +27,7 @@ package C4::Output; use Modern::Perl; -use URI::Escape; +use URI::Escape (); use Scalar::Util qw( looks_like_number ); use C4::Auth qw( get_template_and_user ); diff --git a/C4/Output/JSONStream.pm b/C4/Output/JSONStream.pm index 816ede80310..a16143c5349 100644 --- a/C4/Output/JSONStream.pm +++ b/C4/Output/JSONStream.pm @@ -39,7 +39,7 @@ This module allows you to build JSON incrementally. use strict; use warnings; -use JSON; +use JSON qw( to_json ); sub new { my $class = shift; diff --git a/C4/Overdues.pm b/C4/Overdues.pm index e26cfb45628..3e9c1237acc 100644 --- a/C4/Overdues.pm +++ b/C4/Overdues.pm @@ -20,19 +20,17 @@ package C4::Overdues; # along with Koha; if not, see . use Modern::Perl; -use Date::Calc qw/Today Date_to_Days/; -use Date::Manip qw/UnixDate/; +use Date::Calc qw( Today ); +use Date::Manip qw( UnixDate ); use List::MoreUtils qw( uniq ); -use POSIX qw( floor ceil ); -use Locale::Currency::Format 1.28; -use Carp; +use POSIX qw( ceil floor ); +use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL ); +use Carp qw( carp ); use C4::Circulation; use C4::Context; use C4::Accounts; -use C4::Log; # logaction use Koha::Logger; -use Koha::DateUtils; use Koha::Account::Lines; use Koha::Account::Offsets; use Koha::Libraries; diff --git a/C4/Patroncards.pm b/C4/Patroncards.pm index 98fb59c28b0..7358b29075a 100644 --- a/C4/Patroncards.pm +++ b/C4/Patroncards.pm @@ -16,7 +16,16 @@ BEGIN { ); use C4::Patroncards::Batch; use C4::Patroncards::Layout; - use C4::Patroncards::Lib; + use C4::Patroncards::Lib qw( + box + get_borrower_attributes + get_image + leading + put_image + rm_image + text_alignment + unpack_UTF8 +); use C4::Patroncards::Patroncard; use C4::Patroncards::Profile; use C4::Patroncards::Template; diff --git a/C4/Patroncards/Patroncard.pm b/C4/Patroncards/Patroncard.pm index 12a5ce36a3a..e6c11f1a9b5 100644 --- a/C4/Patroncards/Patroncard.pm +++ b/C4/Patroncards/Patroncard.pm @@ -21,12 +21,16 @@ use strict; use warnings; use autouse 'Data::Dumper' => qw(Dumper); -use Text::Wrap qw(wrap); #use Font::TTFMetrics; -use C4::Creators::Lib qw(get_font_types get_unit_values); +use C4::Creators::Lib qw( get_unit_values ); use C4::Creators::PDF qw(StrWidth); -use C4::Patroncards::Lib qw(unpack_UTF8 text_alignment leading box get_borrower_attributes); +use C4::Patroncards::Lib qw( + box + get_borrower_attributes + leading + text_alignment +); =head1 NAME diff --git a/C4/Record.pm b/C4/Record.pm index 695d891aa5e..99691ea5fa3 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -22,23 +22,23 @@ package C4::Record; use Modern::Perl; # please specify in which methods a given module is used -use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding +use MARC::Record (); # marc2marcxml, marcxml2marc, changeEncoding use MARC::File::XML; # marc2marcxml, marcxml2marc, changeEncoding use Biblio::EndnoteStyle; -use Unicode::Normalize; # _entity_encode -use C4::Biblio qw( GetXmlBiblio GetMarcBiblio EmbedItemsInMarcBiblio GetFrameworkCode ); +use Unicode::Normalize qw( NFC ); # _entity_encode +use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ); use C4::Koha; #marc2csv use C4::XSLT (); -use YAML::XS; #marcrecords2csv -use Encode; +use YAML::XS (); #marcrecords2csv +use Encode (); use Template; use Text::CSV::Encoded; #marc2csv use Koha::Items; -use Koha::SimpleMARC qw( delete_field read_field ); +use Koha::SimpleMARC qw( read_field ); use Koha::XSLT::Base; use Koha::CsvProfiles; use Koha::AuthorisedValues; -use Carp; +use Carp qw( carp croak ); use vars qw(@ISA @EXPORT); diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index e458429346d..9ec8228971c 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -19,19 +19,18 @@ package C4::Reports::Guided; use Modern::Perl; use CGI qw ( -utf8 ); -use Carp; +use Carp qw( carp croak ); use JSON qw( from_json ); use C4::Context; use C4::Templates qw/themelanguage/; use C4::Koha qw( GetAuthorisedValues ); -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Patrons; use Koha::Reports; use C4::Output; -use C4::Log; +use C4::Log qw( logaction ); use Koha::Notice::Templates; -use C4::Letters; use Koha::Logger; use Koha::AuthorisedValues; diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 5fa5dfbfd77..3888e039376 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -24,20 +24,19 @@ package C4::Reserves; use Modern::Perl; use C4::Accounts; -use C4::Biblio; use C4::Circulation qw( CheckIfIssuedToPatron checkHighHolds GetAgeRestriction GetBranchItemRule ); use C4::Context; -use C4::Items qw( get_hostitemnumbers_of ModItemTransfer CartToShelf ); -use C4::Letters qw( GetPreparedLetter EnqueueLetter ); -use C4::Log; +use C4::Items qw( CartToShelf get_hostitemnumbers_of ); +use C4::Letters (); +use C4::Log qw( logaction ); use C4::Members::Messaging; -use C4::Members; +use C4::Members (); use Koha::Account::Lines; use Koha::Biblios; use Koha::Calendar; use Koha::CirculationRules; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Hold; use Koha::Holds; use Koha::ItemTypes; @@ -47,9 +46,8 @@ use Koha::Old::Hold; use Koha::Patrons; use Koha::Plugins; -use Carp; -use Data::Dumper; -use List::MoreUtils qw( firstidx any ); +use Data::Dumper qw( Dumper ); +use List::MoreUtils qw( any ); =head1 NAME diff --git a/C4/Ris.pm b/C4/Ris.pm index fbec4c770d9..e698d3e59eb 100644 --- a/C4/Ris.pm +++ b/C4/Ris.pm @@ -62,9 +62,9 @@ package C4::Ris; use Modern::Perl; -use List::MoreUtils qw/uniq/; -use YAML::XS; -use Encode; +use List::MoreUtils qw( uniq ); +use YAML::XS (); +use Encode (); use vars qw(@ISA @EXPORT); use Koha::SimpleMARC qw( read_field ); diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm index 2732a69b808..2094d49af22 100644 --- a/C4/RotatingCollections.pm +++ b/C4/RotatingCollections.pm @@ -29,8 +29,7 @@ use C4::Circulation; use C4::Reserves qw(CheckReserves); use Koha::Database; -use DBI; -use Try::Tiny; +use Try::Tiny qw( catch try ); use vars qw(@ISA @EXPORT); diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index 32ec4f996e0..da380b6cc70 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -7,7 +7,7 @@ package C4::SIP::ILS; use warnings; use strict; use C4::SIP::Sip qw( siplog ); -use Data::Dumper; +use Data::Dumper qw( Dumper ); use C4::SIP::ILS::Item; use C4::SIP::ILS::Patron; diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm index 82f3cfb378c..336d54d9bf1 100644 --- a/C4/SIP/ILS/Item.pm +++ b/C4/SIP/ILS/Item.pm @@ -9,24 +9,22 @@ package C4::SIP::ILS::Item; use strict; use warnings; -use C4::SIP::Sip qw(siplog); -use Carp; +use C4::SIP::Sip qw( add_field siplog ); +use Carp qw( croak ); use Template; use C4::SIP::ILS::Transaction; -use C4::SIP::Sip qw(add_field); +use C4::SIP::Sip qw( add_field siplog ); -use C4::Biblio; use C4::Circulation; use C4::Context; -use C4::Items; use C4::Members; use C4::Reserves; use Koha::Biblios; use Koha::Checkouts::ReturnClaims; use Koha::Checkouts; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Holds; use Koha::Items; use Koha::Patrons; diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index e40dbdbf39c..5569bddfd35 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -10,18 +10,18 @@ package C4::SIP::ILS::Patron; use strict; use warnings; use Exporter; -use Carp; +use Carp qw( croak ); -use C4::SIP::Sip qw(siplog); -use Data::Dumper; +use C4::SIP::Sip qw( add_field maybe_add siplog ); +use Data::Dumper qw( Dumper ); -use C4::SIP::Sip qw(add_field maybe_add); +use C4::SIP::Sip qw( add_field maybe_add siplog ); use C4::Context; use C4::Koha; use C4::Members; use C4::Reserves; -use C4::Auth qw(checkpw); +use C4::Auth qw( checkpw ); use Koha::Items; use Koha::Libraries; diff --git a/C4/SIP/ILS/Transaction.pm b/C4/SIP/ILS/Transaction.pm index 011aa980b3b..1691d499b78 100644 --- a/C4/SIP/ILS/Transaction.pm +++ b/C4/SIP/ILS/Transaction.pm @@ -4,11 +4,11 @@ package C4::SIP::ILS::Transaction; -use Carp; +use Carp qw( croak ); use strict; use warnings; use C4::Context; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Checkouts; my %fields = ( diff --git a/C4/SIP/ILS/Transaction/Checkout.pm b/C4/SIP/ILS/Transaction/Checkout.pm index b321a248760..e5a00ba28d7 100644 --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ b/C4/SIP/ILS/Transaction/Checkout.pm @@ -7,9 +7,8 @@ package C4::SIP::ILS::Transaction::Checkout; use warnings; use strict; -use POSIX qw(strftime); -use C4::SIP::Sip qw(siplog); -use Data::Dumper; +use C4::SIP::Sip qw( siplog ); +use Data::Dumper qw( Dumper ); use CGI qw ( -utf8 ); use C4::SIP::ILS::Transaction; @@ -18,7 +17,6 @@ use C4::Context; use C4::Circulation; use C4::Members; use C4::Reserves qw(ModReserveFill); -use Koha::DateUtils; use parent qw(C4::SIP::ILS::Transaction); diff --git a/C4/SIP/ILS/Transaction/Renew.pm b/C4/SIP/ILS/Transaction/Renew.pm index e950424d74c..8cac9e6767c 100644 --- a/C4/SIP/ILS/Transaction/Renew.pm +++ b/C4/SIP/ILS/Transaction/Renew.pm @@ -9,7 +9,6 @@ use strict; use C4::Circulation; use Koha::Patrons; -use Koha::DateUtils; use parent qw(C4::SIP::ILS::Transaction); diff --git a/C4/SIP/ILS/Transaction/RenewAll.pm b/C4/SIP/ILS/Transaction/RenewAll.pm index 23d552b22e3..5acd53efb7b 100644 --- a/C4/SIP/ILS/Transaction/RenewAll.pm +++ b/C4/SIP/ILS/Transaction/RenewAll.pm @@ -6,7 +6,7 @@ package C4::SIP::ILS::Transaction::RenewAll; use strict; use warnings; -use C4::SIP::Sip qw(siplog); +use C4::SIP::Sip qw( siplog ); use C4::SIP::ILS::Item; diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm index f1c1ae448b3..59d031066ec 100644 --- a/C4/SIP/SIPServer.pm +++ b/C4/SIP/SIPServer.pm @@ -4,21 +4,18 @@ package C4::SIP::SIPServer; use strict; use warnings; -use FindBin qw($Bin); +use FindBin qw( $Bin ); use lib "$Bin"; use Net::Server::PreFork; -use IO::Socket::INET; +use IO::Socket::INET qw( AF_INET6 inet_ntoa sockaddr_in sockaddr_in6 ); use Socket qw(:DEFAULT :crlf); -use Scalar::Util qw(blessed); -require UNIVERSAL::require; use C4::Context; -use C4::SIP::Sip qw(siplog); +use C4::SIP::Sip qw( siplog ); use C4::SIP::Sip::Constants qw(:all); use C4::SIP::Sip::Configuration; -use C4::SIP::Sip::Checksum qw(checksum verify_cksum); use C4::SIP::Sip::MsgType qw( handle login_core ); -use C4::SIP::Logger qw(set_logger); +use C4::SIP::Logger qw( set_logger ); use Koha::Caches; diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 2842a611b6f..c1188eb7a4f 100644 --- a/C4/SIP/Sip.pm +++ b/C4/SIP/Sip.pm @@ -7,15 +7,15 @@ package C4::SIP::Sip; use strict; use warnings; use Exporter; -use Encode; -use POSIX qw(strftime); +use Encode qw( encode ); +use POSIX qw( strftime ); use Socket qw(:crlf); -use IO::Handle; -use List::Util qw(first); +use IO::Handle qw( print ); +use List::Util qw( first ); -use C4::SIP::Sip::Constants qw(SIP_DATETIME FID_SCREEN_MSG); -use C4::SIP::Sip::Checksum qw(checksum); -use C4::SIP::Logger qw( get_logger ); +use C4::SIP::Sip::Constants qw( FID_SCREEN_MSG SIP_DATETIME ); +use C4::SIP::Sip::Checksum qw( checksum ); +use C4::SIP::Logger (); use base qw(Exporter); diff --git a/C4/SIP/Sip/Configuration.pm b/C4/SIP/Sip/Configuration.pm index 3f5bdaaa4bd..543c339a709 100644 --- a/C4/SIP/Sip/Configuration.pm +++ b/C4/SIP/Sip/Configuration.pm @@ -10,7 +10,7 @@ use strict; use warnings; use XML::Simple qw(:strict); -use C4::SIP::Sip qw(siplog); +use C4::SIP::Sip qw( siplog ); my $parser = XML::Simple->new( KeyAttr => { diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 583fb06b477..76c08118883 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -12,9 +12,9 @@ use Exporter; use C4::SIP::Sip qw(:all); use C4::SIP::Sip::Constants qw(:all); -use C4::SIP::Sip::Checksum qw(verify_cksum); +use C4::SIP::Sip::Checksum qw( verify_cksum ); -use Data::Dumper; +use Data::Dumper qw( Dumper ); use CGI qw ( -utf8 ); use C4::Auth qw(&check_api_auth); diff --git a/C4/SIP/t/SIPtest.pm b/C4/SIP/t/SIPtest.pm index 6d750a793af..b6e56cd5065 100644 --- a/C4/SIP/t/SIPtest.pm +++ b/C4/SIP/t/SIPtest.pm @@ -6,7 +6,7 @@ use warnings; use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); -use Data::Dumper; +use Data::Dumper qw( Dumper ); BEGIN { @ISA = qw(Exporter); @@ -37,12 +37,12 @@ BEGIN { # The number of tests is set in run_sip_tests() below, based # on the size of the array of tests. -use Test::More; +use Test::More import => [ qw( BAIL_OUT diag fail pass plan ) ]; use CGI qw ( -utf8 ); -use IO::Socket::INET; +use IO::Socket::INET qw( SOCK_STREAM ); use C4::SIP::Sip qw(:all); -use C4::SIP::Sip::Checksum qw(verify_cksum); +use C4::SIP::Sip::Checksum qw( verify_cksum ); use C4::SIP::Sip::Constants qw(:all); use C4::Auth qw(&check_api_auth); diff --git a/C4/SMS.pm b/C4/SMS.pm index ce3358f66ab..20a9a59a768 100644 --- a/C4/SMS.pm +++ b/C4/SMS.pm @@ -54,7 +54,7 @@ use strict; use warnings; use C4::Context; -use File::Spec; +use File::Spec (); diff --git a/C4/Scrubber.pm b/C4/Scrubber.pm index 494b079496b..db4b0838572 100644 --- a/C4/Scrubber.pm +++ b/C4/Scrubber.pm @@ -21,7 +21,7 @@ package C4::Scrubber; use strict; use warnings; -use Carp; +use Carp qw( carp croak ); use HTML::Scrubber; use C4::Context; diff --git a/C4/Search.pm b/C4/Search.pm index 77028c0315b..7777f8757fb 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -17,12 +17,15 @@ package C4::Search; use Modern::Perl; use C4::Context; -use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData ); +use C4::Biblio qw( + GetAuthorisedValueDesc + GetFrameworkCode + GetMarcFromKohaField + TransformMarcToKoha +); use C4::Koha qw( getFacets GetVariationsOfISBN GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN getitemtypeimagelocation ); -use Koha::DateUtils; use Koha::Libraries; -use Lingua::Stem; -use XML::Simple; +use Lingua::Stem (); use C4::XSLT; use C4::Reserves qw( GetReserveStatus ); use C4::Charset qw( SetUTF8Flag ); @@ -32,9 +35,9 @@ use Koha::Libraries; use Koha::Logger; use Koha::Patrons; use Koha::RecordProcessor; -use URI::Escape; -use Business::ISBN; -use MARC::Record; +use URI::Escape qw( uri_escape_utf8 ); +use Business::ISBN (); +use MARC::Record (); use MARC::Field; our (@ISA, @EXPORT_OK); diff --git a/C4/Search/History.pm b/C4/Search/History.pm index 8406f3086bc..df36cb0fbc7 100644 --- a/C4/Search/History.pm +++ b/C4/Search/History.pm @@ -4,11 +4,10 @@ use Modern::Perl; use C4::Auth qw( get_session ); use C4::Context; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); -use JSON qw( encode_json decode_json ); -use URI::Escape; -use Encode; +use JSON qw( decode_json encode_json ); +use URI::Escape qw( uri_escape uri_unescape ); sub add { my ($params) = @_; diff --git a/C4/Search/PazPar2.pm b/C4/Search/PazPar2.pm index a1682930d04..c00959d9583 100644 --- a/C4/Search/PazPar2.pm +++ b/C4/Search/PazPar2.pm @@ -19,10 +19,10 @@ package C4::Search::PazPar2; use Modern::Perl; -use LWP::UserAgent; -use URI; +use LWP::UserAgent (); +use URI (); use URI::QueryParam; -use XML::Simple; +use XML::Simple qw( XMLin ); =head1 NAME diff --git a/C4/Serials.pm b/C4/Serials.pm index 2f5afd8cc11..bc9cc65bee1 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -24,13 +24,13 @@ use C4::Auth qw( haspermission ); use C4::Context; use DateTime; use Date::Calc qw(:all); -use POSIX qw(strftime); +use POSIX qw( strftime ); use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblio ); -use C4::Log; # logaction -use C4::Serials::Frequency; -use C4::Serials::Numberpattern; +use C4::Log qw( logaction ); # logaction +use C4::Serials::Frequency qw( GetSubscriptionFrequency ); +use C4::Serials::Numberpattern (); use Koha::AdditionalFieldValues; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Serial; use Koha::Subscriptions; use Koha::Subscription::Histories; diff --git a/C4/Service.pm b/C4/Service.pm index 4cb1fd13fe5..d4a20196905 100644 --- a/C4/Service.pm +++ b/C4/Service.pm @@ -45,7 +45,7 @@ use CGI qw ( -utf8 ); use C4::Auth qw( check_api_auth ); use C4::Output qw( output_with_http_headers ); use C4::Output qw( output_with_http_headers ); -use JSON; +use JSON (); our $debug; diff --git a/C4/SocialData.pm b/C4/SocialData.pm index 8217ccb49ea..4488f81afb3 100644 --- a/C4/SocialData.pm +++ b/C4/SocialData.pm @@ -18,7 +18,7 @@ package C4::SocialData; use Modern::Perl; use C4::Context; -use Business::ISBN; +use Business::ISBN (); use C4::Koha qw( GetNormalizedISBN ); =head1 NAME diff --git a/C4/Stats.pm b/C4/Stats.pm index ff2eae9d7d5..946b4264151 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -20,7 +20,7 @@ package C4::Stats; use Modern::Perl; require Exporter; -use Carp; +use Carp qw( croak ); use C4::Context; use Koha::DateUtils qw( dt_from_string ); diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index cfc2d561a8d..4cc2f093830 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -25,10 +25,9 @@ use C4::Context; use C4::Output; use C4::Letters qw( GetPreparedLetter EnqueueLetter ); use C4::Biblio qw( GetMarcFromKohaField ); -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Suggestions; -use List::MoreUtils qw(any); use base qw(Exporter); our @EXPORT = qw( diff --git a/C4/Tags.pm b/C4/Tags.pm index 3b70c8bca8a..ed3d953e383 100644 --- a/C4/Tags.pm +++ b/C4/Tags.pm @@ -20,11 +20,11 @@ package C4::Tags; use strict; use warnings; -use Carp; +use Carp qw( carp ); use Exporter; use C4::Context; -use Module::Load::Conditional qw/check_install/; +use Module::Load::Conditional qw( check_install ); #use Data::Dumper; use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created); use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM tags_all\n"; diff --git a/C4/Templates.pm b/C4/Templates.pm index 1a45aeea10b..e847b325b20 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -2,9 +2,9 @@ package C4::Templates; use strict; use warnings; -use Carp; +use Carp qw( carp ); use CGI qw ( -utf8 ); -use List::MoreUtils qw/ any uniq /; +use List::MoreUtils qw( uniq ); # Copyright 2009 Chris Cormack and The Koha Dev Team # @@ -32,7 +32,7 @@ C4::Templates - Object for manipulating templates for use with Koha use base qw(Class::Accessor); use Template; use Template::Constants qw( :debug ); -use C4::Languages qw( regex_lang_subtags get_bidi getTranslatedLanguages getlanguage ); +use C4::Languages qw( get_bidi getTranslatedLanguages regex_lang_subtags ); use C4::Context; diff --git a/C4/TmplToken.pm b/C4/TmplToken.pm index 77932cc1c07..fd3813d0023 100644 --- a/C4/TmplToken.pm +++ b/C4/TmplToken.pm @@ -20,7 +20,7 @@ package C4::TmplToken; use strict; use warnings; -use C4::TmplTokenType qw( DIRECTIVE TAG CDATA TEXT TEXT_PARAMETRIZED ); +use C4::TmplTokenType (); =head1 NAME diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index 3c4ec3dafc3..7c401550e11 100644 --- a/C4/UsageStats.pm +++ b/C4/UsageStats.pm @@ -19,9 +19,9 @@ package C4::UsageStats; use Modern::Perl; use C4::Context; -use POSIX qw(strftime); -use LWP::UserAgent; -use JSON; +use POSIX qw( strftime ); +use LWP::UserAgent (); +use JSON qw( decode_json encode_json ); use Koha::Libraries; diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm index a718a9633e5..3d677b8e010 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -2,8 +2,8 @@ package C4::Utils::DataTables::Members; use Modern::Perl; use C4::Context; -use C4::Utils::DataTables; -use Koha::DateUtils; +use C4::Utils::DataTables qw( dt_build_orderby ); +use Koha::DateUtils qw( dt_from_string output_pref ); sub search { my ( $params ) = @_; diff --git a/C4/Utils/DataTables/TablesSettings.pm b/C4/Utils/DataTables/TablesSettings.pm index 79c94175695..f3ced68a2b7 100644 --- a/C4/Utils/DataTables/TablesSettings.pm +++ b/C4/Utils/DataTables/TablesSettings.pm @@ -2,7 +2,7 @@ package C4::Utils::DataTables::TablesSettings; use Modern::Perl; use List::Util qw( first ); -use YAML::XS; +use YAML::XS (); use C4::Context; use Koha::Database; use Koha::Caches; diff --git a/C4/Utils/DataTables/VirtualShelves.pm b/C4/Utils/DataTables/VirtualShelves.pm index 5a349326b1d..cc52165a2f3 100644 --- a/C4/Utils/DataTables/VirtualShelves.pm +++ b/C4/Utils/DataTables/VirtualShelves.pm @@ -2,7 +2,7 @@ package C4::Utils::DataTables::VirtualShelves; use Modern::Perl; use C4::Context; -use C4::Utils::DataTables; +use C4::Utils::DataTables qw( dt_build_orderby ); use Koha::Virtualshelves; sub search { diff --git a/C4/XISBN.pm b/C4/XISBN.pm index d9c3dd9e664..145e897ff8b 100644 --- a/C4/XISBN.pm +++ b/C4/XISBN.pm @@ -18,14 +18,13 @@ package C4::XISBN; # along with Koha; if not, see . use Modern::Perl; -use XML::Simple; +use XML::Simple (); #use LWP::Simple; -use C4::Biblio qw( TransformMarcToKoha TransformMarcToKohaOneField ); +use C4::Biblio (); use C4::Koha qw( GetNormalizedISBN ); use C4::Search qw( new_record_from_zebra ); -use C4::External::Syndetics qw(get_syndetics_editions); -use LWP::UserAgent; -use HTTP::Request::Common; +use C4::External::Syndetics qw( get_syndetics_editions ); +use LWP::UserAgent (); use Koha::Biblios; use Koha::SearchEngine; diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 327068a20fe..ddd60308f38 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -25,7 +25,7 @@ use Modern::Perl; use C4::Context; use C4::Koha qw( xml_escape ); -use C4::Biblio qw( GetFrameworkCode GetMarcStructure GetAuthorisedValueDesc ); +use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure ); use C4::Circulation; use C4::Reserves; use Koha::AuthorisedValues; @@ -33,7 +33,6 @@ use Koha::ItemTypes; use Koha::XSLT::Base; use Koha::Libraries; -use Encode; use vars qw(@ISA @EXPORT); diff --git a/Koha/Account.pm b/Koha/Account.pm index 3bcd630c116..9736b25d119 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -19,13 +19,12 @@ package Koha::Account; use Modern::Perl; -use Carp; -use Data::Dumper; -use List::MoreUtils qw( uniq ); -use Try::Tiny; +use Carp (); +use Data::Dumper qw( Dumper ); +use Try::Tiny qw( catch try ); use C4::Circulation qw( ReturnLostItem CanBookBeRenewed AddRenewal ); -use C4::Letters qw( GetPreparedLetter EnqueueLetter ); +use C4::Letters (); use C4::Log qw( logaction ); use C4::Stats qw( UpdateStats ); use C4::Overdues qw(GetFine); @@ -34,7 +33,6 @@ use Koha::Patrons; use Koha::Account::Lines; use Koha::Account::Offsets; use Koha::Account::DebitTypes; -use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions; use Koha::Exceptions::Account; diff --git a/Koha/Account/CreditType.pm b/Koha/Account/CreditType.pm index 359618922fc..faf65cfce4e 100644 --- a/Koha/Account/CreditType.pm +++ b/Koha/Account/CreditType.pm @@ -18,7 +18,6 @@ package Koha::Account::CreditType; # along with Koha; if not, see . use Modern::Perl; -use List::Util qw/any/; use Koha::Database; use Koha::Exceptions; diff --git a/Koha/Account/CreditTypes.pm b/Koha/Account/CreditTypes.pm index 2b058ded373..27b43e6d923 100644 --- a/Koha/Account/CreditTypes.pm +++ b/Koha/Account/CreditTypes.pm @@ -18,7 +18,6 @@ package Koha::Account::CreditTypes; # along with Koha; if not, see . use Modern::Perl; -use List::Util qw/any/; use Koha::Database; use Koha::Account::CreditType; diff --git a/Koha/Account/DebitType.pm b/Koha/Account/DebitType.pm index 57cf2cc1f6f..1d5f7f14189 100644 --- a/Koha/Account/DebitType.pm +++ b/Koha/Account/DebitType.pm @@ -18,7 +18,6 @@ package Koha::Account::DebitType; # along with Koha; if not, see . use Modern::Perl; -use List::Util qw/any/; use Koha::Database; use Koha::Exceptions; diff --git a/Koha/Account/DebitTypes.pm b/Koha/Account/DebitTypes.pm index 8b3558be6f4..3860264d50e 100644 --- a/Koha/Account/DebitTypes.pm +++ b/Koha/Account/DebitTypes.pm @@ -18,7 +18,6 @@ package Koha::Account::DebitTypes; # along with Koha; if not, see . use Modern::Perl; -use List::Util qw/any/; use Koha::Database; use Koha::Account::DebitType; diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index 96de9bb885b..36a420b10c4 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -17,17 +17,16 @@ package Koha::Account::Line; use Modern::Perl; -use Carp; -use Data::Dumper; +use Data::Dumper qw( Dumper ); -use C4::Log qw(logaction); +use C4::Log qw( logaction ); use C4::Overdues qw( UpdateFine ); use Koha::Account::CreditType; use Koha::Account::DebitType; use Koha::Account::Offsets; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions::Account; use Koha::Items; diff --git a/Koha/Account/Lines.pm b/Koha/Account/Lines.pm index d593893924e..ab8986db2d4 100644 --- a/Koha/Account/Lines.pm +++ b/Koha/Account/Lines.pm @@ -17,7 +17,6 @@ package Koha::Account::Lines; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Account::Line; diff --git a/Koha/Account/Offset.pm b/Koha/Account/Offset.pm index 0751ce80363..1ff8c11da2d 100644 --- a/Koha/Account/Offset.pm +++ b/Koha/Account/Offset.pm @@ -17,7 +17,6 @@ package Koha::Account::Offset; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Account::Lines; diff --git a/Koha/Account/Offsets.pm b/Koha/Account/Offsets.pm index 0083f0d3ab8..6a401968f2d 100644 --- a/Koha/Account/Offsets.pm +++ b/Koha/Account/Offsets.pm @@ -17,7 +17,6 @@ package Koha::Account::Offsets; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Acquisition/Basket.pm b/Koha/Acquisition/Basket.pm index 4f105579019..6717f5f9d47 100644 --- a/Koha/Acquisition/Basket.pm +++ b/Koha/Acquisition/Basket.pm @@ -25,7 +25,7 @@ use Koha::Acquisition::BasketGroups; use Koha::Acquisition::Orders; use Koha::Exceptions::Acquisition::Basket; use Koha::Patrons; -use C4::Log qw(logaction); +use C4::Log qw( logaction ); use base qw( Koha::Object Koha::Object::Mixin::AdditionalFields ); diff --git a/Koha/Acquisition/Bookseller/Contact.pm b/Koha/Acquisition/Bookseller/Contact.pm index 61da32eac03..1b184fb3ddf 100644 --- a/Koha/Acquisition/Bookseller/Contact.pm +++ b/Koha/Acquisition/Bookseller/Contact.pm @@ -4,7 +4,6 @@ use Modern::Perl; use base qw( Koha::Object ); -use Carp qw( croak ); sub _type { return 'Aqcontact'; diff --git a/Koha/Acquisition/Bookseller/Contacts.pm b/Koha/Acquisition/Bookseller/Contacts.pm index 053e7a6d975..fa066f45afa 100644 --- a/Koha/Acquisition/Bookseller/Contacts.pm +++ b/Koha/Acquisition/Bookseller/Contacts.pm @@ -2,7 +2,6 @@ package Koha::Acquisition::Bookseller::Contacts; use Modern::Perl; -use Carp; use base qw( Koha::Objects ); diff --git a/Koha/Acquisition/Currencies.pm b/Koha/Acquisition/Currencies.pm index 5e730e568cb..42f1d2ff200 100644 --- a/Koha/Acquisition/Currencies.pm +++ b/Koha/Acquisition/Currencies.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Currencies; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Acquisition/Currency.pm b/Koha/Acquisition/Currency.pm index 050cf6c4a1e..8404d4bb42f 100644 --- a/Koha/Acquisition/Currency.pm +++ b/Koha/Acquisition/Currency.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Currency; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Acquisition/Invoice/Adjustment.pm b/Koha/Acquisition/Invoice/Adjustment.pm index 0d0bac73536..e0f1db3d0fa 100644 --- a/Koha/Acquisition/Invoice/Adjustment.pm +++ b/Koha/Acquisition/Invoice/Adjustment.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Invoice::Adjustment; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Acquisition::Invoices; diff --git a/Koha/Acquisition/Invoice/Adjustments.pm b/Koha/Acquisition/Invoice/Adjustments.pm index 3a43904b069..f45f12b79ed 100644 --- a/Koha/Acquisition/Invoice/Adjustments.pm +++ b/Koha/Acquisition/Invoice/Adjustments.pm @@ -18,7 +18,6 @@ package Koha::Acquisition::Invoice::Adjustments; use Modern::Perl; use Koha::Acquisition::Invoice::Adjustment; -use Carp; use Koha::Database; diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm index 66558a05a4d..090920d92c1 100644 --- a/Koha/Acquisition/Order.pm +++ b/Koha/Acquisition/Order.pm @@ -18,7 +18,6 @@ package Koha::Acquisition::Order; use Modern::Perl; use Carp qw( croak ); -use Try::Tiny; use C4::Biblio qw( DelBiblio ); @@ -27,7 +26,7 @@ use Koha::Acquisition::Funds; use Koha::Acquisition::Invoices; use Koha::Acquisition::Order::Claims; use Koha::Database; -use Koha::DateUtils qw( dt_from_string output_pref ); +use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions::Object; use Koha::Biblios; use Koha::Holds; diff --git a/Koha/Acquisition/Order/Claim.pm b/Koha/Acquisition/Order/Claim.pm index e377e4b6797..902283080d7 100644 --- a/Koha/Acquisition/Order/Claim.pm +++ b/Koha/Acquisition/Order/Claim.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Order::Claim; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Acquisition/Order/Claims.pm b/Koha/Acquisition/Order/Claims.pm index 9e96045711a..3190733652c 100644 --- a/Koha/Acquisition/Order/Claims.pm +++ b/Koha/Acquisition/Order/Claims.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Order::Claims; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Acquisition/Orders.pm b/Koha/Acquisition/Orders.pm index 2b06b81d1e5..b2496260a98 100644 --- a/Koha/Acquisition/Orders.pm +++ b/Koha/Acquisition/Orders.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Orders; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/AdvancedEditorMacro.pm b/Koha/AdvancedEditorMacro.pm index 975f850fa9e..6627b325de9 100644 --- a/Koha/AdvancedEditorMacro.pm +++ b/Koha/AdvancedEditorMacro.pm @@ -16,7 +16,6 @@ package Koha::AdvancedEditorMacro; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/AdvancedEditorMacros.pm b/Koha/AdvancedEditorMacros.pm index 4fdf25ba9fc..d890185e4d5 100644 --- a/Koha/AdvancedEditorMacros.pm +++ b/Koha/AdvancedEditorMacros.pm @@ -16,7 +16,6 @@ package Koha::AdvancedEditorMacros; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ApiKey.pm b/Koha/ApiKey.pm index 80d630c323a..0ddd3c8f59b 100644 --- a/Koha/ApiKey.pm +++ b/Koha/ApiKey.pm @@ -19,12 +19,11 @@ package Koha::ApiKey; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; -use UUID; +use UUID (); use base qw(Koha::Object); diff --git a/Koha/ApiKeys.pm b/Koha/ApiKeys.pm index 8eb84d1b61a..07cabd32044 100644 --- a/Koha/ApiKeys.pm +++ b/Koha/ApiKeys.pm @@ -19,7 +19,6 @@ package Koha::ApiKeys; use Modern::Perl; -use Carp; use Koha::Database; use Koha::ApiKey; diff --git a/Koha/App/Plugin/CGIBinKoha.pm b/Koha/App/Plugin/CGIBinKoha.pm index b7b8d4680b3..d67ab67a6e6 100644 --- a/Koha/App/Plugin/CGIBinKoha.pm +++ b/Koha/App/Plugin/CGIBinKoha.pm @@ -21,7 +21,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Plugin'; -use CGI; +use CGI (); use CGI::Compile; use CGI::Emulate::PSGI; use IO::Scalar; diff --git a/Koha/ArticleRequest.pm b/Koha/ArticleRequest.pm index 6b8809bc334..05b0e325429 100644 --- a/Koha/ArticleRequest.pm +++ b/Koha/ArticleRequest.pm @@ -19,14 +19,13 @@ package Koha::ArticleRequest; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Patrons; use Koha::Biblios; use Koha::Items; use Koha::Libraries; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string ); use base qw(Koha::Object); diff --git a/Koha/ArticleRequests.pm b/Koha/ArticleRequests.pm index 9b27615573a..2d3dce5627f 100644 --- a/Koha/ArticleRequests.pm +++ b/Koha/ArticleRequests.pm @@ -19,7 +19,6 @@ package Koha::ArticleRequests; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/AudioAlert.pm b/Koha/AudioAlert.pm index 6cddd28b94d..6d5cf639e03 100644 --- a/Koha/AudioAlert.pm +++ b/Koha/AudioAlert.pm @@ -19,7 +19,6 @@ package Koha::AudioAlert; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/AudioAlerts.pm b/Koha/AudioAlerts.pm index daca3c6aede..11aede083c8 100644 --- a/Koha/AudioAlerts.pm +++ b/Koha/AudioAlerts.pm @@ -19,7 +19,6 @@ package Koha::AudioAlerts; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/AuthUtils.pm b/Koha/AuthUtils.pm index 9559adcf748..d409b79d5cf 100644 --- a/Koha/AuthUtils.pm +++ b/Koha/AuthUtils.pm @@ -18,10 +18,10 @@ package Koha::AuthUtils; # along with Koha; if not, see . use Modern::Perl; -use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64); -use Encode qw( encode is_utf8 ); -use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt -use List::MoreUtils qw/ any /; +use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 ); +use Encode (); +use Fcntl qw( O_RDONLY ); # O_RDONLY is used in generate_salt +use List::MoreUtils qw( any ); use String::Random qw( random_string ); use Koha::Exceptions::Password; diff --git a/Koha/AuthorisedValue.pm b/Koha/AuthorisedValue.pm index 636ce95b3cd..8f97bb1ede0 100644 --- a/Koha/AuthorisedValue.pm +++ b/Koha/AuthorisedValue.pm @@ -19,7 +19,6 @@ package Koha::AuthorisedValue; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/AuthorisedValueCategories.pm b/Koha/AuthorisedValueCategories.pm index 915e7d0fb06..21e4eee49f6 100644 --- a/Koha/AuthorisedValueCategories.pm +++ b/Koha/AuthorisedValueCategories.pm @@ -17,7 +17,6 @@ package Koha::AuthorisedValueCategories; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; diff --git a/Koha/AuthorisedValueCategory.pm b/Koha/AuthorisedValueCategory.pm index 73f578ac4c6..e14129f80d6 100644 --- a/Koha/AuthorisedValueCategory.pm +++ b/Koha/AuthorisedValueCategory.pm @@ -17,7 +17,6 @@ package Koha::AuthorisedValueCategory; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; diff --git a/Koha/AuthorisedValues.pm b/Koha/AuthorisedValues.pm index b23190da725..b89ed9be4a3 100644 --- a/Koha/AuthorisedValues.pm +++ b/Koha/AuthorisedValues.pm @@ -19,7 +19,6 @@ package Koha::AuthorisedValues; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Authorities.pm b/Koha/Authorities.pm index 0145eb368eb..a509b75fa2d 100644 --- a/Koha/Authorities.pm +++ b/Koha/Authorities.pm @@ -19,7 +19,6 @@ package Koha::Authorities; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Authority/MergeRequests.pm b/Koha/Authority/MergeRequests.pm index 315fe4ba67c..481118e0f57 100644 --- a/Koha/Authority/MergeRequests.pm +++ b/Koha/Authority/MergeRequests.pm @@ -19,12 +19,11 @@ package Koha::Authority::MergeRequests; use Modern::Perl; use MARC::File::XML; -use MARC::Record; use C4::Context; use Koha::Authority::MergeRequest; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use parent qw(Koha::Objects); diff --git a/Koha/Authority/Type.pm b/Koha/Authority/Type.pm index 8d9caba1fdb..7c6327e86b6 100644 --- a/Koha/Authority/Type.pm +++ b/Koha/Authority/Type.pm @@ -17,7 +17,6 @@ package Koha::Authority::Type; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Authority/Types.pm b/Koha/Authority/Types.pm index 85991d85c09..aa399b4dcc5 100644 --- a/Koha/Authority/Types.pm +++ b/Koha/Authority/Types.pm @@ -17,7 +17,6 @@ package Koha::Authority::Types; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm index 09139bdbdd0..c303fa175ec 100644 --- a/Koha/BackgroundJob.pm +++ b/Koha/BackgroundJob.pm @@ -16,10 +16,10 @@ package Koha::BackgroundJob; # along with Koha; if not, see . use Modern::Perl; -use JSON qw( encode_json decode_json ); +use JSON qw( decode_json encode_json ); use Carp qw( croak ); use Net::Stomp; -use Try::Tiny; +use Try::Tiny qw( catch try ); use C4::Context; use Koha::DateUtils qw( dt_from_string ); diff --git a/Koha/BackgroundJob/BatchUpdateAuthority.pm b/Koha/BackgroundJob/BatchUpdateAuthority.pm index 24f1e9a4000..5969a1311d5 100644 --- a/Koha/BackgroundJob/BatchUpdateAuthority.pm +++ b/Koha/BackgroundJob/BatchUpdateAuthority.pm @@ -16,9 +16,9 @@ package Koha::BackgroundJob::BatchUpdateAuthority; # along with Koha; if not, see . use Modern::Perl; -use JSON qw( encode_json decode_json ); +use JSON qw( decode_json encode_json ); -use C4::MarcModificationTemplates; +use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate ); use C4::AuthoritiesMarc; use Koha::BackgroundJobs; use Koha::DateUtils qw( dt_from_string ); diff --git a/Koha/BackgroundJob/BatchUpdateBiblio.pm b/Koha/BackgroundJob/BatchUpdateBiblio.pm index e2dd32b077c..ddff041c1a2 100644 --- a/Koha/BackgroundJob/BatchUpdateBiblio.pm +++ b/Koha/BackgroundJob/BatchUpdateBiblio.pm @@ -16,12 +16,12 @@ package Koha::BackgroundJob::BatchUpdateBiblio; # along with Koha; if not, see . use Modern::Perl; -use JSON qw( encode_json decode_json ); +use JSON qw( decode_json encode_json ); use Koha::BackgroundJobs; use Koha::DateUtils qw( dt_from_string ); -use C4::Biblio qw( GetMarcBiblio GetFrameworkCode ModBiblio ); -use C4::MarcModificationTemplates; +use C4::Biblio (); +use C4::MarcModificationTemplates (); use base 'Koha::BackgroundJob'; diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 81146545526..02dbaa01c8a 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -19,13 +19,11 @@ package Koha::Biblio; use Modern::Perl; -use Carp; -use List::MoreUtils qw(any); -use URI; -use URI::Escape; +use List::MoreUtils qw( any ); +use URI (); +use URI::Escape qw( uri_escape_utf8 ); use C4::Koha qw( GetNormalizedISBN ); -use C4::Biblio qw(); use Koha::Database; use Koha::DateUtils qw( dt_from_string ); diff --git a/Koha/Biblio/Metadata.pm b/Koha/Biblio/Metadata.pm index f55b766a4b9..956d0581752 100644 --- a/Koha/Biblio/Metadata.pm +++ b/Koha/Biblio/Metadata.pm @@ -17,7 +17,7 @@ package Koha::Biblio::Metadata; use Modern::Perl; -use MARC::Record; +use MARC::Record (); use MARC::File::XML; use Koha::Database; diff --git a/Koha/Biblio/Metadatas.pm b/Koha/Biblio/Metadatas.pm index 65a17bed326..d31b86501e8 100644 --- a/Koha/Biblio/Metadatas.pm +++ b/Koha/Biblio/Metadatas.pm @@ -17,7 +17,6 @@ package Koha::Biblio::Metadatas; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/BiblioFramework.pm b/Koha/BiblioFramework.pm index ca69f37e843..30367570ba0 100644 --- a/Koha/BiblioFramework.pm +++ b/Koha/BiblioFramework.pm @@ -17,7 +17,6 @@ package Koha::BiblioFramework; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/BiblioFrameworks.pm b/Koha/BiblioFrameworks.pm index 16db02b5862..7202d2fec5f 100644 --- a/Koha/BiblioFrameworks.pm +++ b/Koha/BiblioFrameworks.pm @@ -17,7 +17,6 @@ package Koha::BiblioFrameworks; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/BiblioUtils.pm b/Koha/BiblioUtils.pm index ace8c9b07b0..43ad00a4922 100644 --- a/Koha/BiblioUtils.pm +++ b/Koha/BiblioUtils.pm @@ -32,12 +32,11 @@ the new thing that should be used. =cut -use C4::Biblio qw( GetMarcBiblio ); +use C4::Biblio (); use Koha::MetadataIterator; use Koha::Database; use Modern::Perl; -use Data::Dumper; # TODO remove use base qw(Koha::MetadataRecord); diff --git a/Koha/BiblioUtils/Iterator.pm b/Koha/BiblioUtils/Iterator.pm index 445bf3fec03..7db11901c50 100644 --- a/Koha/BiblioUtils/Iterator.pm +++ b/Koha/BiblioUtils/Iterator.pm @@ -43,10 +43,10 @@ Returns biblionumber and marc in list context. =cut -use C4::Biblio qw( GetXmlBiblio EmbedItemsInMarcBiblio ); +use C4::Biblio (); -use Carp; -use MARC::Record; +use Carp qw( confess ); +use MARC::Record (); use MARC::File::XML; use Modern::Perl; diff --git a/Koha/Biblioitem.pm b/Koha/Biblioitem.pm index 8f63a7cc983..eec0cdc6374 100644 --- a/Koha/Biblioitem.pm +++ b/Koha/Biblioitem.pm @@ -17,7 +17,6 @@ package Koha::Biblioitem; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Biblioitems.pm b/Koha/Biblioitems.pm index d35a0d4fc48..b8d2ba8d564 100644 --- a/Koha/Biblioitems.pm +++ b/Koha/Biblioitems.pm @@ -17,7 +17,6 @@ package Koha::Biblioitems; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Biblios.pm b/Koha/Biblios.pm index 9491fb3112f..416aa2bbe5f 100644 --- a/Koha/Biblios.pm +++ b/Koha/Biblios.pm @@ -19,7 +19,6 @@ package Koha::Biblios; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Cache.pm b/Koha/Cache.pm index c22fd4efaef..9d5b1bb8f9d 100644 --- a/Koha/Cache.pm +++ b/Koha/Cache.pm @@ -40,10 +40,10 @@ The first, traditional OO interface provides the following functions: use strict; use warnings; -use Carp; -use Module::Load::Conditional qw(can_load); -use Sereal::Encoder; -use Sereal::Decoder; +use Carp qw( carp croak ); +use Module::Load::Conditional qw( can_load ); +use Sereal::Encoder (); +use Sereal::Decoder (); use C4::Context; use Koha::Cache::Object; diff --git a/Koha/Cache/Object.pm b/Koha/Cache/Object.pm index 954e51ab6d5..55ba550f6d6 100644 --- a/Koha/Cache/Object.pm +++ b/Koha/Cache/Object.pm @@ -52,7 +52,7 @@ scalars and hashes, with arrays a potential future addition. use strict; use warnings; -use Carp; +use Carp qw( carp ); use base qw(Class::Accessor); diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index 05f91767161..5ffebb47ab7 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -2,7 +2,7 @@ package Koha::Calendar; use Modern::Perl; -use Carp; +use Carp qw( croak ); use DateTime; use DateTime::Duration; use C4::Context; diff --git a/Koha/Cash/Register.pm b/Koha/Cash/Register.pm index 2daa52ed41d..72288bdadb8 100644 --- a/Koha/Cash/Register.pm +++ b/Koha/Cash/Register.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register; use Modern::Perl; -use Carp; use Koha::Account::Lines; use Koha::Account::Offsets; diff --git a/Koha/Cash/Register/Action.pm b/Koha/Cash/Register/Action.pm index ede413c21d3..34118695c4e 100644 --- a/Koha/Cash/Register/Action.pm +++ b/Koha/Cash/Register/Action.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Action; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Cash/Register/Actions.pm b/Koha/Cash/Register/Actions.pm index bdff33ed73f..d470b4d4379 100644 --- a/Koha/Cash/Register/Actions.pm +++ b/Koha/Cash/Register/Actions.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Actions; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Cash/Register/Cashup.pm b/Koha/Cash/Register/Cashup.pm index d3047036a4b..480bbf0e48c 100644 --- a/Koha/Cash/Register/Cashup.pm +++ b/Koha/Cash/Register/Cashup.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Cashup; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Cash/Register/Cashups.pm b/Koha/Cash/Register/Cashups.pm index 8e82a01717d..58a562c0cbe 100644 --- a/Koha/Cash/Register/Cashups.pm +++ b/Koha/Cash/Register/Cashups.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Cashups; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Cash::Register::Cashup; diff --git a/Koha/Cash/Registers.pm b/Koha/Cash/Registers.pm index e022279cb78..9576492caa8 100644 --- a/Koha/Cash/Registers.pm +++ b/Koha/Cash/Registers.pm @@ -17,7 +17,6 @@ package Koha::Cash::Registers; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Charges/Fees.pm b/Koha/Charges/Fees.pm index 7eff76ba794..ebefed759cf 100644 --- a/Koha/Charges/Fees.pm +++ b/Koha/Charges/Fees.pm @@ -19,7 +19,7 @@ package Koha::Charges::Fees; use Modern::Perl; -use Carp qw( carp confess ); +use Carp (); use Koha::Calendar; use Koha::DateUtils qw( dt_from_string ); diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm index 5c27a412d99..cc001942485 100644 --- a/Koha/Checkout.pm +++ b/Koha/Checkout.pm @@ -20,14 +20,13 @@ package Koha::Checkout; use Modern::Perl; -use Carp; use DateTime; -use Try::Tiny; +use Try::Tiny qw( catch try ); use C4::Circulation qw( LostItem MarkIssueReturned ); use Koha::Checkouts::ReturnClaims; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Items; use Koha::Libraries; diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm index 902e3165801..76a3b9e6868 100644 --- a/Koha/Checkouts.pm +++ b/Koha/Checkouts.pm @@ -19,13 +19,12 @@ package Koha::Checkouts; use Modern::Perl; -use Carp; use C4::Context; use C4::Circulation qw( AddReturn ); use Koha::Checkout; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use base qw(Koha::Objects); diff --git a/Koha/Checkouts/ReturnClaims.pm b/Koha/Checkouts/ReturnClaims.pm index fa601bdd66a..c1c2b3bd443 100644 --- a/Koha/Checkouts/ReturnClaims.pm +++ b/Koha/Checkouts/ReturnClaims.pm @@ -19,7 +19,6 @@ package Koha::Checkouts::ReturnClaims; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index df1314613e1..d1c5648ff32 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -18,7 +18,7 @@ package Koha::CirculationRules; # along with Koha; if not, see . use Modern::Perl; -use Carp qw(croak); +use Carp qw( croak ); use Koha::Exceptions; use Koha::CirculationRule; diff --git a/Koha/Cities.pm b/Koha/Cities.pm index c66c4929acf..eabe4909f35 100644 --- a/Koha/Cities.pm +++ b/Koha/Cities.pm @@ -17,7 +17,6 @@ package Koha::Cities; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/City.pm b/Koha/City.pm index d6466315b57..e95f081644a 100644 --- a/Koha/City.pm +++ b/Koha/City.pm @@ -17,7 +17,6 @@ package Koha::City; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ClassSortRule.pm b/Koha/ClassSortRule.pm index f1e7788cc5b..73f181e573b 100644 --- a/Koha/ClassSortRule.pm +++ b/Koha/ClassSortRule.pm @@ -17,7 +17,6 @@ package Koha::ClassSortRule; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ClassSortRules.pm b/Koha/ClassSortRules.pm index 07dc543df5e..1a59b0b6a8d 100644 --- a/Koha/ClassSortRules.pm +++ b/Koha/ClassSortRules.pm @@ -17,7 +17,6 @@ package Koha::ClassSortRules; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ClassSource.pm b/Koha/ClassSource.pm index 734757768bc..3b192ee1240 100644 --- a/Koha/ClassSource.pm +++ b/Koha/ClassSource.pm @@ -17,7 +17,6 @@ package Koha::ClassSource; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ClassSources.pm b/Koha/ClassSources.pm index 3b6f891d9bd..7a56ab8b3cc 100644 --- a/Koha/ClassSources.pm +++ b/Koha/ClassSources.pm @@ -17,7 +17,6 @@ package Koha::ClassSources; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ClassSplitRule.pm b/Koha/ClassSplitRule.pm index a8b6401e3c1..28937fc59d9 100644 --- a/Koha/ClassSplitRule.pm +++ b/Koha/ClassSplitRule.pm @@ -17,7 +17,7 @@ package Koha::ClassSplitRule; use Modern::Perl; -use JSON qw(to_json from_json); +use JSON qw( from_json to_json ); use Koha::Database; diff --git a/Koha/Club.pm b/Koha/Club.pm index 7e488399eb2..d4e00dae5be 100644 --- a/Koha/Club.pm +++ b/Koha/Club.pm @@ -19,7 +19,6 @@ package Koha::Club; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Enrollment.pm b/Koha/Club/Enrollment.pm index 143a1e95ec9..e9e434bc176 100644 --- a/Koha/Club/Enrollment.pm +++ b/Koha/Club/Enrollment.pm @@ -19,12 +19,11 @@ package Koha::Club::Enrollment; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Clubs; use Koha::Patrons; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string ); use DateTime; use base qw(Koha::Object); diff --git a/Koha/Club/Enrollment/Field.pm b/Koha/Club/Enrollment/Field.pm index 0a616bbfc41..54ffaff0319 100644 --- a/Koha/Club/Enrollment/Field.pm +++ b/Koha/Club/Enrollment/Field.pm @@ -19,7 +19,6 @@ package Koha::Club::Enrollment::Field; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Enrollment/Fields.pm b/Koha/Club/Enrollment/Fields.pm index 29f6fa22386..590c2651613 100644 --- a/Koha/Club/Enrollment/Fields.pm +++ b/Koha/Club/Enrollment/Fields.pm @@ -19,7 +19,6 @@ package Koha::Club::Enrollment::Fields; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Enrollments.pm b/Koha/Club/Enrollments.pm index 3e63f559bdc..8e7327b323d 100644 --- a/Koha/Club/Enrollments.pm +++ b/Koha/Club/Enrollments.pm @@ -19,7 +19,6 @@ package Koha::Club::Enrollments; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Field.pm b/Koha/Club/Field.pm index 764cf2a3537..956ee7ae459 100644 --- a/Koha/Club/Field.pm +++ b/Koha/Club/Field.pm @@ -19,7 +19,6 @@ package Koha::Club::Field; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Fields.pm b/Koha/Club/Fields.pm index 8e72ee8f617..7a2837b1a07 100644 --- a/Koha/Club/Fields.pm +++ b/Koha/Club/Fields.pm @@ -19,7 +19,6 @@ package Koha::Club::Fields; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Hold.pm b/Koha/Club/Hold.pm index 46f9f319330..fbf35f43144 100644 --- a/Koha/Club/Hold.pm +++ b/Koha/Club/Hold.pm @@ -19,7 +19,6 @@ package Koha::Club::Hold; use Modern::Perl; -use Carp; use Koha::Database; @@ -32,7 +31,7 @@ use Koha::Club::Hold::PatronHold; use Koha::Clubs; use Koha::Patrons; -use List::Util 'shuffle'; +use List::Util qw( shuffle ); =head1 NAME diff --git a/Koha/Club/Hold/PatronHold.pm b/Koha/Club/Hold/PatronHold.pm index 4368a39c954..b24b33fc2e1 100644 --- a/Koha/Club/Hold/PatronHold.pm +++ b/Koha/Club/Hold/PatronHold.pm @@ -19,7 +19,6 @@ package Koha::Club::Hold::PatronHold; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Hold/PatronHolds.pm b/Koha/Club/Hold/PatronHolds.pm index f7d4ad70cab..76fffcbdcc0 100644 --- a/Koha/Club/Hold/PatronHolds.pm +++ b/Koha/Club/Hold/PatronHolds.pm @@ -19,7 +19,6 @@ package Koha::Club::Hold::PatronHolds; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Holds.pm b/Koha/Club/Holds.pm index 6ec9f413d19..8a8a20334c3 100644 --- a/Koha/Club/Holds.pm +++ b/Koha/Club/Holds.pm @@ -19,7 +19,6 @@ package Koha::Club::Holds; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Template.pm b/Koha/Club/Template.pm index bdf8019cff2..57d87f95369 100644 --- a/Koha/Club/Template.pm +++ b/Koha/Club/Template.pm @@ -19,7 +19,6 @@ package Koha::Club::Template; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Template/EnrollmentField.pm b/Koha/Club/Template/EnrollmentField.pm index bca9123809c..ba1fdb0b1db 100644 --- a/Koha/Club/Template/EnrollmentField.pm +++ b/Koha/Club/Template/EnrollmentField.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::EnrollmentField; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Template/EnrollmentFields.pm b/Koha/Club/Template/EnrollmentFields.pm index 27996bf529a..4b383f5a97a 100644 --- a/Koha/Club/Template/EnrollmentFields.pm +++ b/Koha/Club/Template/EnrollmentFields.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::EnrollmentFields; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Template/Field.pm b/Koha/Club/Template/Field.pm index 9255fda188d..ab5cb809b16 100644 --- a/Koha/Club/Template/Field.pm +++ b/Koha/Club/Template/Field.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::Field; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Template/Fields.pm b/Koha/Club/Template/Fields.pm index 1fee0a1745b..bf9fd9bd549 100644 --- a/Koha/Club/Template/Fields.pm +++ b/Koha/Club/Template/Fields.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::Fields; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Club/Templates.pm b/Koha/Club/Templates.pm index 00940a760ca..b365ade79b5 100644 --- a/Koha/Club/Templates.pm +++ b/Koha/Club/Templates.pm @@ -19,7 +19,6 @@ package Koha::Club::Templates; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Clubs.pm b/Koha/Clubs.pm index 28fa41e81ac..d206b9023af 100644 --- a/Koha/Clubs.pm +++ b/Koha/Clubs.pm @@ -19,7 +19,6 @@ package Koha::Clubs; use Modern::Perl; -use Carp; use Koha::Database; use Koha::DateUtils qw( dt_from_string ); diff --git a/Koha/Config/SysPref.pm b/Koha/Config/SysPref.pm index 1775160cb5e..c558d5f12c9 100644 --- a/Koha/Config/SysPref.pm +++ b/Koha/Config/SysPref.pm @@ -19,11 +19,10 @@ package Koha::Config::SysPref; use Modern::Perl; -use Carp; use Koha::Database; -use C4::Log; +use C4::Log (); use base qw(Koha::Object); diff --git a/Koha/Config/SysPrefs.pm b/Koha/Config/SysPrefs.pm index 6a5ad952f56..8b08d71a322 100644 --- a/Koha/Config/SysPrefs.pm +++ b/Koha/Config/SysPrefs.pm @@ -19,7 +19,6 @@ package Koha::Config::SysPrefs; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Course.pm b/Koha/Course.pm index 0ce658b0b42..9ede81bd3ce 100644 --- a/Koha/Course.pm +++ b/Koha/Course.pm @@ -17,7 +17,6 @@ package Koha::Course; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Course/Instructor.pm b/Koha/Course/Instructor.pm index 62385d0b751..e6c4db97398 100644 --- a/Koha/Course/Instructor.pm +++ b/Koha/Course/Instructor.pm @@ -17,7 +17,6 @@ package Koha::Course::Instructor; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Course/Instructors.pm b/Koha/Course/Instructors.pm index 68211eb793f..f69dd48ca09 100644 --- a/Koha/Course/Instructors.pm +++ b/Koha/Course/Instructors.pm @@ -17,7 +17,6 @@ package Koha::Course::Instructors; use Modern::Perl; -use Carp; use Koha::Course::Instructor; diff --git a/Koha/Course/Item.pm b/Koha/Course/Item.pm index 948a90c84bd..d55382c7a2c 100644 --- a/Koha/Course/Item.pm +++ b/Koha/Course/Item.pm @@ -17,7 +17,6 @@ package Koha::Course::Item; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Course/Items.pm b/Koha/Course/Items.pm index 7fc713dee12..9076540c7a2 100644 --- a/Koha/Course/Items.pm +++ b/Koha/Course/Items.pm @@ -17,7 +17,6 @@ package Koha::Course::Items; use Modern::Perl; -use Carp; use Koha::Course::Item; diff --git a/Koha/Course/Reserve.pm b/Koha/Course/Reserve.pm index ff2e0711c52..963a2ee272d 100644 --- a/Koha/Course/Reserve.pm +++ b/Koha/Course/Reserve.pm @@ -17,7 +17,6 @@ package Koha::Course::Reserve; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Course/Reserves.pm b/Koha/Course/Reserves.pm index 631ba49a935..e96cee63167 100644 --- a/Koha/Course/Reserves.pm +++ b/Koha/Course/Reserves.pm @@ -17,7 +17,6 @@ package Koha::Course::Reserves; use Modern::Perl; -use Carp; use Koha::Course::Reserve; diff --git a/Koha/Courses.pm b/Koha/Courses.pm index f0fb3ec29de..df2a74163ec 100644 --- a/Koha/Courses.pm +++ b/Koha/Courses.pm @@ -17,7 +17,6 @@ package Koha::Courses; use Modern::Perl; -use Carp; use Koha::Course; diff --git a/Koha/CoverImage.pm b/Koha/CoverImage.pm index 7edb35b5821..5f87579020d 100644 --- a/Koha/CoverImage.pm +++ b/Koha/CoverImage.pm @@ -17,8 +17,7 @@ package Koha::CoverImage; use Modern::Perl; -use Carp; -use GD; +use GD (); use Koha::Database; diff --git a/Koha/CoverImages.pm b/Koha/CoverImages.pm index 4dff96d9e59..bf807b08134 100644 --- a/Koha/CoverImages.pm +++ b/Koha/CoverImages.pm @@ -17,7 +17,6 @@ package Koha::CoverImages; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/CsvProfile.pm b/Koha/CsvProfile.pm index 68fd8cfec2b..c0d4d6a57c8 100644 --- a/Koha/CsvProfile.pm +++ b/Koha/CsvProfile.pm @@ -17,7 +17,6 @@ package Koha::CsvProfile; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/CsvProfiles.pm b/Koha/CsvProfiles.pm index 05dc6a3f7db..1ea493a4477 100644 --- a/Koha/CsvProfiles.pm +++ b/Koha/CsvProfiles.pm @@ -17,7 +17,6 @@ package Koha::CsvProfiles; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Database.pm b/Koha/Database.pm index df4d45ce7b2..fec7424eb37 100644 --- a/Koha/Database.pm +++ b/Koha/Database.pm @@ -33,7 +33,6 @@ Koha::Database =cut use Modern::Perl; -use Carp; use C4::Context; use base qw(Class::Accessor); diff --git a/Koha/Desk.pm b/Koha/Desk.pm index cd4379d9586..b92ec93e403 100644 --- a/Koha/Desk.pm +++ b/Koha/Desk.pm @@ -18,7 +18,6 @@ package Koha::Desk; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Desks.pm b/Koha/Desks.pm index a8b452cc7ef..20fb541c663 100644 --- a/Koha/Desks.pm +++ b/Koha/Desks.pm @@ -19,7 +19,6 @@ package Koha::Desks; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/EDI.pm b/Koha/EDI.pm index dff62b15a2b..2d921dc5943 100644 --- a/Koha/EDI.pm +++ b/Koha/EDI.pm @@ -21,21 +21,26 @@ use strict; use warnings; use base qw(Exporter); use utf8; -use Carp; +use Carp qw( carp ); use English qw{ -no_match_vars }; -use Business::ISBN; +use Business::ISBN (); use DateTime; use C4::Context; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use C4::Acquisition qw( NewBasket ModOrder); use C4::Suggestions qw( ModSuggestion ); -use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField AddBiblio TransformKohaToMarc ); +use C4::Biblio qw( + AddBiblio + GetFrameworkCode + GetMarcFromKohaField + TransformKohaToMarc +); use Koha::Edifact::Order; use Koha::Edifact; -use C4::Log qw(logaction); +use C4::Log qw( logaction ); use Log::Log4perl; -use Text::Unidecode; +use Text::Unidecode qw( unidecode ); use Koha::Plugins::Handler; use Koha::Acquisition::Baskets; use Koha::Acquisition::Booksellers; diff --git a/Koha/Edifact.pm b/Koha/Edifact.pm index 38756270b27..b3b3bf473ed 100644 --- a/Koha/Edifact.pm +++ b/Koha/Edifact.pm @@ -19,9 +19,8 @@ package Koha::Edifact; use strict; use warnings; -use File::Slurp; -use Carp; -use Encode qw( from_to ); +use File::Slurp qw( read_file ); +use Carp qw( carp croak ); use Koha::Edifact::Segment; use Koha::Edifact::Message; diff --git a/Koha/Edifact/Line.pm b/Koha/Edifact/Line.pm index 8d14ba5e5f8..45bd39ec68d 100644 --- a/Koha/Edifact/Line.pm +++ b/Koha/Edifact/Line.pm @@ -21,9 +21,9 @@ use strict; use warnings; use utf8; -use MARC::Record; +use MARC::Record (); use MARC::Field; -use Carp; +use Carp qw( carp ); sub new { my ( $class, $data_array_ref ) = @_; diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm index f1648c6ab4d..772eb03861e 100644 --- a/Koha/Edifact/Order.pm +++ b/Koha/Edifact/Order.pm @@ -21,12 +21,11 @@ use utf8; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use Carp; +use Carp qw( carp ); use DateTime; -use Readonly; -use Business::ISBN; +use Readonly qw( Readonly ); use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use C4::Budgets qw( GetBudget ); use Koha::Acquisition::Orders; diff --git a/Koha/Edifact/Transport.pm b/Koha/Edifact/Transport.pm index e52b6ef468b..833c44e896a 100644 --- a/Koha/Edifact/Transport.pm +++ b/Koha/Edifact/Transport.pm @@ -21,15 +21,14 @@ use strict; use warnings; use utf8; use DateTime; -use Carp; +use Carp qw( carp ); use English qw{ -no_match_vars }; use Net::FTP; use Net::SFTP::Foreign; -use File::Slurp; -use File::Copy; -use File::Basename qw( fileparse ); +use File::Slurp qw( read_file ); +use File::Copy qw( copy move ); use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Encode qw( from_to ); sub new { diff --git a/Koha/Email.pm b/Koha/Email.pm index 9c077a6b84b..5083af8bbd9 100644 --- a/Koha/Email.pm +++ b/Koha/Email.pm @@ -22,7 +22,7 @@ use Modern::Perl; use Email::Valid; use Email::MessageID; -use List::Util qw(pairs); +use List::Util qw( pairs ); use Koha::Exceptions; diff --git a/Koha/Exporter/Record.pm b/Koha/Exporter/Record.pm index ab7ad296de1..05cfe3e2a71 100644 --- a/Koha/Exporter/Record.pm +++ b/Koha/Exporter/Record.pm @@ -5,11 +5,11 @@ use MARC::File::XML; use MARC::File::USMARC; use C4::AuthoritiesMarc; -use C4::Biblio qw( RemoveAllNsb GetMarcBiblio EmbedItemsInMarcBiblio GetMarcFromKohaField ); +use C4::Biblio qw( GetMarcFromKohaField ); use C4::Record; use Koha::CsvProfiles; use Koha::Logger; -use List::Util qw(all any); +use List::Util qw( all any ); sub _get_record_for_export { my ($params) = @_; diff --git a/Koha/ExternalContent.pm b/Koha/ExternalContent.pm index 148cd380a2e..91fc37d6c80 100644 --- a/Koha/ExternalContent.pm +++ b/Koha/ExternalContent.pm @@ -18,13 +18,13 @@ package Koha::ExternalContent; use Modern::Perl; -use Carp; +use Carp qw( croak ); use base qw(Class::Accessor); use Koha; use Koha::Logger; use Koha::Patrons; -use C4::Auth qw( get_session ); +use C4::Auth (); __PACKAGE__->mk_accessors(qw(client koha_session_id koha_patron logger)); diff --git a/Koha/ExternalContent/OverDrive.pm b/Koha/ExternalContent/OverDrive.pm index ad36c18ce89..6247dfee6e8 100644 --- a/Koha/ExternalContent/OverDrive.pm +++ b/Koha/ExternalContent/OverDrive.pm @@ -18,7 +18,7 @@ package Koha::ExternalContent::OverDrive; use Modern::Perl; -use Carp; +use Carp qw( croak ); use base qw(Koha::ExternalContent); use WebService::ILS::OverDrive::Patron; diff --git a/Koha/ExternalContent/RecordedBooks.pm b/Koha/ExternalContent/RecordedBooks.pm index 2e8c33bffdb..10e5b6bd65e 100644 --- a/Koha/ExternalContent/RecordedBooks.pm +++ b/Koha/ExternalContent/RecordedBooks.pm @@ -18,7 +18,7 @@ package Koha::ExternalContent::RecordedBooks; use Modern::Perl; -use Carp; +use Carp qw( croak ); use base qw(Koha::ExternalContent); use WebService::ILS::RecordedBooks::PartnerPatron; diff --git a/Koha/Filter/MARC/EmbedItems.pm b/Koha/Filter/MARC/EmbedItems.pm index ae8ec34a263..386cd28d3c1 100644 --- a/Koha/Filter/MARC/EmbedItems.pm +++ b/Koha/Filter/MARC/EmbedItems.pm @@ -52,7 +52,7 @@ Filter to embed items information into MARC::Record objects. use Modern::Perl; -use C4::Biblio; +use C4::Biblio (); use base qw(Koha::RecordProcessor::Base); our $NAME = 'EmbedItems'; diff --git a/Koha/Filter/MARC/EmbedItemsAvailability.pm b/Koha/Filter/MARC/EmbedItemsAvailability.pm index ac4eaee1d4d..2e8a6c0e84a 100644 --- a/Koha/Filter/MARC/EmbedItemsAvailability.pm +++ b/Koha/Filter/MARC/EmbedItemsAvailability.pm @@ -32,7 +32,7 @@ Filter to embed items not on loan count information into MARC records. use Modern::Perl; -use C4::Biblio qw/GetMarcFromKohaField/; +use C4::Biblio qw( GetMarcFromKohaField ); use Koha::Items; use base qw(Koha::RecordProcessor::Base); diff --git a/Koha/Filter/MARC/EmbedSeeFromHeadings.pm b/Koha/Filter/MARC/EmbedSeeFromHeadings.pm index 9ed7b45bea5..b00a9a2d6ed 100644 --- a/Koha/Filter/MARC/EmbedSeeFromHeadings.pm +++ b/Koha/Filter/MARC/EmbedSeeFromHeadings.pm @@ -32,9 +32,8 @@ Filter to embed see from headings into MARC records. use strict; use warnings; -use Carp; use Koha::MetadataRecord::Authority; -use C4::Biblio qw/GetMarcFromKohaField/; +use C4::Biblio qw( GetMarcFromKohaField ); use base qw(Koha::RecordProcessor::Base); our $NAME = 'EmbedSeeFromHeadings'; diff --git a/Koha/Filter/MARC/Null.pm b/Koha/Filter/MARC/Null.pm index dc5a016934b..d504fe41da3 100644 --- a/Koha/Filter/MARC/Null.pm +++ b/Koha/Filter/MARC/Null.pm @@ -33,7 +33,6 @@ RecordProcessor. use strict; use warnings; -use Carp; use base qw(Koha::RecordProcessor::Base); our $NAME = 'Null'; diff --git a/Koha/Filter/MARC/ViewPolicy.pm b/Koha/Filter/MARC/ViewPolicy.pm index 01b2e68ef30..0523b1bc51b 100644 --- a/Koha/Filter/MARC/ViewPolicy.pm +++ b/Koha/Filter/MARC/ViewPolicy.pm @@ -39,7 +39,6 @@ menu. =cut use Modern::Perl; -use Carp; use C4::Biblio qw( GetMarcStructure ); use base qw(Koha::RecordProcessor::Base); diff --git a/Koha/Hold.pm b/Koha/Hold.pm index 930ba6b1bfa..0aa9eab133c 100644 --- a/Koha/Hold.pm +++ b/Koha/Hold.pm @@ -20,16 +20,15 @@ package Koha::Hold; use Modern::Perl; -use Carp; -use Data::Dumper qw(Dumper); -use List::MoreUtils qw(any); +use Data::Dumper qw( Dumper ); +use List::MoreUtils qw( any ); use C4::Context qw(preference); use C4::Letters qw( GetPreparedLetter EnqueueLetter ); -use C4::Log; +use C4::Log qw( logaction ); use Koha::AuthorisedValues; -use Koha::DateUtils qw(dt_from_string output_pref); +use Koha::DateUtils qw( dt_from_string ); use Koha::Patrons; use Koha::Biblios; use Koha::Items; diff --git a/Koha/Holds.pm b/Koha/Holds.pm index 296f99cb0a1..fdc492b0ce7 100644 --- a/Koha/Holds.pm +++ b/Koha/Holds.pm @@ -19,7 +19,6 @@ package Koha::Holds; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/I18N.pm b/Koha/I18N.pm index bc6c6e4ce78..4cb425f8878 100644 --- a/Koha/I18N.pm +++ b/Koha/I18N.pm @@ -19,14 +19,13 @@ package Koha::I18N; use Modern::Perl; -use CGI; -use C4::Languages qw( getlanguage ); +use C4::Languages (); use C4::Context; -use Encode; +use Encode (); use List::Util qw( first ); use Locale::Messages qw(:locale_h LC_MESSAGES); -use POSIX qw( setlocale ); +use POSIX (); use Koha::Cache::Memory::Lite; use parent 'Exporter'; diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 770c6a364cc..4c34bd4b511 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -19,16 +19,14 @@ package Koha::Illrequest; use Modern::Perl; -use Clone 'clone'; -use File::Basename qw( basename ); -use Encode qw( encode ); -use Try::Tiny; +use Clone qw( clone ); +use Try::Tiny qw( catch try ); use DateTime; -use C4::Letters qw( EnqueueLetter GetPreparedLetter ); -use C4::Members; +use C4::Letters (); +use C4::Members (); use Koha::Database; -use Koha::DateUtils qw/ dt_from_string /; +use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions::Ill; use Koha::Illcomments; use Koha::Illrequestattributes; diff --git a/Koha/Illrequest/Availability.pm b/Koha/Illrequest/Availability.pm index 9013c1749ae..d57a4db5b60 100644 --- a/Koha/Illrequest/Availability.pm +++ b/Koha/Illrequest/Availability.pm @@ -19,7 +19,7 @@ package Koha::Illrequest::Availability; use Modern::Perl; -use JSON; +use JSON (); use MIME::Base64 qw( encode_base64 ); use URI::Escape qw( uri_escape ); use Encode qw( encode ); diff --git a/Koha/Illrequest/Config.pm b/Koha/Illrequest/Config.pm index 9eaf6233058..82b77685aca 100644 --- a/Koha/Illrequest/Config.pm +++ b/Koha/Illrequest/Config.pm @@ -19,7 +19,7 @@ package Koha::Illrequest::Config; use Modern::Perl; -use File::Basename qw/basename/; +use File::Basename qw( basename ); use C4::Context; diff --git a/Koha/Illrequest/Logger.pm b/Koha/Illrequest/Logger.pm index 7bc5ef3360f..2e7b1f09d7d 100644 --- a/Koha/Illrequest/Logger.pm +++ b/Koha/Illrequest/Logger.pm @@ -18,8 +18,7 @@ package Koha::Illrequest::Logger; # along with Koha; if not, see . use Modern::Perl; -use JSON qw( to_json from_json ); -use Time::Local; +use JSON qw( from_json to_json ); use C4::Koha qw( GetAuthorisedValues ); use C4::Context; diff --git a/Koha/Indexer/Utils.pm b/Koha/Indexer/Utils.pm index 4578d3d91e1..102b4e72f26 100644 --- a/Koha/Indexer/Utils.pm +++ b/Koha/Indexer/Utils.pm @@ -20,7 +20,7 @@ use strict; use warnings; use 5.010; -use XML::LibXML; +use XML::LibXML (); =head1 Koha::Indexer::Utils diff --git a/Koha/Item.pm b/Koha/Item.pm index a76bb01c0db..24d37d18f49 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -19,17 +19,15 @@ package Koha::Item; use Modern::Perl; -use Carp; -use List::MoreUtils qw(any); -use Data::Dumper; -use Try::Tiny; +use List::MoreUtils qw( any ); +use Data::Dumper qw( Dumper ); use Koha::Database; use Koha::DateUtils qw( dt_from_string ); use C4::Context; use C4::Circulation qw( GetBranchItemRule ); -use C4::Reserves qw( GetReservesControlBranch ); +use C4::Reserves (); use C4::ClassSource qw( GetClassSort ); use C4::Log qw( logaction ); diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm index 6b783f04113..74ed9d5b92e 100644 --- a/Koha/Item/Transfer.pm +++ b/Koha/Item/Transfer.pm @@ -17,12 +17,10 @@ package Koha::Item::Transfer; use Modern::Perl; -use Carp; - use C4::Items qw( CartToShelf ModDateLastSeen ); use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions::Item::Transfer; use base qw(Koha::Object); diff --git a/Koha/Item/Transfer/Limit.pm b/Koha/Item/Transfer/Limit.pm index db9db5037c0..195e54e1718 100644 --- a/Koha/Item/Transfer/Limit.pm +++ b/Koha/Item/Transfer/Limit.pm @@ -18,7 +18,6 @@ package Koha::Item::Transfer::Limit; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Item/Transfers.pm b/Koha/Item/Transfers.pm index 738cc2aea80..be5c0e098c0 100644 --- a/Koha/Item/Transfers.pm +++ b/Koha/Item/Transfers.pm @@ -17,7 +17,6 @@ package Koha::Item::Transfers; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm index 6d7c0013529..18076039d93 100644 --- a/Koha/ItemType.pm +++ b/Koha/ItemType.pm @@ -17,10 +17,9 @@ package Koha::ItemType; use Modern::Perl; -use Carp; use C4::Koha qw( getitemtypeimagelocation ); -use C4::Languages qw( getlanguage ); +use C4::Languages (); use Koha::Database; use Koha::CirculationRules; use Koha::Localizations; diff --git a/Koha/ItemTypes.pm b/Koha/ItemTypes.pm index 49ffb5f4017..4a25d5e3011 100644 --- a/Koha/ItemTypes.pm +++ b/Koha/ItemTypes.pm @@ -17,9 +17,8 @@ package Koha::ItemTypes; use Modern::Perl; -use Carp; -use C4::Languages qw( getlanguage ); +use C4::Languages (); use Koha::Database; use Koha::ItemType; diff --git a/Koha/Items.pm b/Koha/Items.pm index 16479835536..2643223d3bb 100644 --- a/Koha/Items.pm +++ b/Koha/Items.pm @@ -19,7 +19,6 @@ package Koha::Items; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/KeyboardShortcut.pm b/Koha/KeyboardShortcut.pm index 332d047dc1a..da13ce147b5 100644 --- a/Koha/KeyboardShortcut.pm +++ b/Koha/KeyboardShortcut.pm @@ -17,7 +17,6 @@ package Koha::KeyboardShortcut; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/KeyboardShortcuts.pm b/Koha/KeyboardShortcuts.pm index de5c4a1d67b..d75f4ce880c 100644 --- a/Koha/KeyboardShortcuts.pm +++ b/Koha/KeyboardShortcuts.pm @@ -17,7 +17,6 @@ package Koha::KeyboardShortcuts; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Libraries.pm b/Koha/Libraries.pm index 8a45cc26add..20ceb8aa348 100644 --- a/Koha/Libraries.pm +++ b/Koha/Libraries.pm @@ -19,7 +19,6 @@ package Koha::Libraries; use Modern::Perl; -use Carp; use C4::Context; diff --git a/Koha/Library.pm b/Koha/Library.pm index af2319a3f68..7ee84baca46 100644 --- a/Koha/Library.pm +++ b/Koha/Library.pm @@ -19,7 +19,6 @@ package Koha::Library; use Modern::Perl; -use Carp; use C4::Context; diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm index 4a4ea032743..aaf68530d5a 100644 --- a/Koha/Library/Group.pm +++ b/Koha/Library/Group.pm @@ -19,10 +19,9 @@ package Koha::Library::Group; use Modern::Perl; -use Carp; use Koha::Database; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string ); use Koha::Libraries; use base qw(Koha::Object); diff --git a/Koha/Library/Groups.pm b/Koha/Library/Groups.pm index dc17c21c519..f72e544262f 100644 --- a/Koha/Library/Groups.pm +++ b/Koha/Library/Groups.pm @@ -19,7 +19,6 @@ package Koha::Library::Groups; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Library/OverDriveInfo.pm b/Koha/Library/OverDriveInfo.pm index e234b71bfab..0554c0b0d84 100644 --- a/Koha/Library/OverDriveInfo.pm +++ b/Koha/Library/OverDriveInfo.pm @@ -17,7 +17,6 @@ package Koha::Library::OverDriveInfo; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Library/OverDriveInfos.pm b/Koha/Library/OverDriveInfos.pm index d8a028eb6b3..3a3509d6a0c 100644 --- a/Koha/Library/OverDriveInfos.pm +++ b/Koha/Library/OverDriveInfos.pm @@ -17,7 +17,6 @@ package Koha::Library::OverDriveInfos; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Linktracker.pm b/Koha/Linktracker.pm index 4adea13d51f..d4519e396d4 100644 --- a/Koha/Linktracker.pm +++ b/Koha/Linktracker.pm @@ -32,7 +32,6 @@ Koha::Linktracker =cut use Modern::Perl; -use Carp; use C4::Context; use base qw(Class::Accessor); diff --git a/Koha/List/Patron.pm b/Koha/List/Patron.pm index c6f43848a31..28b1cd93baf 100644 --- a/Koha/List/Patron.pm +++ b/Koha/List/Patron.pm @@ -27,7 +27,7 @@ Koha::List::Patron - Management of lists of patrons use Modern::Perl; -use Carp; +use Carp qw( carp croak ); use Koha::Database; diff --git a/Koha/Logger.pm b/Koha/Logger.pm index 2751bf189b6..c91a3bb3b48 100644 --- a/Koha/Logger.pm +++ b/Koha/Logger.pm @@ -37,7 +37,6 @@ Koha::Logger use Modern::Perl; use Log::Log4perl; -use Carp; use C4::Context; diff --git a/Koha/MarcSubfieldStructure.pm b/Koha/MarcSubfieldStructure.pm index fb80dd086fc..e88d0da2cf8 100644 --- a/Koha/MarcSubfieldStructure.pm +++ b/Koha/MarcSubfieldStructure.pm @@ -17,7 +17,6 @@ package Koha::MarcSubfieldStructure; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/MarcSubfieldStructures.pm b/Koha/MarcSubfieldStructures.pm index e1e6bc8814e..03d3eba17c5 100644 --- a/Koha/MarcSubfieldStructures.pm +++ b/Koha/MarcSubfieldStructures.pm @@ -17,7 +17,6 @@ package Koha::MarcSubfieldStructures; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/MessageAttribute.pm b/Koha/MessageAttribute.pm index acc7ccc9692..c728b3415fa 100644 --- a/Koha/MessageAttribute.pm +++ b/Koha/MessageAttribute.pm @@ -19,7 +19,6 @@ package Koha::MessageAttribute; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/MessageAttributes.pm b/Koha/MessageAttributes.pm index 2c314d73011..5bc70575083 100644 --- a/Koha/MessageAttributes.pm +++ b/Koha/MessageAttributes.pm @@ -19,7 +19,6 @@ package Koha::MessageAttributes; use Modern::Perl; -use Carp; use base qw(Koha::Objects); use Koha::MessageAttribute; diff --git a/Koha/MetaSearcher.pm b/Koha/MetaSearcher.pm index 80a74c3bf9d..a61dfb4aa44 100644 --- a/Koha/MetaSearcher.pm +++ b/Koha/MetaSearcher.pm @@ -29,9 +29,9 @@ use Koha::Caches; use Koha::Database; use Koha::MetadataRecord; use MARC::File::XML; -use Storable qw( store_fd fd_retrieve ); +use Storable qw( fd_retrieve store_fd ); use Time::HiRes qw( clock_gettime CLOCK_MONOTONIC ); -use UUID; +use UUID (); use ZOOM; use sort 'stable'; diff --git a/Koha/MetadataRecord.pm b/Koha/MetadataRecord.pm index a8eb5875f17..8eaaad6ec12 100644 --- a/Koha/MetadataRecord.pm +++ b/Koha/MetadataRecord.pm @@ -34,8 +34,8 @@ and authority) records in Koha. use Modern::Perl; -use Carp; -use C4::Biblio qw( TransformMarcToKoha TransformMarcToKohaOneField ); +use Carp qw( carp ); +use C4::Biblio (); use Koha::Util::MARC; use base qw(Class::Accessor); diff --git a/Koha/MetadataRecord/Authority.pm b/Koha/MetadataRecord/Authority.pm index 655cc2edf8d..329d68c9b1b 100644 --- a/Koha/MetadataRecord/Authority.pm +++ b/Koha/MetadataRecord/Authority.pm @@ -33,9 +33,8 @@ Authority data. use strict; use warnings; -use Carp; use C4::Context; -use MARC::Record; +use MARC::Record (); use MARC::File::XML; use C4::Charset qw( StripNonXmlChars ); use Koha::Util::MARC; diff --git a/Koha/Middleware/RealIP.pm b/Koha/Middleware/RealIP.pm index fc9f280ff68..535b4ac8177 100644 --- a/Koha/Middleware/RealIP.pm +++ b/Koha/Middleware/RealIP.pm @@ -23,8 +23,7 @@ use parent qw(Plack::Middleware); use C4::Context; -use Net::Netmask; -use Plack::Util::Accessor qw( trusted_proxy ); +use Net::Netmask (); =head1 METHODS diff --git a/Koha/News.pm b/Koha/News.pm index c7d93faa0ab..c9544290a70 100644 --- a/Koha/News.pm +++ b/Koha/News.pm @@ -19,7 +19,6 @@ package Koha::News; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/NewsItem.pm b/Koha/NewsItem.pm index 75dc78723e1..f9c2314978c 100644 --- a/Koha/NewsItem.pm +++ b/Koha/NewsItem.pm @@ -19,7 +19,6 @@ package Koha::NewsItem; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Patrons; diff --git a/Koha/Notice/Message.pm b/Koha/Notice/Message.pm index 3cdb09d12a6..fcf7eca2a67 100644 --- a/Koha/Notice/Message.pm +++ b/Koha/Notice/Message.pm @@ -17,7 +17,6 @@ package Koha::Notice::Message; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Notice/Messages.pm b/Koha/Notice/Messages.pm index 3ef9d947314..3fedd5d1424 100644 --- a/Koha/Notice/Messages.pm +++ b/Koha/Notice/Messages.pm @@ -17,7 +17,6 @@ package Koha::Notice::Messages; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Notice/Template.pm b/Koha/Notice/Template.pm index 95003a7a1cc..76694816902 100644 --- a/Koha/Notice/Template.pm +++ b/Koha/Notice/Template.pm @@ -17,7 +17,6 @@ package Koha::Notice::Template; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Notice/Templates.pm b/Koha/Notice/Templates.pm index 8105f975680..27922e6aa00 100644 --- a/Koha/Notice/Templates.pm +++ b/Koha/Notice/Templates.pm @@ -17,7 +17,6 @@ package Koha::Notice::Templates; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Number/Price.pm b/Koha/Number/Price.pm index e9a6aa748e3..aeb7ee863e2 100644 --- a/Koha/Number/Price.pm +++ b/Koha/Number/Price.pm @@ -19,7 +19,7 @@ package Koha::Number::Price; use Modern::Perl; -use Number::Format; +use Number::Format (); use C4::Context; use Koha::Acquisition::Currencies; diff --git a/Koha/OAI/Server/GetRecord.pm b/Koha/OAI/Server/GetRecord.pm index db94c517c57..4e4985ea8e1 100644 --- a/Koha/OAI/Server/GetRecord.pm +++ b/Koha/OAI/Server/GetRecord.pm @@ -20,8 +20,7 @@ package Koha::OAI::Server::GetRecord; use Modern::Perl; use HTTP::OAI; -use C4::Biblio; -use C4::OAI::Sets; +use C4::OAI::Sets qw( GetOAISetsBiblio ); use MARC::File::XML; use base ("HTTP::OAI::GetRecord"); diff --git a/Koha/OAI/Server/ListBase.pm b/Koha/OAI/Server/ListBase.pm index 03d13f7a0a3..877f7c137da 100644 --- a/Koha/OAI/Server/ListBase.pm +++ b/Koha/OAI/Server/ListBase.pm @@ -28,12 +28,11 @@ Koha::OAI::Server::ListBase contains OAI-PMH functions shared by ListIdentifiers =cut use Modern::Perl; -use C4::Biblio; use HTTP::OAI; use Koha::OAI::Server::ResumptionToken; use Koha::OAI::Server::Record; use Koha::OAI::Server::DeletedRecord; -use C4::OAI::Sets; +use C4::OAI::Sets qw( GetOAISetBySpec GetOAISetsBiblio ); use MARC::File::XML; sub GetRecords { diff --git a/Koha/OAI/Server/ListSets.pm b/Koha/OAI/Server/ListSets.pm index 68264787f1f..8a4be18ae42 100644 --- a/Koha/OAI/Server/ListSets.pm +++ b/Koha/OAI/Server/ListSets.pm @@ -22,7 +22,7 @@ use Modern::Perl; use HTTP::OAI; use Koha::OAI::Server::ResumptionToken; use Koha::OAI::Server::Description; -use C4::OAI::Sets; +use C4::OAI::Sets qw( GetOAISets ); use base ("HTTP::OAI::ListSets"); diff --git a/Koha/OAI/Server/Record.pm b/Koha/OAI/Server/Record.pm index ecc40022018..fe555916e89 100644 --- a/Koha/OAI/Server/Record.pm +++ b/Koha/OAI/Server/Record.pm @@ -21,7 +21,7 @@ package Koha::OAI::Server::Record; use Modern::Perl; use HTTP::OAI; use HTTP::OAI::Metadata::OAI_DC; -use XML::LibXML; +use XML::LibXML (); use base ("HTTP::OAI::Record"); diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm index ad18c2dc139..389c33afe51 100644 --- a/Koha/OAI/Server/Repository.pm +++ b/Koha/OAI/Server/Repository.pm @@ -32,10 +32,10 @@ use Koha::OAI::Server::GetRecord; use Koha::OAI::Server::ListRecords; use Koha::OAI::Server::ListIdentifiers; use XML::SAX::Writer; -use YAML::XS; +use YAML::XS (); use CGI qw/:standard -oldstyle_urls/; use C4::Context; -use C4::Biblio; +use C4::Biblio qw( GetMarcBiblio ); use Koha::XSLT::Base; =head1 NAME diff --git a/Koha/Object.pm b/Koha/Object.pm index 806d42d1aaa..5e31cd9bf3d 100644 --- a/Koha/Object.pm +++ b/Koha/Object.pm @@ -20,14 +20,14 @@ package Koha::Object; use Modern::Perl; -use Carp; -use Mojo::JSON; +use Carp qw( croak ); +use Mojo::JSON (); use Scalar::Util qw( blessed looks_like_number ); -use Try::Tiny; +use Try::Tiny qw( catch try ); use Koha::Database; use Koha::Exceptions::Object; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Object::Message; =head1 NAME diff --git a/Koha/Object/Limit/Library.pm b/Koha/Object/Limit/Library.pm index 1b7606f6084..557baf90381 100644 --- a/Koha/Object/Limit/Library.pm +++ b/Koha/Object/Limit/Library.pm @@ -21,7 +21,7 @@ use Koha::Database; use Koha::Exceptions; use Koha::Libraries; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/Objects.pm b/Koha/Objects.pm index fab6f9046db..3ee0a55742d 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -19,7 +19,7 @@ package Koha::Objects; use Modern::Perl; -use Carp; +use Carp qw( carp ); use List::MoreUtils qw( none ); use Class::Inspector; diff --git a/Koha/Old/Holds.pm b/Koha/Old/Holds.pm index e12e1446b2f..415c4c9b7ec 100644 --- a/Koha/Old/Holds.pm +++ b/Koha/Old/Holds.pm @@ -19,7 +19,6 @@ package Koha::Old::Holds; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 98897427070..ccc583e251c 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -20,27 +20,26 @@ package Koha::Patron; use Modern::Perl; -use Carp; use List::MoreUtils qw( any uniq ); use JSON qw( to_json ); -use Unicode::Normalize; +use Unicode::Normalize qw( NFKD ); use C4::Context; -use C4::Log; +use C4::Log qw( logaction ); use Koha::Account; use Koha::ArticleRequests; -use C4::Letters qw( GetPreparedLetter EnqueueLetter ); -use Koha::AuthUtils qw( hash_password is_password_valid ); +use C4::Letters (); +use Koha::AuthUtils (); use Koha::Checkouts; use Koha::Club::Enrollments; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions::Password; use Koha::Holds; use Koha::Old::Checkouts; use Koha::Patron::Attributes; use Koha::Patron::Categories; -use Koha::Patron::Debarments; +use Koha::Patron::Debarments (); use Koha::Patron::HouseboundProfile; use Koha::Patron::HouseboundRole; use Koha::Patron::Images; diff --git a/Koha/Patron/Category.pm b/Koha/Patron/Category.pm index 713dcf92497..892d00c2ae2 100644 --- a/Koha/Patron/Category.pm +++ b/Koha/Patron/Category.pm @@ -17,13 +17,12 @@ package Koha::Patron::Category; use Modern::Perl; -use Carp; -use List::MoreUtils qw(any); +use List::MoreUtils qw( any ); use C4::Members::Messaging; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use base qw(Koha::Object Koha::Object::Limit::Library); diff --git a/Koha/Patron/Discharge.pm b/Koha/Patron/Discharge.pm index 96e674327f8..41c50a0e979 100644 --- a/Koha/Patron/Discharge.pm +++ b/Koha/Patron/Discharge.pm @@ -1,9 +1,9 @@ package Koha::Patron::Discharge; use Modern::Perl; -use CGI; +use CGI (); use File::Temp qw( :POSIX ); -use Carp; +use Carp qw( carp ); use C4::Templates qw ( gettemplate ); use C4::Letters qw( GetPreparedLetter ); @@ -11,7 +11,7 @@ use C4::Letters qw( GetPreparedLetter ); use Koha::Database; use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Patrons; -use Koha::Patron::Debarments; +use Koha::Patron::Debarments (); sub count { my ($params) = @_; diff --git a/Koha/Patron/Image.pm b/Koha/Patron/Image.pm index 06caa3022a0..643ad2c1f01 100644 --- a/Koha/Patron/Image.pm +++ b/Koha/Patron/Image.pm @@ -17,7 +17,6 @@ package Koha::Patron::Image; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Patron/Images.pm b/Koha/Patron/Images.pm index aec39197c29..02a907f09f9 100644 --- a/Koha/Patron/Images.pm +++ b/Koha/Patron/Images.pm @@ -17,7 +17,6 @@ package Koha::Patron::Images; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Patron/Message.pm b/Koha/Patron/Message.pm index d56c07a7121..35269d36a41 100644 --- a/Koha/Patron/Message.pm +++ b/Koha/Patron/Message.pm @@ -17,10 +17,9 @@ package Koha::Patron::Message; use Modern::Perl; -use Carp; use C4::Context; -use C4::Log qw( logaction ); +use C4::Log (); use Koha::Database; diff --git a/Koha/Patron/Messages.pm b/Koha/Patron/Messages.pm index 3bd98e33524..7cc729ac867 100644 --- a/Koha/Patron/Messages.pm +++ b/Koha/Patron/Messages.pm @@ -17,7 +17,6 @@ package Koha::Patron::Messages; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Patron/Modification.pm b/Koha/Patron/Modification.pm index 51f182a80b9..3c92a6286a9 100644 --- a/Koha/Patron/Modification.pm +++ b/Koha/Patron/Modification.pm @@ -19,7 +19,6 @@ package Koha::Patron::Modification; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions::Patron::Modification; @@ -27,9 +26,9 @@ use Koha::Patron::Attribute; use Koha::Patron::Attributes; use Koha::Patron::Modifications; -use JSON; -use List::MoreUtils qw( uniq any ); -use Try::Tiny; +use JSON qw( from_json ); +use List::MoreUtils qw( any uniq ); +use Try::Tiny qw( catch try ); use base qw(Koha::Object); diff --git a/Koha/Patron/Modifications.pm b/Koha/Patron/Modifications.pm index 1ca0ab11633..f6665e8ddbc 100644 --- a/Koha/Patron/Modifications.pm +++ b/Koha/Patron/Modifications.pm @@ -29,8 +29,8 @@ use C4::Context; use Koha::Patron::Attribute; use Koha::Patron::Modification; -use JSON; -use List::Util qw /any none/; +use JSON qw( from_json ); +use List::Util qw( none ); use base qw(Koha::Objects); diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm index 96d423a2601..5fb1402dee2 100644 --- a/Koha/Patron/Password/Recovery.pm +++ b/Koha/Patron/Password/Recovery.pm @@ -20,8 +20,8 @@ package Koha::Patron::Password::Recovery; use Modern::Perl; use C4::Context; use C4::Letters; -use Crypt::Eksblowfish::Bcrypt qw(en_base64); -use Koha::DateUtils; +use Crypt::Eksblowfish::Bcrypt qw( en_base64 ); +use Koha::DateUtils qw( dt_from_string ); our (@ISA, @EXPORT_OK); BEGIN { diff --git a/Koha/Patron/Relationship.pm b/Koha/Patron/Relationship.pm index d8cbb1c18e7..88ede2cc519 100644 --- a/Koha/Patron/Relationship.pm +++ b/Koha/Patron/Relationship.pm @@ -17,9 +17,8 @@ package Koha::Patron::Relationship; use Modern::Perl; -use Carp; use List::MoreUtils qw( any ); -use Try::Tiny; +use Try::Tiny qw( catch try ); use Koha::Database; use Koha::Exceptions::Patron::Relationship; diff --git a/Koha/Patron/Relationships.pm b/Koha/Patron/Relationships.pm index 7c2a9bc51f4..56f0fd9dd52 100644 --- a/Koha/Patron/Relationships.pm +++ b/Koha/Patron/Relationships.pm @@ -17,7 +17,6 @@ package Koha::Patron::Relationships; use Modern::Perl; -use Carp; use List::MoreUtils qw( uniq ); use Koha::Database; diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm index 616fefacbae..4f2b55956a7 100644 --- a/Koha/Patrons.pm +++ b/Koha/Patrons.pm @@ -20,17 +20,15 @@ package Koha::Patrons; use Modern::Perl; -use Carp; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::ArticleRequests; use Koha::ArticleRequest::Status; use Koha::Patron; use Koha::Exceptions::Patron; use Koha::Patron::Categories; -use Date::Calc qw( Today Add_Delta_YMD ); use base qw(Koha::Objects); diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm index a771daa0e4a..054bb59726f 100644 --- a/Koha/Patrons/Import.pm +++ b/Koha/Patrons/Import.pm @@ -17,20 +17,19 @@ package Koha::Patrons::Import; use Modern::Perl; use Moo; -use namespace::clean; -use Carp; +use Carp qw( carp ); use Text::CSV; use Encode qw( decode_utf8 ); -use Try::Tiny; +use Try::Tiny qw( catch try ); use C4::Members qw( checkcardnumber ); use Koha::Libraries; use Koha::Patrons; use Koha::Patron::Categories; -use Koha::Patron::Debarments; -use Koha::DateUtils; +use Koha::Patron::Debarments qw( AddDebarment GetDebarments ); +use Koha::DateUtils qw( dt_from_string output_pref ); =head1 NAME diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index 36e60904159..5674b85b498 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -19,12 +19,11 @@ package Koha::Plugins; use Modern::Perl; -use Array::Utils qw(array_minus); +use Array::Utils qw( array_minus ); use Class::Inspector; -use List::MoreUtils qw(any); -use Module::Load::Conditional qw(can_load); -use Module::Load qw(load); -use Module::Pluggable search_path => ['Koha::Plugin'], except => qr/::Edifact(|::Line|::Message|::Order|::Segment|::Transport)$/; +use List::MoreUtils qw( any ); +use Module::Load::Conditional qw( can_load ); +use Module::Load (); use C4::Context; use C4::Output; diff --git a/Koha/Plugins/Base.pm b/Koha/Plugins/Base.pm index cfdf42fb9fc..e935e74a186 100644 --- a/Koha/Plugins/Base.pm +++ b/Koha/Plugins/Base.pm @@ -19,9 +19,8 @@ package Koha::Plugins::Base; use Modern::Perl; -use Module::Pluggable require => 1; -use Cwd qw(abs_path); -use List::Util qw(max); +use Cwd qw( abs_path ); +use List::Util qw( max ); use base qw{Module::Bundled::Files}; diff --git a/Koha/Plugins/Handler.pm b/Koha/Plugins/Handler.pm index 6c6ae73023c..a32487d4ad0 100644 --- a/Koha/Plugins/Handler.pm +++ b/Koha/Plugins/Handler.pm @@ -19,10 +19,10 @@ package Koha::Plugins::Handler; use Modern::Perl; -use Array::Utils qw(array_minus); -use File::Path qw(remove_tree); +use Array::Utils qw( array_minus ); +use File::Path qw( remove_tree ); -use Module::Load qw(load); +use Module::Load qw( load ); use C4::Context; use Koha::Plugins::Methods; diff --git a/Koha/Plugins/Method.pm b/Koha/Plugins/Method.pm index ce313b5ff02..b6e2e750b8d 100644 --- a/Koha/Plugins/Method.pm +++ b/Koha/Plugins/Method.pm @@ -17,7 +17,6 @@ package Koha::Plugins::Method; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Plugins/Methods.pm b/Koha/Plugins/Methods.pm index 1e3e00d5c4e..e99b8b5b38c 100644 --- a/Koha/Plugins/Methods.pm +++ b/Koha/Plugins/Methods.pm @@ -17,7 +17,6 @@ package Koha::Plugins::Methods; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/PseudonymizedTransaction.pm b/Koha/PseudonymizedTransaction.pm index 78a1190f7c2..70049a48c92 100644 --- a/Koha/PseudonymizedTransaction.pm +++ b/Koha/PseudonymizedTransaction.pm @@ -16,8 +16,7 @@ package Koha::PseudonymizedTransaction; use Modern::Perl; -use Carp; -use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64); +use Crypt::Eksblowfish::Bcrypt qw( bcrypt ); use Koha::Database; use Koha::Exceptions::Config; diff --git a/Koha/PseudonymizedTransactions.pm b/Koha/PseudonymizedTransactions.pm index 06ea08a0103..8b2e60ba683 100644 --- a/Koha/PseudonymizedTransactions.pm +++ b/Koha/PseudonymizedTransactions.pm @@ -16,7 +16,6 @@ package Koha::PseudonymizedTransactions; use Modern::Perl; -use Carp; use Koha::Database; use Koha::PseudonymizedTransaction; diff --git a/Koha/Quote.pm b/Koha/Quote.pm index 49868aa2a3b..3ce1985462c 100644 --- a/Koha/Quote.pm +++ b/Koha/Quote.pm @@ -16,7 +16,6 @@ package Koha::Quote; # along with Koha; if not, see . use Modern::Perl; -use Carp; use Koha::Database; use Koha::Quotes; diff --git a/Koha/Quotes.pm b/Koha/Quotes.pm index 746fff0bc1e..d9fc43f9bf4 100644 --- a/Koha/Quotes.pm +++ b/Koha/Quotes.pm @@ -16,10 +16,9 @@ package Koha::Quotes; # along with Koha; if not, see . use Modern::Perl; -use Carp; use Koha::Database; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string ); use Koha::Quote; use base qw(Koha::Objects); diff --git a/Koha/RDF.pm b/Koha/RDF.pm index 44a91332c50..28ac658dc33 100644 --- a/Koha/RDF.pm +++ b/Koha/RDF.pm @@ -18,7 +18,7 @@ package Koha::RDF; # along with Koha; if not, see . use Modern::Perl; -use URI; +use URI (); use C4::Context; diff --git a/Koha/REST/Plugin/Objects.pm b/Koha/REST/Plugin/Objects.pm index 7ccc1c4cf49..e66c1c4f8e8 100644 --- a/Koha/REST/Plugin/Objects.pm +++ b/Koha/REST/Plugin/Objects.pm @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Plugin'; -use JSON; +use JSON (); =head1 NAME diff --git a/Koha/REST/Plugin/PluginRoutes.pm b/Koha/REST/Plugin/PluginRoutes.pm index d434ee537d3..cf7eea882b9 100644 --- a/Koha/REST/Plugin/PluginRoutes.pm +++ b/Koha/REST/Plugin/PluginRoutes.pm @@ -23,8 +23,8 @@ use Koha::Exceptions::Plugin; use Koha::Plugins; use Koha::Logger; -use Clone qw(clone); -use Try::Tiny; +use Clone qw( clone ); +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/Plugin/Query.pm b/Koha/REST/Plugin/Query.pm index e6bb370d061..5603e602944 100644 --- a/Koha/REST/Plugin/Query.pm +++ b/Koha/REST/Plugin/Query.pm @@ -18,9 +18,9 @@ package Koha::REST::Plugin::Query; use Modern::Perl; use Mojo::Base 'Mojolicious::Plugin'; -use List::MoreUtils qw(any); -use Scalar::Util qw(reftype); -use JSON qw(decode_json); +use List::MoreUtils qw( any ); +use Scalar::Util qw( reftype ); +use JSON qw( decode_json ); use Koha::Exceptions; diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm index 1c6c03582f5..1c22a769d7e 100644 --- a/Koha/REST/V1.pm +++ b/Koha/REST/V1.pm @@ -23,7 +23,7 @@ use C4::Context; use Koha::Logger; use JSON::Validator::OpenAPI::Mojolicious; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Acquisitions/Funds.pm b/Koha/REST/V1/Acquisitions/Funds.pm index ee0704674a0..c4209289fea 100644 --- a/Koha/REST/V1/Acquisitions/Funds.pm +++ b/Koha/REST/V1/Acquisitions/Funds.pm @@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Acquisition::Funds; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Acquisitions/Orders.pm b/Koha/REST/V1/Acquisitions/Orders.pm index e104ce5dea5..cc12ecd2ffb 100644 --- a/Koha/REST/V1/Acquisitions/Orders.pm +++ b/Koha/REST/V1/Acquisitions/Orders.pm @@ -20,12 +20,10 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; use Koha::Acquisition::Orders; -use Koha::DateUtils; -use Clone 'clone'; -use JSON qw(decode_json); +use Clone qw( clone ); use Scalar::Util qw( blessed ); -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Acquisitions/Vendors.pm b/Koha/REST/V1/Acquisitions/Vendors.pm index 8720a426292..eb0d4112e28 100644 --- a/Koha/REST/V1/Acquisitions/Vendors.pm +++ b/Koha/REST/V1/Acquisitions/Vendors.pm @@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Acquisition::Booksellers; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/AdvancedEditorMacro.pm b/Koha/REST/V1/AdvancedEditorMacro.pm index 86a2f466488..472d4ce87c0 100644 --- a/Koha/REST/V1/AdvancedEditorMacro.pm +++ b/Koha/REST/V1/AdvancedEditorMacro.pm @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; use Koha::AdvancedEditorMacros; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 Name diff --git a/Koha/REST/V1/Auth.pm b/Koha/REST/V1/Auth.pm index ea29bd69291..ce99c8bab7b 100644 --- a/Koha/REST/V1/Auth.pm +++ b/Koha/REST/V1/Auth.pm @@ -38,10 +38,10 @@ use Koha::Exceptions; use Koha::Exceptions::Authentication; use Koha::Exceptions::Authorization; -use MIME::Base64; -use Module::Load::Conditional; +use MIME::Base64 qw( decode_base64 ); +use Module::Load::Conditional (); use Scalar::Util qw( blessed ); -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm index 92d31348d45..3ddb896e73e 100644 --- a/Koha/REST/V1/Biblios.pm +++ b/Koha/REST/V1/Biblios.pm @@ -21,12 +21,12 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Biblios; use Koha::RecordProcessor; -use C4::Biblio qw(DelBiblio); +use C4::Biblio qw( DelBiblio ); -use List::MoreUtils qw(any); +use List::MoreUtils qw( any ); use MARC::Record::MiJ; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/CashRegisters/Cashups.pm b/Koha/REST/V1/CashRegisters/Cashups.pm index 8bb483bdde8..12b6f302143 100644 --- a/Koha/REST/V1/CashRegisters/Cashups.pm +++ b/Koha/REST/V1/CashRegisters/Cashups.pm @@ -19,8 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Scalar::Util qw(blessed); -use Try::Tiny; +use Try::Tiny qw( catch try ); use Koha::Cash::Registers; diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm index 8fc07181b11..7b0913184fb 100644 --- a/Koha/REST/V1/Checkouts.pm +++ b/Koha/REST/V1/Checkouts.pm @@ -18,7 +18,7 @@ package Koha::REST::V1::Checkouts; use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Mojo::JSON; +use Mojo::JSON (); use C4::Auth qw( haspermission ); use C4::Context; @@ -26,7 +26,7 @@ use C4::Circulation; use Koha::Checkouts; use Koha::Old::Checkouts; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/CirculationRules.pm b/Koha/REST/V1/CirculationRules.pm index baa04b52117..636985fba64 100644 --- a/Koha/REST/V1/CirculationRules.pm +++ b/Koha/REST/V1/CirculationRules.pm @@ -21,7 +21,6 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::CirculationRules; -use Try::Tiny; =head1 API diff --git a/Koha/REST/V1/Cities.pm b/Koha/REST/V1/Cities.pm index cfa8d53422e..3dfc91d56ff 100644 --- a/Koha/REST/V1/Cities.pm +++ b/Koha/REST/V1/Cities.pm @@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Cities; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/Clubs/Holds.pm b/Koha/REST/V1/Clubs/Holds.pm index 726f6f20deb..3333d75e7df 100644 --- a/Koha/REST/V1/Clubs/Holds.pm +++ b/Koha/REST/V1/Clubs/Holds.pm @@ -19,7 +19,6 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use C4::Biblio; use C4::Reserves; use Koha::Items; @@ -27,11 +26,10 @@ use Koha::Patrons; use Koha::Holds; use Koha::Clubs; use Koha::Club::Hold; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); -use Scalar::Util qw(blessed); -use Try::Tiny; -use List::Util 'shuffle'; +use Scalar::Util qw( blessed ); +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/Config/SMTP/Servers.pm b/Koha/REST/V1/Config/SMTP/Servers.pm index 205f074fcaa..5949c535f4a 100644 --- a/Koha/REST/V1/Config/SMTP/Servers.pm +++ b/Koha/REST/V1/Config/SMTP/Servers.pm @@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::SMTP::Servers; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm index 08bf1a1fe3d..69fdf1196f3 100644 --- a/Koha/REST/V1/Holds.pm +++ b/Koha/REST/V1/Holds.pm @@ -19,18 +19,17 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Mojo::JSON qw(decode_json); +use Mojo::JSON (); -use C4::Biblio; use C4::Reserves; use Koha::Items; use Koha::Patrons; use Koha::Holds; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); -use List::MoreUtils qw(any); -use Try::Tiny; +use List::MoreUtils qw( any ); +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/ImportBatchProfiles.pm b/Koha/REST/V1/ImportBatchProfiles.pm index 9988d0f002d..ddac0eee4fb 100644 --- a/Koha/REST/V1/ImportBatchProfiles.pm +++ b/Koha/REST/V1/ImportBatchProfiles.pm @@ -22,7 +22,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::ImportBatchProfiles; use Koha::ImportBatchProfile; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Items.pm b/Koha/REST/V1/Items.pm index 21e7aa9febb..4fb538f9e83 100644 --- a/Koha/REST/V1/Items.pm +++ b/Koha/REST/V1/Items.pm @@ -22,7 +22,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Items; use List::MoreUtils qw(any); -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Libraries.pm b/Koha/REST/V1/Libraries.pm index 9025adbe7c1..b6ec20e69d3 100644 --- a/Koha/REST/V1/Libraries.pm +++ b/Koha/REST/V1/Libraries.pm @@ -22,7 +22,7 @@ use Koha::Libraries; use Scalar::Util qw( blessed ); -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/OAuth.pm b/Koha/REST/V1/OAuth.pm index 090c7899245..cdf68454776 100644 --- a/Koha/REST/V1/OAuth.pm +++ b/Koha/REST/V1/OAuth.pm @@ -17,11 +17,11 @@ package Koha::REST::V1::OAuth; use Modern::Perl; -use Module::Load::Conditional; +use Module::Load::Conditional (); use C4::Context; use Koha::OAuth; -use MIME::Base64; +use MIME::Base64 qw( decode_base64 ); use Mojo::Base 'Mojolicious::Controller'; diff --git a/Koha/REST/V1/Patrons.pm b/Koha/REST/V1/Patrons.pm index a88610bfdac..80b64ee9636 100644 --- a/Koha/REST/V1/Patrons.pm +++ b/Koha/REST/V1/Patrons.pm @@ -20,11 +20,10 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; use Koha::Database; -use Koha::DateUtils; use Koha::Patrons; -use Scalar::Util qw(blessed); -use Try::Tiny; +use Scalar::Util qw( blessed ); +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Patrons/Account.pm b/Koha/REST/V1/Patrons/Account.pm index 1bf64aa58c9..1c932c07f71 100644 --- a/Koha/REST/V1/Patrons/Account.pm +++ b/Koha/REST/V1/Patrons/Account.pm @@ -21,8 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Patrons; -use Scalar::Util qw(blessed); -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Patrons/Attributes.pm b/Koha/REST/V1/Patrons/Attributes.pm index f769765a738..4095a9220a1 100644 --- a/Koha/REST/V1/Patrons/Attributes.pm +++ b/Koha/REST/V1/Patrons/Attributes.pm @@ -22,8 +22,8 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Patron::Attributes; use Koha::Patrons; -use Scalar::Util qw(blessed); -use Try::Tiny; +use Scalar::Util qw( blessed ); +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Patrons/Password.pm b/Koha/REST/V1/Patrons/Password.pm index 82531d9d498..bb53ad5d4c4 100644 --- a/Koha/REST/V1/Patrons/Password.pm +++ b/Koha/REST/V1/Patrons/Password.pm @@ -23,8 +23,8 @@ use C4::Auth qw(checkpw_internal); use Koha::Patrons; -use Scalar::Util qw(blessed); -use Try::Tiny; +use Scalar::Util qw( blessed ); +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/REST/V1/Quotes.pm b/Koha/REST/V1/Quotes.pm index 49c6e4cab6d..53475ec9c2b 100644 --- a/Koha/REST/V1/Quotes.pm +++ b/Koha/REST/V1/Quotes.pm @@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Quotes; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/ReturnClaims.pm b/Koha/REST/V1/ReturnClaims.pm index c9fa8333879..850b0f76c25 100644 --- a/Koha/REST/V1/ReturnClaims.pm +++ b/Koha/REST/V1/ReturnClaims.pm @@ -19,11 +19,10 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Try::Tiny; +use Try::Tiny qw( catch try ); use Koha::Checkouts::ReturnClaims; use Koha::Checkouts; -use Koha::DateUtils qw( dt_from_string output_pref ); =head1 NAME diff --git a/Koha/REST/V1/Static.pm b/Koha/REST/V1/Static.pm index 233fa4e751d..2b7f20e123d 100644 --- a/Koha/REST/V1/Static.pm +++ b/Koha/REST/V1/Static.pm @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Controller'; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 API diff --git a/Koha/REST/V1/TransferLimits.pm b/Koha/REST/V1/TransferLimits.pm index 8ce82911926..c7d056d18d1 100644 --- a/Koha/REST/V1/TransferLimits.pm +++ b/Koha/REST/V1/TransferLimits.pm @@ -25,7 +25,7 @@ use Koha::Exceptions::TransferLimit; use Scalar::Util qw( blessed ); -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME diff --git a/Koha/Rating.pm b/Koha/Rating.pm index 93061812607..35ecf0e7ec0 100644 --- a/Koha/Rating.pm +++ b/Koha/Rating.pm @@ -17,7 +17,6 @@ package Koha::Rating; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Ratings.pm b/Koha/Ratings.pm index 8d3b50acaa1..41e1197842f 100644 --- a/Koha/Ratings.pm +++ b/Koha/Ratings.pm @@ -17,7 +17,6 @@ package Koha::Ratings; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/RecordProcessor.pm b/Koha/RecordProcessor.pm index a501c5010a1..ec7cbea0cad 100644 --- a/Koha/RecordProcessor.pm +++ b/Koha/RecordProcessor.pm @@ -59,7 +59,7 @@ clone it I to passing it off to the RecordProcessor. use Modern::Perl; -use Module::Load::Conditional qw(can_load); +use Module::Load::Conditional qw( can_load ); use Module::Pluggable::Object; use base qw(Class::Accessor); diff --git a/Koha/Report.pm b/Koha/Report.pm index 1e6510219d7..176fb6e2535 100644 --- a/Koha/Report.pm +++ b/Koha/Report.pm @@ -17,10 +17,8 @@ package Koha::Report; use Modern::Perl; -use Carp; use Koha::Database; -use JSON; use Koha::Reports; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/Koha/Reports.pm b/Koha/Reports.pm index 873f295abdd..d0f952ce09f 100644 --- a/Koha/Reports.pm +++ b/Koha/Reports.pm @@ -17,7 +17,6 @@ package Koha::Reports; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Review.pm b/Koha/Review.pm index 68f60081319..eae983e8601 100644 --- a/Koha/Review.pm +++ b/Koha/Review.pm @@ -17,7 +17,6 @@ package Koha::Review; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Reviews.pm b/Koha/Reviews.pm index 517d93626f7..5e9be0bbbf5 100644 --- a/Koha/Reviews.pm +++ b/Koha/Reviews.pm @@ -17,7 +17,6 @@ package Koha::Reviews; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/SMS/Provider.pm b/Koha/SMS/Provider.pm index c651265294d..3771acfb980 100644 --- a/Koha/SMS/Provider.pm +++ b/Koha/SMS/Provider.pm @@ -19,7 +19,6 @@ package Koha::SMS::Provider; use Modern::Perl; -use Carp; use Koha::Patrons; diff --git a/Koha/SMS/Providers.pm b/Koha/SMS/Providers.pm index 35a1aacc30e..3cb2f90756e 100644 --- a/Koha/SMS/Providers.pm +++ b/Koha/SMS/Providers.pm @@ -19,7 +19,6 @@ package Koha::SMS::Providers; use Modern::Perl; -use Carp; use Koha::SMS::Provider; diff --git a/Koha/SMTP/Server.pm b/Koha/SMTP/Server.pm index d5fec72611b..d97bc81da7f 100644 --- a/Koha/SMTP/Server.pm +++ b/Koha/SMTP/Server.pm @@ -21,7 +21,7 @@ use Koha::Database; use Koha::Exceptions::Object; use Koha::SMTP::Servers; -use Email::Sender::Transport::SMTP; +use Email::Sender::Transport::SMTP (); use base qw(Koha::Object); diff --git a/Koha/Schema/Loader/mysql.pm b/Koha/Schema/Loader/mysql.pm index f272e6534f7..4f321b8ba5d 100644 --- a/Koha/Schema/Loader/mysql.pm +++ b/Koha/Schema/Loader/mysql.pm @@ -24,7 +24,7 @@ use Modern::Perl; use base 'DBIx::Class::Schema::Loader::DBI::mysql'; use mro 'c3'; -use Scalar::Util 'blessed'; +use Scalar::Util qw( blessed ); # This is being upstreamed, but for now lets make sure whatever version of DBIx::Class::Schema::Loader you are using, # we will catch MariaDB current_timestamp() and convert it to \"current_timestamp" correctly. diff --git a/Koha/Script.pm b/Koha/Script.pm index aaa2e8b5607..d04a867bd8f 100644 --- a/Koha/Script.pm +++ b/Koha/Script.pm @@ -35,7 +35,7 @@ This class should be used in all scripts. It sets the interface and userenv appr =cut -use File::Basename; +use File::Basename qw( fileparse ); use Fcntl qw(:flock); use C4::Context; diff --git a/Koha/SearchEngine.pm b/Koha/SearchEngine.pm index 7aa1f85a6d9..7c08af9f6a3 100644 --- a/Koha/SearchEngine.pm +++ b/Koha/SearchEngine.pm @@ -19,7 +19,7 @@ package Koha::SearchEngine; # along with Koha; if not, see . use Modern::Perl; -use Readonly; +use Readonly qw( Readonly ); =head1 NAME diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 74250f3e48f..e1be6f697ea 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -30,21 +30,20 @@ use Koha::Caches; use C4::Heading; use C4::AuthoritiesMarc; -use Carp; -use Clone qw(clone); -use JSON; +use Carp qw( carp croak ); +use Clone qw( clone ); use Modern::Perl; -use Readonly; +use Readonly qw( Readonly ); use Search::Elasticsearch; -use Try::Tiny; -use YAML::XS; +use Try::Tiny qw( catch try ); +use YAML::XS (); -use List::Util qw( sum0 reduce all ); +use List::Util qw( sum0 ); use MARC::File::XML; -use MIME::Base64; -use Encode qw(encode); -use Business::ISBN; -use Scalar::Util qw(looks_like_number); +use MIME::Base64 qw( encode_base64 ); +use Encode qw( encode ); +use Business::ISBN (); +use Scalar::Util qw( looks_like_number ); __PACKAGE__->mk_ro_accessors(qw( index index_name )); __PACKAGE__->mk_accessors(qw( sort_fields )); diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm index 0c9b3ff380f..9aea6be0574 100644 --- a/Koha/SearchEngine/Elasticsearch/Indexer.pm +++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm @@ -17,18 +17,17 @@ package Koha::SearchEngine::Elasticsearch::Indexer; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use Carp; +use Carp qw( carp croak ); use Modern::Perl; -use Try::Tiny; -use List::Util qw(any); +use Try::Tiny qw( catch try ); +use List::Util qw( any ); use base qw(Koha::SearchEngine::Elasticsearch); -use Data::Dumper; use Koha::Exceptions; use Koha::Exceptions::Elasticsearch; use Koha::SearchEngine::Zebra::Indexer; use C4::AuthoritiesMarc qw//; -use C4::Biblio; +use C4::Biblio (); use C4::Context; =head1 NAME diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index a39931ab0bb..09e0bc6f71a 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -40,11 +40,10 @@ provides something that can be given to elasticsearch to get answers. =cut use base qw(Koha::SearchEngine::Elasticsearch); -use Carp; -use JSON; -use List::MoreUtils qw/ each_array /; +use JSON (); +use List::MoreUtils qw( each_array ); use Modern::Perl; -use URI::Escape; +use URI::Escape qw( uri_escape_utf8 ); use C4::Context; use Koha::Exceptions; diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index ff56ad1174d..36ce68108ab 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -48,11 +48,9 @@ use Koha::AuthorisedValues; use Koha::SearchEngine::QueryBuilder; use Koha::SearchEngine::Search; use Koha::Exceptions::Elasticsearch; -use MARC::Record; +use MARC::Record (); use MARC::File::XML; -use Data::Dumper; #TODO remove -use Carp qw(cluck); -use MIME::Base64; +use MIME::Base64 qw( decode_base64 ); Koha::SearchEngine::Elasticsearch::Search->mk_accessors(qw( store )); diff --git a/Koha/SearchEngine/Indexer.pm b/Koha/SearchEngine/Indexer.pm index 64262ff5877..e64fa35c46c 100644 --- a/Koha/SearchEngine/Indexer.pm +++ b/Koha/SearchEngine/Indexer.pm @@ -45,7 +45,6 @@ Creates a new C of whatever the relevant type is. use Modern::Perl; use C4::Context; -use C4::Biblio qw//; sub new { my $engine = C4::Context->preference("SearchEngine") // 'Zebra'; diff --git a/Koha/SearchEngine/QueryBuilder.pm b/Koha/SearchEngine/QueryBuilder.pm index 62a6b2c49ee..11e6c948429 100644 --- a/Koha/SearchEngine/QueryBuilder.pm +++ b/Koha/SearchEngine/QueryBuilder.pm @@ -45,7 +45,7 @@ Creates a new C of whatever the relevant type is. use C4::Context; use Modern::Perl; -use Carp; +use Carp qw( croak ); sub new { my $engine = C4::Context->preference("SearchEngine"); diff --git a/Koha/SearchEngine/Search.pm b/Koha/SearchEngine/Search.pm index cc1b0de75d4..72edd7a18f6 100644 --- a/Koha/SearchEngine/Search.pm +++ b/Koha/SearchEngine/Search.pm @@ -45,8 +45,8 @@ Creates a new C of whatever the relevant type is. use Modern::Perl; use C4::Context; -use C4::Biblio qw( GetMarcFromKohaField ); -use POSIX qw(ceil floor); +use C4::Biblio (); +use POSIX qw( ceil ); sub new { my $engine = C4::Context->preference("SearchEngine") // 'Zebra'; diff --git a/Koha/SearchEngine/Zebra/Indexer.pm b/Koha/SearchEngine/Zebra/Indexer.pm index 8ead358d9ea..01326d510bd 100644 --- a/Koha/SearchEngine/Zebra/Indexer.pm +++ b/Koha/SearchEngine/Zebra/Indexer.pm @@ -18,7 +18,7 @@ package Koha::SearchEngine::Zebra::Indexer; # along with Koha; if not, see . use Modern::Perl; -use C4::Biblio qw(ModZebra); # FIXME This is terrible, we should move the indexation code outside of C4::Biblio +use C4::Biblio qw( ModZebra ); # FIXME This is terrible, we should move the indexation code outside of C4::Biblio use base qw(Class::Accessor); =head1 NAME diff --git a/Koha/SearchField.pm b/Koha/SearchField.pm index e6c80c79cfc..32fa4054304 100644 --- a/Koha/SearchField.pm +++ b/Koha/SearchField.pm @@ -17,7 +17,6 @@ package Koha::SearchField; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/SearchFields.pm b/Koha/SearchFields.pm index 29a8033e70f..deef07a79c0 100644 --- a/Koha/SearchFields.pm +++ b/Koha/SearchFields.pm @@ -17,7 +17,6 @@ package Koha::SearchFields; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/SearchMarcMap.pm b/Koha/SearchMarcMap.pm index bf86b781e5e..6f28511c8db 100644 --- a/Koha/SearchMarcMap.pm +++ b/Koha/SearchMarcMap.pm @@ -17,7 +17,6 @@ package Koha::SearchMarcMap; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/SearchMarcMaps.pm b/Koha/SearchMarcMaps.pm index 338a51ddb92..d4fb9ce0be1 100644 --- a/Koha/SearchMarcMaps.pm +++ b/Koha/SearchMarcMaps.pm @@ -17,7 +17,6 @@ package Koha::SearchMarcMaps; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Serial.pm b/Koha/Serial.pm index 182edc75f47..052290ed465 100644 --- a/Koha/Serial.pm +++ b/Koha/Serial.pm @@ -19,7 +19,6 @@ package Koha::Serial; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Serial/Item.pm b/Koha/Serial/Item.pm index 3d0b1247078..a68a7299940 100644 --- a/Koha/Serial/Item.pm +++ b/Koha/Serial/Item.pm @@ -19,7 +19,6 @@ package Koha::Serial::Item; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Serial/Items.pm b/Koha/Serial/Items.pm index 7ddaed012bb..5cc563e9757 100644 --- a/Koha/Serial/Items.pm +++ b/Koha/Serial/Items.pm @@ -19,7 +19,6 @@ package Koha::Serial::Items; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Serials.pm b/Koha/Serials.pm index 8cd8c015a93..ad58509d245 100644 --- a/Koha/Serials.pm +++ b/Koha/Serials.pm @@ -19,7 +19,6 @@ package Koha::Serials; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/SharedContent.pm b/Koha/SharedContent.pm index 7082fe03a34..a5d856ef440 100644 --- a/Koha/SharedContent.pm +++ b/Koha/SharedContent.pm @@ -18,9 +18,9 @@ package Koha::SharedContent; # along with Koha; if not, see . use Modern::Perl; -use JSON; +use JSON qw( from_json to_json ); use HTTP::Request; -use LWP::UserAgent; +use LWP::UserAgent (); use Koha::Serials; use Koha::Reports; diff --git a/Koha/Sitemapper.pm b/Koha/Sitemapper.pm index eab42f35ba7..7e0cdbe9bba 100644 --- a/Koha/Sitemapper.pm +++ b/Koha/Sitemapper.pm @@ -20,7 +20,7 @@ package Koha::Sitemapper; use Moo; use Modern::Perl; -use Koha::Sitemapper::Writer; +use Koha::Sitemapper::Writer (); use C4::Context; diff --git a/Koha/Sitemapper/Writer.pm b/Koha/Sitemapper/Writer.pm index 63f147aff8d..84e17419736 100644 --- a/Koha/Sitemapper/Writer.pm +++ b/Koha/Sitemapper/Writer.pm @@ -22,8 +22,8 @@ package Koha::Sitemapper::Writer; use Moo; use Modern::Perl; use XML::Writer; -use IO::File; -use Koha::DateUtils; +use IO::File (); +use Koha::DateUtils qw( dt_from_string ); my $MAX = 50000; diff --git a/Koha/Statistic.pm b/Koha/Statistic.pm index d6fd61ff931..397e440cdb1 100644 --- a/Koha/Statistic.pm +++ b/Koha/Statistic.pm @@ -17,7 +17,6 @@ package Koha::Statistic; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Items; diff --git a/Koha/Statistics.pm b/Koha/Statistics.pm index ecbceebf326..4b3a4ebf391 100644 --- a/Koha/Statistics.pm +++ b/Koha/Statistics.pm @@ -17,7 +17,6 @@ package Koha::Statistics; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/StockRotationItem.pm b/Koha/StockRotationItem.pm index 9ee92c10e61..58f0a6c25b6 100644 --- a/Koha/StockRotationItem.pm +++ b/Koha/StockRotationItem.pm @@ -22,11 +22,11 @@ use Modern::Perl; use DateTime; use DateTime::Duration; use Koha::Database; -use Koha::DateUtils qw/dt_from_string/; +use Koha::DateUtils qw( dt_from_string ); use Koha::Item::Transfer; use Koha::Item; use Koha::StockRotationStage; -use Try::Tiny; +use Try::Tiny qw( catch try ); use base qw(Koha::Object); diff --git a/Koha/Subscription.pm b/Koha/Subscription.pm index 07ab1681770..45d1c09fa0d 100644 --- a/Koha/Subscription.pm +++ b/Koha/Subscription.pm @@ -19,7 +19,6 @@ package Koha::Subscription; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Biblios; @@ -28,7 +27,6 @@ use Koha::Biblioitems; use Koha::Subscriptions; use Koha::Subscription::Frequencies; use Koha::Subscription::Numberpatterns; -use JSON; use base qw(Koha::Object Koha::Object::Mixin::AdditionalFields); diff --git a/Koha/Subscription/Frequencies.pm b/Koha/Subscription/Frequencies.pm index 4952625613b..9b60f21087e 100644 --- a/Koha/Subscription/Frequencies.pm +++ b/Koha/Subscription/Frequencies.pm @@ -17,7 +17,6 @@ package Koha::Subscription::Frequencies; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Subscription/Frequency.pm b/Koha/Subscription/Frequency.pm index 475e744f174..abb47c38e92 100644 --- a/Koha/Subscription/Frequency.pm +++ b/Koha/Subscription/Frequency.pm @@ -17,7 +17,6 @@ package Koha::Subscription::Frequency; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Subscription/Histories.pm b/Koha/Subscription/Histories.pm index 460aedaaf56..3815cd2d87e 100644 --- a/Koha/Subscription/Histories.pm +++ b/Koha/Subscription/Histories.pm @@ -19,7 +19,6 @@ package Koha::Subscription::Histories; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Subscription/History.pm b/Koha/Subscription/History.pm index 4d309e2cb58..e65e93595e5 100644 --- a/Koha/Subscription/History.pm +++ b/Koha/Subscription/History.pm @@ -19,7 +19,6 @@ package Koha::Subscription::History; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Subscription/Routinglist.pm b/Koha/Subscription/Routinglist.pm index ede95b976a3..10cf094da58 100644 --- a/Koha/Subscription/Routinglist.pm +++ b/Koha/Subscription/Routinglist.pm @@ -18,7 +18,6 @@ package Koha::Subscription::Routinglist; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Subscriptions; diff --git a/Koha/Subscription/Routinglists.pm b/Koha/Subscription/Routinglists.pm index 950d608144f..7678a9eafcf 100644 --- a/Koha/Subscription/Routinglists.pm +++ b/Koha/Subscription/Routinglists.pm @@ -18,7 +18,6 @@ package Koha::Subscription::Routinglists; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Subscription::Routinglist; diff --git a/Koha/Subscriptions.pm b/Koha/Subscriptions.pm index 86ee3308440..9636e9f30bb 100644 --- a/Koha/Subscriptions.pm +++ b/Koha/Subscriptions.pm @@ -19,7 +19,6 @@ package Koha::Subscriptions; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Suggestion.pm b/Koha/Suggestion.pm index f9f8c2a4908..5542963d45b 100644 --- a/Koha/Suggestion.pm +++ b/Koha/Suggestion.pm @@ -19,10 +19,9 @@ package Koha::Suggestion; use Modern::Perl; -use Carp; use Koha::Database; -use Koha::DateUtils qw(dt_from_string); +use Koha::DateUtils qw( dt_from_string ); use Koha::Patrons; use base qw(Koha::Object); diff --git a/Koha/SuggestionEngine.pm b/Koha/SuggestionEngine.pm index ee1b2cc8695..f10f914399e 100644 --- a/Koha/SuggestionEngine.pm +++ b/Koha/SuggestionEngine.pm @@ -53,7 +53,7 @@ B - create a new plugin object use strict; use warnings; -use Module::Load::Conditional qw(can_load); +use Module::Load::Conditional qw( can_load ); use Module::Pluggable::Object; use base qw(Class::Accessor); diff --git a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm b/Koha/SuggestionEngine/Plugin/AuthorityFile.pm index cfb34da7aa5..cb538728510 100644 --- a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm +++ b/Koha/SuggestionEngine/Plugin/AuthorityFile.pm @@ -31,7 +31,6 @@ Plugin to get suggestions from Koha's authority file =cut use Modern::Perl; -use Carp; use base qw(Koha::SuggestionEngine::Base); diff --git a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm b/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm index cb052677208..0c4656e77e8 100644 --- a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm +++ b/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm @@ -32,7 +32,6 @@ subjects to subject searches. =cut use Modern::Perl; -use Carp; use C4::Templates qw(gettemplate); # This is necessary for translatability use base qw(Koha::SuggestionEngine::Base); diff --git a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm b/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm index 5356276922d..73f402972b9 100644 --- a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm +++ b/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm @@ -17,8 +17,8 @@ package Koha::SuggestionEngine::Plugin::LibrisSpellcheck; # along with Koha; if not, see . use Modern::Perl; -use LWP::UserAgent; -use XML::Simple qw(XMLin); +use LWP::UserAgent (); +use XML::Simple qw( XMLin ); use C4::Context; use base qw(Koha::SuggestionEngine::Base); diff --git a/Koha/SuggestionEngine/Plugin/Null.pm b/Koha/SuggestionEngine/Plugin/Null.pm index e0603504d38..fc7463ef382 100644 --- a/Koha/SuggestionEngine/Plugin/Null.pm +++ b/Koha/SuggestionEngine/Plugin/Null.pm @@ -33,7 +33,6 @@ SuggestionEngine. use strict; use warnings; -use Carp; use base qw(Koha::SuggestionEngine::Base); diff --git a/Koha/Suggestions.pm b/Koha/Suggestions.pm index 39f4a525fab..03262bb5f1b 100644 --- a/Koha/Suggestions.pm +++ b/Koha/Suggestions.pm @@ -19,7 +19,6 @@ package Koha::Suggestions; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Tag.pm b/Koha/Tag.pm index 1597d7bea2e..089aa4f61d6 100644 --- a/Koha/Tag.pm +++ b/Koha/Tag.pm @@ -17,7 +17,6 @@ package Koha::Tag; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Tags.pm b/Koha/Tags.pm index 08568e1f867..a9a2bba8cd2 100644 --- a/Koha/Tags.pm +++ b/Koha/Tags.pm @@ -17,7 +17,6 @@ package Koha::Tags; use Modern::Perl; -use Carp; use Koha::Tag; diff --git a/Koha/Tags/Approval.pm b/Koha/Tags/Approval.pm index bb0c4df8f2e..ee7153c2ca9 100644 --- a/Koha/Tags/Approval.pm +++ b/Koha/Tags/Approval.pm @@ -17,7 +17,6 @@ package Koha::Tags::Approval; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Tags/Approvals.pm b/Koha/Tags/Approvals.pm index 43400f2f0cb..f7e72ae3528 100644 --- a/Koha/Tags/Approvals.pm +++ b/Koha/Tags/Approvals.pm @@ -17,7 +17,6 @@ package Koha::Tags::Approvals; use Modern::Perl; -use Carp; use Koha::Tags::Approval; diff --git a/Koha/Tags/Index.pm b/Koha/Tags/Index.pm index 66f60744467..0b388acfb6e 100644 --- a/Koha/Tags/Index.pm +++ b/Koha/Tags/Index.pm @@ -17,7 +17,6 @@ package Koha::Tags::Index; use Modern::Perl; -use Carp; use base qw(Koha::Object); diff --git a/Koha/Tags/Indexes.pm b/Koha/Tags/Indexes.pm index 56506a24de7..2ec40bcd44c 100644 --- a/Koha/Tags/Indexes.pm +++ b/Koha/Tags/Indexes.pm @@ -17,7 +17,6 @@ package Koha::Tags::Indexes; use Modern::Perl; -use Carp; use Koha::Tags::Index; diff --git a/Koha/Template/Plugin/Asset.pm b/Koha/Template/Plugin/Asset.pm index 08748b46e35..7d66e347579 100644 --- a/Koha/Template/Plugin/Asset.pm +++ b/Koha/Template/Plugin/Asset.pm @@ -45,8 +45,8 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); -use File::Basename; -use File::Spec; +use File::Basename qw( fileparse ); +use File::Spec (); use C4::Context; use Koha; diff --git a/Koha/Template/Plugin/AudioAlerts.pm b/Koha/Template/Plugin/AudioAlerts.pm index a8877b63adc..a666f20766e 100644 --- a/Koha/Template/Plugin/AudioAlerts.pm +++ b/Koha/Template/Plugin/AudioAlerts.pm @@ -19,8 +19,7 @@ package Koha::Template::Plugin::AudioAlerts; use Modern::Perl; -use Encode qw( encode ); -use JSON; +use JSON qw( encode_json ); use base qw( Template::Plugin ); diff --git a/Koha/Template/Plugin/Categories.pm b/Koha/Template/Plugin/Categories.pm index 59d358802ec..db7b2fd0e27 100644 --- a/Koha/Template/Plugin/Categories.pm +++ b/Koha/Template/Plugin/Categories.pm @@ -20,7 +20,7 @@ use Modern::Perl; use Template::Plugin; use base qw( Template::Plugin ); -use List::Util qw(any); +use List::Util qw( any ); use Koha::Patron::Categories; sub all { diff --git a/Koha/Template/Plugin/I18N.pm b/Koha/Template/Plugin/I18N.pm index 919d3bc4677..43e2ef3c079 100644 --- a/Koha/Template/Plugin/I18N.pm +++ b/Koha/Template/Plugin/I18N.pm @@ -22,7 +22,7 @@ use Modern::Perl; use base qw( Template::Plugin ); use C4::Context; -use Koha::I18N; +use Koha::I18N qw( __ __n __np __npx __nx __p __px __x __xn ); =head1 NAME diff --git a/Koha/Template/Plugin/KohaDates.pm b/Koha/Template/Plugin/KohaDates.pm index 042268fc97c..783833f7df9 100644 --- a/Koha/Template/Plugin/KohaDates.pm +++ b/Koha/Template/Plugin/KohaDates.pm @@ -22,7 +22,7 @@ use Modern::Perl; use Template::Plugin::Filter; use base qw( Template::Plugin::Filter ); -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use C4::Context; our $DYNAMIC = 1; diff --git a/Koha/Template/Plugin/KohaNews.pm b/Koha/Template/Plugin/KohaNews.pm index efd08dd52fd..4c5fe101f3a 100644 --- a/Koha/Template/Plugin/KohaNews.pm +++ b/Koha/Template/Plugin/KohaNews.pm @@ -26,7 +26,7 @@ use base qw( Template::Plugin ); use C4::Koha; use C4::Context; -use C4::NewsChannels; # GetNewsToDisplay +use C4::NewsChannels qw( GetNewsToDisplay ); # GetNewsToDisplay sub get { my ( $self, $params ) = @_; diff --git a/Koha/Template/Plugin/KohaPlugins.pm b/Koha/Template/Plugin/KohaPlugins.pm index b75d36c437e..d313f731266 100644 --- a/Koha/Template/Plugin/KohaPlugins.pm +++ b/Koha/Template/Plugin/KohaPlugins.pm @@ -21,7 +21,7 @@ use Modern::Perl; use base qw( Template::Plugin ); -use Try::Tiny; +use Try::Tiny qw( catch try ); use Koha::Plugins; diff --git a/Koha/Template/Plugin/Languages.pm b/Koha/Template/Plugin/Languages.pm index 65534e50714..f27b2e744ab 100644 --- a/Koha/Template/Plugin/Languages.pm +++ b/Koha/Template/Plugin/Languages.pm @@ -22,7 +22,7 @@ use Template::Plugin; use base qw( Template::Plugin ); use C4::Koha; -use C4::Languages; +use C4::Languages (); sub GetByISOCode { my ( $self, $lang, $code ) = @_; diff --git a/Koha/Template/Plugin/To.pm b/Koha/Template/Plugin/To.pm index 67902e6ac00..476248bede8 100644 --- a/Koha/Template/Plugin/To.pm +++ b/Koha/Template/Plugin/To.pm @@ -22,7 +22,7 @@ use Modern::Perl; use Template::Plugin::Filter; use base qw( Template::Plugin::Filter ); -use JSON qw( to_json ); +use JSON (); our $DYNAMIC = 1; sub json { diff --git a/Koha/Token.pm b/Koha/Token.pm index a3f226d74c5..84d69fc67e3 100644 --- a/Koha/Token.pm +++ b/Koha/Token.pm @@ -52,8 +52,8 @@ use Modern::Perl; use Bytes::Random::Secure (); use String::Random (); use WWW::CSRF (); -use Digest::MD5 qw(md5_base64); -use Encode qw( encode ); +use Digest::MD5 qw( md5_base64 ); +use Encode (); use Koha::Exceptions::Token; use base qw(Class::Accessor); use constant HMAC_SHA1_LENGTH => 20; diff --git a/Koha/UploadedFile.pm b/Koha/UploadedFile.pm index 009c333a8de..31467f653c2 100644 --- a/Koha/UploadedFile.pm +++ b/Koha/UploadedFile.pm @@ -18,7 +18,7 @@ package Koha::UploadedFile; # along with Koha; if not, see . use Modern::Perl; -use File::Spec; +use File::Spec (); use parent qw(Koha::Object); diff --git a/Koha/UploadedFiles.pm b/Koha/UploadedFiles.pm index 60c10d15c6f..c453c6f9778 100644 --- a/Koha/UploadedFiles.pm +++ b/Koha/UploadedFiles.pm @@ -21,7 +21,7 @@ use Modern::Perl; use C4::Koha qw( GetAuthorisedValues ); use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::UploadedFile; use parent qw(Koha::Objects); diff --git a/Koha/Uploader.pm b/Koha/Uploader.pm index 4cd6aafb6f7..3b43d730384 100644 --- a/Koha/Uploader.pm +++ b/Koha/Uploader.pm @@ -66,12 +66,10 @@ use constant ERR_ROOT => 'UPLERR_NO_ROOT_DIR'; use constant ERR_TEMP => 'UPLERR_NO_TEMP_DIR'; use Modern::Perl; -use CGI; # no utf8 flag, since it may interfere with binary uploads -use Digest::MD5; -use Encode; -use File::Spec; -use IO::File; -use Time::HiRes; +use Digest::MD5 (); +use Encode (); +use IO::File (); +use Time::HiRes (); use base qw(Class::Accessor); diff --git a/Koha/Util/MARC.pm b/Koha/Util/MARC.pm index 56f0a984511..3648888b30a 100644 --- a/Koha/Util/MARC.pm +++ b/Koha/Util/MARC.pm @@ -18,7 +18,6 @@ package Koha::Util::MARC; # along with Koha; if not, see . use Modern::Perl; -use MARC::Record; =head1 NAME diff --git a/Koha/Util/OpenDocument.pm b/Koha/Util/OpenDocument.pm index 937c9bc60e2..f86c44452d6 100644 --- a/Koha/Util/OpenDocument.pm +++ b/Koha/Util/OpenDocument.pm @@ -19,10 +19,8 @@ package Koha::Util::OpenDocument; use Modern::Perl; -use Encode qw( decode ); -use File::Temp; use File::Basename qw( dirname ); -use OpenOffice::OODoc; +use OpenOffice::OODoc qw( odfDocument odfWorkingDirectory ); use parent qw( Exporter ); diff --git a/Koha/Virtualshelf.pm b/Koha/Virtualshelf.pm index d0ccb880817..afecb2b0524 100644 --- a/Koha/Virtualshelf.pm +++ b/Koha/Virtualshelf.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelf; use Modern::Perl; -use Carp; use C4::Auth qw( haspermission ); diff --git a/Koha/Virtualshelfcontent.pm b/Koha/Virtualshelfcontent.pm index f1fd87f39d2..0a7eb5b5ff4 100644 --- a/Koha/Virtualshelfcontent.pm +++ b/Koha/Virtualshelfcontent.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelfcontent; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; diff --git a/Koha/Virtualshelfcontents.pm b/Koha/Virtualshelfcontents.pm index 8da9bce454f..23776f395ec 100644 --- a/Koha/Virtualshelfcontents.pm +++ b/Koha/Virtualshelfcontents.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelfcontents; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Virtualshelfshare.pm b/Koha/Virtualshelfshare.pm index a2e919b7b63..5f61e27a84a 100644 --- a/Koha/Virtualshelfshare.pm +++ b/Koha/Virtualshelfshare.pm @@ -17,12 +17,11 @@ package Koha::Virtualshelfshare; use Modern::Perl; -use Carp; use DateTime; use DateTime::Duration; use Koha::Database; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use Koha::Exceptions; use base qw(Koha::Object); diff --git a/Koha/Virtualshelfshares.pm b/Koha/Virtualshelfshares.pm index 4c5eda9dcd9..de709ff49c1 100644 --- a/Koha/Virtualshelfshares.pm +++ b/Koha/Virtualshelfshares.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelfshares; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Virtualshelves.pm b/Koha/Virtualshelves.pm index 3dde3c35da4..25a3b01c508 100644 --- a/Koha/Virtualshelves.pm +++ b/Koha/Virtualshelves.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelves; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/XSLT/Base.pm b/Koha/XSLT/Base.pm index 84fe8d5806f..05390a30a36 100644 --- a/Koha/XSLT/Base.pm +++ b/Koha/XSLT/Base.pm @@ -116,7 +116,7 @@ Koha::XSLT::Base - Facilitate use of XSLT transformations =cut use Modern::Perl; -use XML::LibXML; +use XML::LibXML (); use XML::LibXSLT; use Koha::XSLT::Security; diff --git a/Koha/XSLT/Security.pm b/Koha/XSLT/Security.pm index eb56273ac19..09b5b58e080 100644 --- a/Koha/XSLT/Security.pm +++ b/Koha/XSLT/Security.pm @@ -36,7 +36,6 @@ Koha::XSLT::Security - Add security features to Koha::XSLT::Base =cut use Modern::Perl; -use Data::Dumper qw/Dumper/; use XML::LibXSLT; use C4::Context; diff --git a/Koha/Z3950Server.pm b/Koha/Z3950Server.pm index a4228caa50c..21dc0224fa9 100644 --- a/Koha/Z3950Server.pm +++ b/Koha/Z3950Server.pm @@ -17,7 +17,6 @@ package Koha::Z3950Server; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/Z3950Servers.pm b/Koha/Z3950Servers.pm index 1aea08e988f..96bf35245f5 100644 --- a/Koha/Z3950Servers.pm +++ b/Koha/Z3950Servers.pm @@ -17,7 +17,6 @@ package Koha::Z3950Servers; use Modern::Perl; -use Carp; use Koha::Database; diff --git a/Koha/pdfformat/layout2pages.pm b/Koha/pdfformat/layout2pages.pm index 28f35a0e141..b0d4affbdc9 100644 --- a/Koha/pdfformat/layout2pages.pm +++ b/Koha/pdfformat/layout2pages.pm @@ -22,12 +22,11 @@ package Koha::pdfformat::layout2pages; #you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub. use vars qw(@ISA @EXPORT); -use MIME::Base64; use Modern::Perl; use utf8; use Koha::Number::Price; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Libraries; BEGIN { diff --git a/Koha/pdfformat/layout2pagesde.pm b/Koha/pdfformat/layout2pagesde.pm index 5ce74a0c466..8d519058982 100644 --- a/Koha/pdfformat/layout2pagesde.pm +++ b/Koha/pdfformat/layout2pagesde.pm @@ -21,12 +21,11 @@ package Koha::pdfformat::layout2pagesde; # along with Koha; if not, see . #you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub. -use MIME::Base64; use Modern::Perl; use utf8; use Koha::Number::Price; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Libraries; our (@ISA, @EXPORT_OK); diff --git a/Koha/pdfformat/layout3pages.pm b/Koha/pdfformat/layout3pages.pm index 9c2456be553..4bec9e815c2 100644 --- a/Koha/pdfformat/layout3pages.pm +++ b/Koha/pdfformat/layout3pages.pm @@ -22,14 +22,13 @@ package Koha::pdfformat::layout3pages; #you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub. use vars qw(@ISA @EXPORT); -use MIME::Base64; -use List::MoreUtils qw/uniq/; +use List::MoreUtils qw( uniq ); use Modern::Perl; use utf8; use C4::Acquisition; use Koha::Number::Price; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Libraries; BEGIN { diff --git a/Koha/pdfformat/layout3pagesfr.pm b/Koha/pdfformat/layout3pagesfr.pm index eb3d88e84af..4efc1bf318c 100644 --- a/Koha/pdfformat/layout3pagesfr.pm +++ b/Koha/pdfformat/layout3pagesfr.pm @@ -22,14 +22,13 @@ package Koha::pdfformat::layout3pagesfr; #you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub. use vars qw(@ISA @EXPORT); -use MIME::Base64; -use List::MoreUtils qw/uniq/; +use List::MoreUtils qw( uniq ); use Modern::Perl; use utf8; use C4::Acquisition; use Koha::Number::Price; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Libraries; BEGIN { diff --git a/about.pl b/about.pl index 26f68bcdccb..6ee89c676a4 100644 --- a/about.pl +++ b/about.pl @@ -34,7 +34,7 @@ use YAML::XS (); use Encode (); use C4::Output qw( output_html_with_http_headers ); -use C4::Auth qw( get_template_and_user get_user_subpermissions ); +use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Installer::PerlModules; diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index c70c82eebf7..c177bf3a732 100644 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -31,9 +31,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition; -use C4::Budgets; -use C4::Members; +use C4::Budgets qw( CanUserUseBudget GetBudgetHierarchy ); use Koha::Acquisition::Currencies; use Koha::Patrons; use Koha::Suggestions; diff --git a/acqui/add_user_search.pl b/acqui/add_user_search.pl index 9afa7503598..fa7089c02cd 100644 --- a/acqui/add_user_search.pl +++ b/acqui/add_user_search.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Members; use Koha::Patron::Categories; diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 20e73807ac7..9a528e77e18 100644 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -121,15 +121,15 @@ use Modern::Perl; use CGI qw ( -utf8 ); use JSON qw( to_json ); use C4::Auth qw( get_template_and_user ); -use C4::Acquisition; # ModOrder -use C4::Suggestions; # ModStatus +use C4::Acquisition qw( ModOrder ModOrderUsers ); # ModOrder +use C4::Suggestions qw( ModSuggestion ); # ModStatus use C4::Biblio qw( AddBiblio GetMarcFromKohaField TransformHtmlToXml TransformKohaToMarc ); -use C4::Budgets; +use C4::Budgets qw( GetBudget GetBudgetOrdered GetBudgetSpent ); use C4::Items qw( AddItemFromMarc ); use C4::Output qw( output_html_with_http_headers ); use C4::Log qw( logaction ); diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index c755302ea2e..bc57e75d41e 100644 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -30,10 +30,23 @@ use Encode (); use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); +use C4::ImportBatch qw( + GetImportBatch + GetImportBatchItemAction + GetImportBatchNoMatchAction + GetImportBatchOverlayAction + GetImportBatchRangeDesc + GetImportRecordMarc + GetImportRecordMatches + GetImportRecordsRange + GetNumberOfNonZ3950ImportBatches + SetImportBatchStatus + SetImportRecordStatus + SetMatchedBiblionumber +); use C4::Matcher; use C4::Search qw( FindDuplicate ); -use C4::Acquisition; +use C4::Acquisition (); use C4::Biblio qw( AddBiblio GetMarcFromKohaField @@ -42,10 +55,14 @@ use C4::Biblio qw( TransformHtmlToXml ); use C4::Items qw( AddItemFromMarc PrepareItemrecordDisplay ); -use C4::Budgets; -use C4::Acquisition; -use C4::Suggestions; # GetSuggestion -use C4::Members; +use C4::Budgets qw( + CanUserUseBudget + GetBudget + GetBudgetByCode + GetBudgetHierarchy + GetBudgets +); +use C4::Acquisition (); use Koha::Number::Price; use Koha::Libraries; diff --git a/acqui/basket.pl b/acqui/basket.pl index c4755428ba9..6f048e344ce 100644 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -22,12 +22,26 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user haspermission ); -use C4::Output qw( output_html_with_http_headers output_and_exit ); +use C4::Output qw( output_and_exit output_html_with_http_headers ); use CGI qw ( -utf8 ); -use C4::Acquisition; -use C4::Budgets; +use C4::Acquisition qw( + CanUserManageBasket + get_rounded_price + GetBasket + GetBasketAsCSV + GetBasketgroup + GetBasketgroups + GetBasketUsers + GetOrder + GetOrders + ModBasket + ModBasketUsers + NewBasketgroup + ReopenBasket +); +use C4::Budgets qw( CanUserUseBudget GetBudget GetBudgetHierarchy ); use C4::Contract qw( GetContract ); -use C4::Suggestions; +use C4::Suggestions qw( GetSuggestionInfoFromBiblionumber ); use Koha::Biblios; use Koha::Acquisition::Baskets; use Koha::Acquisition::Booksellers; diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index b1d0c4d2154..9dbbb5a0557 100644 --- a/acqui/basketheader.pl +++ b/acqui/basketheader.pl @@ -50,7 +50,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition qw/GetBasket NewBasket ModBasketHeader/; +use C4::Acquisition qw( GetBasket ModBasketHeader NewBasket ); use C4::Contract qw( GetContracts ); use Koha::Acquisition::Booksellers; diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index df7bfb8760d..632fc141db4 100644 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -53,11 +53,11 @@ The id of the supplier whose baskets we will display use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Budgets; +use C4::Budgets qw( CanUserUseBudget GetBudgetHierarchy ); use C4::Output qw( output_html_with_http_headers ); use CGI qw ( -utf8 ); -use C4::Acquisition qw/ GetBasketsInfosByBookseller CanUserManageBasket /; +use C4::Acquisition qw( CanUserManageBasket GetBasketsInfosByBookseller ); use C4::Context; use Koha::Acquisition::Booksellers; diff --git a/acqui/cancelorder.pl b/acqui/cancelorder.pl index 016ec71c621..a0b3d602639 100644 --- a/acqui/cancelorder.pl +++ b/acqui/cancelorder.pl @@ -34,7 +34,6 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition; use Koha::Acquisition::Baskets; my $input = CGI->new; diff --git a/acqui/check_budget_total.pl b/acqui/check_budget_total.pl index 3c90240c2f8..46379fa0053 100644 --- a/acqui/check_budget_total.pl +++ b/acqui/check_budget_total.pl @@ -22,7 +22,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); -use C4::Budgets; +use C4::Budgets qw( GetBudget ); =head1 DESCRIPTION diff --git a/acqui/duplicate_orders.pl b/acqui/duplicate_orders.pl index 038adb80731..8d1b0a4f84b 100644 --- a/acqui/duplicate_orders.pl +++ b/acqui/duplicate_orders.pl @@ -23,8 +23,8 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_and_exit output_html_with_http_headers ); -use C4::Acquisition qw(GetHistory); -use C4::Budgets qw(GetBudgetPeriods GetBudgetHierarchy CanUserUseBudget); +use C4::Acquisition (); +use C4::Budgets qw( GetBudgetHierarchy ); use Koha::Acquisition::Baskets; use Koha::Acquisition::Currencies; use Koha::Acquisition::Orders; diff --git a/acqui/edimsg.pl b/acqui/edimsg.pl index 8fca00ac397..84642328988 100644 --- a/acqui/edimsg.pl +++ b/acqui/edimsg.pl @@ -20,7 +20,6 @@ use Modern::Perl; use CGI (); use Koha::Database; -use C4::Koha; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 5bdfae16e06..ab49c26be47 100644 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -22,13 +22,10 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Auth qw( checkauth ); -use C4::Output; use C4::Context; -use C4::Acquisition; +use C4::Acquisition qw( GetInvoice GetOrder ModReceiveOrder ); use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField TransformHtmlToXml ); use C4::Items qw( AddItemFromMarc ); -use C4::Search; use Koha::Number::Price; use Koha::Acquisition::Booksellers; diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index 1f16850c4ab..cbb371d4df7 100644 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -53,7 +53,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition; +use C4::Acquisition qw( GetHistory ); use Koha::AdditionalFields; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/acqui/invoice-files.pl b/acqui/invoice-files.pl index 2d53024ddaf..e844ac4e008 100644 --- a/acqui/invoice-files.pl +++ b/acqui/invoice-files.pl @@ -32,7 +32,7 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition; +use C4::Acquisition qw( GetInvoiceDetails ); use Koha::Misc::Files; my $input = CGI->new; diff --git a/acqui/invoice.pl b/acqui/invoice.pl index a11bdbf74c6..6d0497c5995 100644 --- a/acqui/invoice.pl +++ b/acqui/invoice.pl @@ -31,8 +31,16 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_and_exit output_html_with_http_headers ); -use C4::Acquisition; -use C4::Budgets; +use C4::Acquisition qw( + CloseInvoice + DelInvoice + get_rounded_price + GetInvoiceDetails + MergeInvoices + ModInvoice + ReopenInvoice +); +use C4::Budgets qw( CanUserUseBudget GetBudget GetBudgetHierarchy ); use Koha::Acquisition::Booksellers; use Koha::Acquisition::Currencies; diff --git a/acqui/invoices.pl b/acqui/invoices.pl index d5c173b45f0..5d798077d3a 100644 --- a/acqui/invoices.pl +++ b/acqui/invoices.pl @@ -32,8 +32,8 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition qw/GetInvoices/; -use C4::Budgets; +use C4::Acquisition qw( GetInvoices ); +use C4::Budgets qw( CanUserUseBudget GetBudgets ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Acquisition::Booksellers; diff --git a/acqui/lateorders-export.pl b/acqui/lateorders-export.pl index 597941e19e0..7f73cb8e2c4 100644 --- a/acqui/lateorders-export.pl +++ b/acqui/lateorders-export.pl @@ -20,8 +20,7 @@ use CGI qw ( -utf8 ); use Encode (); use C4::Auth qw( get_template_and_user ); -use C4::Acquisition; -use C4::Output; +use C4::Acquisition qw( GetOrder ); use C4::Context; my $input = CGI->new; diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 0b371f567ef..371be633222 100644 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -48,7 +48,6 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Context; -use C4::Acquisition; use C4::Letters qw( GetLetters SendAlerts ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Acquisition::Orders; diff --git a/acqui/modordernotes.pl b/acqui/modordernotes.pl index 37a0f722a23..d6e082c1fde 100644 --- a/acqui/modordernotes.pl +++ b/acqui/modordernotes.pl @@ -31,7 +31,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition; +use C4::Acquisition qw( GetBasket GetOrder ModOrder ); use Koha::Acquisition::Booksellers; diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 18203e78188..30f4a1563ad 100644 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -69,11 +69,11 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Budgets; +use C4::Budgets qw( CanUserUseBudget GetBudget GetBudgetHierarchy ); -use C4::Acquisition; +use C4::Acquisition qw( GetBasket GetOrder GetOrderUsers ); use C4::Contract qw( GetContract ); -use C4::Suggestions; # GetSuggestion +use C4::Suggestions qw( GetSuggestion GetSuggestionInfo ); # GetSuggestion use C4::Biblio qw( AddBiblio GetBiblioData @@ -84,11 +84,14 @@ use C4::Biblio qw( IsMarcStructureInternal ); use C4::Output qw( output_and_exit output_html_with_http_headers ); -use C4::Members; use C4::Search qw( FindDuplicate ); #needed for z3950 import: -use C4::ImportBatch qw( SetImportRecordStatus SetMatchedBiblionumber GetImportRecordMarc ); +use C4::ImportBatch qw( + GetImportRecordMarc + SetImportRecordStatus + SetMatchedBiblionumber +); use Koha::Acquisition::Booksellers; use Koha::Acquisition::Currencies; diff --git a/acqui/newordersubscription.pl b/acqui/newordersubscription.pl index 87d2cb3221a..288ade46e76 100644 --- a/acqui/newordersubscription.pl +++ b/acqui/newordersubscription.pl @@ -19,11 +19,15 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Acquisition; +use C4::Acquisition qw( GetBasket ); use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); -use C4::Serials qw( SearchSubscriptions subscriptionCurrentlyOnOrder check_routing ); +use C4::Serials qw( + check_routing + SearchSubscriptions + subscriptionCurrentlyOnOrder +); use Koha::Acquisition::Booksellers; diff --git a/acqui/newordersuggestion.pl b/acqui/newordersuggestion.pl index 0545d11d071..9004cd33db8 100644 --- a/acqui/newordersuggestion.pl +++ b/acqui/newordersuggestion.pl @@ -93,8 +93,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Suggestions; -use C4::Budgets; +use C4::Suggestions qw( ConnectSuggestionAndBiblio SearchSuggestion ); use Koha::Acquisition::Booksellers; diff --git a/acqui/ordered.pl b/acqui/ordered.pl index 7ecc7edae3a..84b49550c13 100644 --- a/acqui/ordered.pl +++ b/acqui/ordered.pl @@ -33,7 +33,7 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use Koha::Acquisition::Invoice::Adjustments; -use C4::Acquisition; +use C4::Acquisition qw( get_rounded_price ); my $dbh = C4::Context->dbh; my $input = CGI->new; diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 55659b49b7a..67933f1445a 100644 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -62,13 +62,17 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; -use C4::Acquisition; +use C4::Acquisition qw( GetInvoice ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /; -use C4::Members; +use C4::Budgets qw( + CanUserUseBudget + GetBudget + GetBudgetHierarchy + GetBudgetPeriods +); use C4::Biblio qw( GetMarcStructure ); -use C4::Suggestions; +use C4::Suggestions qw( GetSuggestionInfoFromBiblionumber ); use Koha::Acquisition::Booksellers; use Koha::Acquisition::Currencies; diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 61e7db814aa..ca486f2bb37 100644 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -57,11 +57,11 @@ To filter the results list on this given date. use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Acquisition; -use C4::Budgets; +use C4::Acquisition qw( CancelReceipt get_rounded_price GetInvoiceDetails ); +use C4::Budgets qw( GetBudgetByOrderNumber GetBudgetName ); use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); -use C4::Suggestions; +use C4::Suggestions qw( GetSuggestionInfoFromBiblionumber ); use Koha::Acquisition::Baskets; use Koha::Acquisition::Bookseller; diff --git a/acqui/parcels.pl b/acqui/parcels.pl index 9de8f4352e4..7fa27648453 100644 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -71,8 +71,8 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Acquisition; -use C4::Budgets; +use C4::Acquisition qw( AddInvoice GetInvoices ); +use C4::Budgets qw( CanUserUseBudget GetBudgetHierarchy ); use Koha::Acquisition::Booksellers; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/acqui/spent.pl b/acqui/spent.pl index c68adfc1115..b8269d08df3 100644 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -34,7 +34,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Acquisition; +use C4::Acquisition qw( get_rounded_price ); use Koha::Acquisition::Invoice::Adjustments; my $dbh = C4::Context->dbh; diff --git a/acqui/supplier.pl b/acqui/supplier.pl index 78d71d4d7da..ecf800f9ab6 100644 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -46,7 +46,6 @@ use C4::Contract qw( GetContracts ); use C4::Output qw( output_html_with_http_headers ); use CGI qw ( -utf8 ); -use C4::Budgets; use Koha::Acquisition::Bookseller::Contacts; use Koha::Acquisition::Booksellers; diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index ca3e5fb8339..61f781121ba 100644 --- a/acqui/transferorder.pl +++ b/acqui/transferorder.pl @@ -25,7 +25,13 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Context; -use C4::Acquisition; +use C4::Acquisition qw( + GetBasket + GetBasketsByBookseller + GetOrder + SearchOrders + TransferOrder +); use Koha::Acquisition::Booksellers; my $input = CGI->new; diff --git a/acqui/uncertainprice.pl b/acqui/uncertainprice.pl index d6fe771aa61..03bb668ed0a 100644 --- a/acqui/uncertainprice.pl +++ b/acqui/uncertainprice.pl @@ -49,7 +49,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use CGI qw ( -utf8 ); -use C4::Acquisition qw/SearchOrders GetOrder ModOrder/; +use C4::Acquisition qw( GetOrder ModOrder SearchOrders ); use Koha::Acquisition::Booksellers; use Koha::Acquisition::Baskets; diff --git a/acqui/updatesupplier.pl b/acqui/updatesupplier.pl index b195c88fb6b..6d14f53ff37 100644 --- a/acqui/updatesupplier.pl +++ b/acqui/updatesupplier.pl @@ -48,9 +48,7 @@ contact_serialsprimary. use Modern::Perl; use C4::Context; -use C4::Auth qw( checkauth ); -use C4::Output; use Koha::Acquisition::Bookseller::Contacts; use Koha::Acquisition::Booksellers; diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index d493fc60ac0..94df3bfed8e 100644 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -53,7 +53,15 @@ use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Acquisition; -use C4::Budgets; +use C4::Budgets qw( + AddBudgetPeriod + DelBudgetPeriod + GetBudgetHierarchy + GetBudgetPeriod + GetBudgetPeriods + GetBudgets + ModBudgetPeriod +); use Koha::Acquisition::Currencies; my $dbh = C4::Context->dbh; diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 0301f191da3..b93f6ff5465 100644 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -26,10 +26,23 @@ use CGI qw ( -utf8 ); use Koha::Database; use C4::Auth qw( get_template_and_user ); use C4::Auth qw( get_template_and_user ); -use C4::Acquisition; -use C4::Budgets; +use C4::Budgets qw( + AddBudget + BudgetHasChildren + CanUserModifyBudget + CanUserUseBudget + DelBudget + GetBudget + GetBudgetAuthCats + GetBudgetHierarchy + GetBudgetPeriod + GetBudgetPeriods + GetBudgetUsers + ModBudget + ModBudgetUsers +); use C4::Context; -use C4::Output qw( output_html_with_http_headers output_and_exit ); +use C4::Output qw( output_and_exit output_html_with_http_headers ); use Koha::Acquisition::Currencies; use Koha::Patrons; diff --git a/admin/aqplan.pl b/admin/aqplan.pl index ee1f9c9f84b..2dd72f80f78 100644 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -27,10 +27,19 @@ use Date::Manip qw( DateCalc UnixDate ); use Text::CSV_XS (); use C4::Acquisition; -use C4::Budgets; +use C4::Budgets qw( + CanUserUseBudget + GetBudgetAuthCats + GetBudgetHierarchy + GetBudgetPeriod + GetBudgetsPlanCell + GetCols + GetPeriodsCount + HideCols + ModBudgetPlan +); use C4::Context; use C4::Output qw( output_html_with_http_headers ); -use C4::Koha; use C4::Auth qw( get_template_and_user ); use Koha::Acquisition::Currencies; diff --git a/admin/cash_registers.pl b/admin/cash_registers.pl index f3a3052554f..c9532445d19 100644 --- a/admin/cash_registers.pl +++ b/admin/cash_registers.pl @@ -25,7 +25,6 @@ use Try::Tiny qw( catch try ); use C4::Auth qw( get_template_and_user ); use Koha::Libraries; -use C4::Koha; use C4::Context; use C4::Output qw( output_html_with_http_headers ); use Koha::Cash::Registers; diff --git a/admin/check_budget_parent.pl b/admin/check_budget_parent.pl index da03f619299..2274679f3b0 100644 --- a/admin/check_budget_parent.pl +++ b/admin/check_budget_parent.pl @@ -22,7 +22,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); -use C4::Budgets; +use C4::Budgets qw( CheckBudgetParent GetBudget ); =head1 DESCRIPTION diff --git a/admin/check_parent_total.pl b/admin/check_parent_total.pl index b5fb288ea12..649f0d60001 100644 --- a/admin/check_parent_total.pl +++ b/admin/check_parent_total.pl @@ -22,7 +22,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); -use C4::Budgets; +use C4::Budgets qw( GetBudget GetBudgetPeriod ); =head1 DESCRIPTION diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl index 49cda42c1ed..bc1e1517524 100644 --- a/admin/searchengine/elasticsearch/mappings.pl +++ b/admin/searchengine/elasticsearch/mappings.pl @@ -19,8 +19,7 @@ use Modern::Perl; use CGI (); use Scalar::Util qw( looks_like_number ); use List::Util qw( first ); -use C4::Koha; -use C4::Output; +use C4::Output qw( output_and_exit output_html_with_http_headers ); use C4::Auth; use C4::Log (); diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl index a64c13d260c..69277656426 100644 --- a/authorities/auth_finder.pl +++ b/authorities/auth_finder.pl @@ -24,7 +24,6 @@ use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Acquisition; use Koha::SearchEngine::Search; use Koha::SearchEngine::QueryBuilder; diff --git a/basket/basket.pl b/basket/basket.pl index 30f73b8783e..8be137eaac1 100644 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -18,7 +18,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Koha; use C4::Biblio qw( GetBiblioData GetMarcAuthors diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index a3337f6f87c..c4f8fab9117 100644 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -59,7 +59,6 @@ use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure ); -use C4::Acquisition; use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber ); use C4::Search qw( z3950_search_args enabled_staff_search_views ); diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 175b31705ad..2f72cb7351d 100644 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -45,7 +45,6 @@ use C4::XSLT; use Koha::DateUtils qw( format_sqldatetime ); use C4::HTML5Media; use C4::CourseReserves qw( GetItemCourseReservesInfo ); -use C4::Acquisition qw(GetOrdersByBiblionumber); use Koha::AuthorisedValues; use Koha::Biblios; use Koha::CoverImages; diff --git a/catalogue/item-export.pl b/catalogue/item-export.pl index 4ca1d33acec..94676fcf1ab 100644 --- a/catalogue/item-export.pl +++ b/catalogue/item-export.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); -use C4::Output; my $cgi = CGI->new; diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 6d9022ff871..57c51bdec79 100644 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -21,7 +21,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( checkauth ); use C4::Context; -use C4::Output; use C4::Circulation qw( LostItem ); use C4::Reserves; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 4b363ee7268..6531266dcf2 100644 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -23,7 +23,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user haspermission ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index 4dd8e88399d..87724780782 100644 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -36,7 +36,7 @@ use C4::Biblio qw( ); use C4::Serials qw( CountSubscriptionFromBiblionumber ); use C4::Reserves qw( MergeHolds ); -use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/; +use C4::Acquisition qw( GetOrdersByBiblionumber ModOrder ); use Koha::BiblioFrameworks; use Koha::Items; diff --git a/cataloguing/moveitem.pl b/cataloguing/moveitem.pl index dd44774ef97..ce8f1ca6e44 100644 --- a/cataloguing/moveitem.pl +++ b/cataloguing/moveitem.pl @@ -26,7 +26,6 @@ use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Items qw( MoveItemFromBiblio ); use C4::Context; -use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/; use Koha::Biblios; diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl index 4ffc85f6030..6c06fadc31d 100644 --- a/cataloguing/value_builder/unimarc_field_210c.pl +++ b/cataloguing/value_builder/unimarc_field_210c.pl @@ -22,7 +22,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Output qw( pagination_bar output_html_with_http_headers ); +use C4::Output qw( output_html_with_http_headers pagination_bar ); use CGI qw ( -utf8 ); use C4::Search; use C4::Koha qw( getnbpages ); diff --git a/circ/add_message.pl b/circ/add_message.pl index ee90af35227..65605a86cb2 100644 --- a/circ/add_message.pl +++ b/circ/add_message.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output; use Koha::Patron::Message; my $input = CGI->new; diff --git a/circ/bookcount.pl b/circ/bookcount.pl index 7e04396f47a..eaca8c4d040 100644 --- a/circ/bookcount.pl +++ b/circ/bookcount.pl @@ -23,7 +23,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; -use C4::Circulation; use C4::Output qw( output_and_exit output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use Koha::Biblios; diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 4e23ae6d7dc..153a037808a 100644 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -24,9 +24,8 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Circulation qw( transferbook ); use C4::Output qw( output_html_with_http_headers ); -use C4::Reserves qw( ModReserve ModReserveAffect ); +use C4::Reserves qw( ModReserveAffect ); use C4::Auth qw( get_session get_template_and_user ); -use C4::Members; use Koha::BiblioFrameworks; use Koha::AuthorisedValues; use Koha::Holds; diff --git a/circ/circulation.pl b/circ/circulation.pl index a5d26b4533e..364616ee1fc 100644 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -29,15 +29,12 @@ use CGI qw ( -utf8 ); use DateTime; use DateTime::Duration; use Scalar::Util qw( looks_like_number ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Auth qw( get_session get_template_and_user ); -use C4::Koha; -use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue ); +use C4::Circulation qw( AddIssue barcodedecode CanBookBeIssued ); use C4::Utils::DataTables::Members; -use C4::Members; use C4::Biblio qw( TransformMarcToKoha ); -use C4::Search qw( new_record_from_zebra ); -use C4::Reserves; +use C4::Search (); use Koha::Holds; use C4::Context; use CGI::Session; diff --git a/circ/del_message.pl b/circ/del_message.pl index 778c4582268..964c19e24a8 100644 --- a/circ/del_message.pl +++ b/circ/del_message.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output; use Koha::Patron::Messages; my $input = CGI->new; diff --git a/circ/on-site_checkouts.pl b/circ/on-site_checkouts.pl index 41e9a877bdd..520c9c5f54c 100644 --- a/circ/on-site_checkouts.pl +++ b/circ/on-site_checkouts.pl @@ -19,7 +19,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Circulation qw( GetPendingOnSiteCheckouts ); +use C4::Circulation (); use C4::Output qw( output_html_with_http_headers ); use Koha::BiblioFrameworks; diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index de056af01ee..d2cc346d78e 100644 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -29,7 +29,6 @@ use C4::Output qw( output_html_with_http_headers ); use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Items (); -use C4::Reserves qw( ModReserveCancelAll ); use Koha::Biblios; use Koha::DateUtils qw( dt_from_string ); use Koha::Holds; diff --git a/circ/renew.pl b/circ/renew.pl index 383155416c4..ab0ee01d633 100644 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -23,7 +23,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation qw( barcodedecode CanBookBeRenewed GetSoonestRenewDate GetLatestAutoRenewDate AddRenewal ); +use C4::Circulation qw( AddRenewal barcodedecode CanBookBeRenewed ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Database; use Koha::BiblioFrameworks; diff --git a/circ/request-article.pl b/circ/request-article.pl index 16b3c5d5456..64f5a39b9a1 100644 --- a/circ/request-article.pl +++ b/circ/request-article.pl @@ -22,7 +22,7 @@ use Modern::Perl; use C4::Output qw( output_and_exit output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Utils::DataTables::Members; -use C4::Search qw( enabled_staff_search_views ); +use C4::Search (); use C4::Serials qw( CountSubscriptionFromBiblionumber ); use Koha::Biblios; use Koha::Patrons; diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index 7311d1e8c94..715c9956a3f 100644 --- a/circ/reserveratios.pl +++ b/circ/reserveratios.pl @@ -26,7 +26,7 @@ use POSIX qw( ceil ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); -use C4::Acquisition qw/GetOrdersByBiblionumber/; +use C4::Acquisition qw( GetOrdersByBiblionumber ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Acquisition::Baskets; diff --git a/circ/returns.pl b/circ/returns.pl index 65ba7dc5616..591a31a10a6 100644 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -34,18 +34,28 @@ use Modern::Perl; use CGI qw ( -utf8 ); use DateTime; -use C4::Auth qw( get_template_and_user get_session haspermission ); +use C4::Auth qw( get_session get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation qw( barcodedecode updateWrongTransfer GetBranchItemRule AddReturn LostItem ); -use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves ); -use C4::Circulation qw( barcodedecode updateWrongTransfer GetBranchItemRule AddReturn LostItem ); +use C4::Circulation qw( + AddReturn + barcodedecode + GetBranchItemRule + updateWrongTransfer +); +use C4::Reserves qw( GetOtherReserves ModReserveAffect ); +use C4::Circulation qw( + AddReturn + barcodedecode + GetBranchItemRule + updateWrongTransfer +); use C4::Context; use C4::Items qw( ModItemTransfer ); use C4::Members::Messaging; -use C4::Members; +use C4::Members (); use C4::Output qw( output_html_with_http_headers ); -use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves ); -use C4::RotatingCollections; +use C4::Reserves qw( GetOtherReserves ModReserveAffect ); +use C4::RotatingCollections qw( GetCollectionItemBranches ); use Koha::AuthorisedValues; use Koha::BiblioFrameworks; use Koha::Calendar; diff --git a/circ/set-library.pl b/circ/set-library.pl index b03759be628..3646f56a406 100644 --- a/circ/set-library.pl +++ b/circ/set-library.pl @@ -22,7 +22,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); -use C4::Auth qw( get_template_and_user get_session ); +use C4::Auth qw( get_session get_template_and_user ); use Koha::BiblioFrameworks; use Koha::Cash::Registers; use Koha::Libraries; diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index d0545b20e98..ca7ecb27c22 100644 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -23,11 +23,9 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); -use C4::Circulation qw( GetTransfers GetTransfersFromTo ); -use C4::Members; +use C4::Circulation qw( GetTransfersFromTo ); use Date::Calc qw( Add_Delta_Days Date_to_Days Today ); -use C4::Reserves; use Koha::Items; use Koha::ItemTypes; use Koha::Libraries; diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl index 7680419c73f..8085f027de8 100644 --- a/circ/waitingreserves.pl +++ b/circ/waitingreserves.pl @@ -23,11 +23,9 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); -use C4::Circulation; -use C4::Members; use C4::Items qw( ModItemTransfer ); use Date::Calc qw( Date_to_Days Today ); -use C4::Reserves qw( ModReserve ModReserveCancelAll ); +use C4::Reserves qw( ModReserveCancelAll ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::BiblioFrameworks; use Koha::Items; diff --git a/docs/CAS/CASProxy/examples/koha_webservice.pl b/docs/CAS/CASProxy/examples/koha_webservice.pl index da7fc8b10de..bf850130374 100644 --- a/docs/CAS/CASProxy/examples/koha_webservice.pl +++ b/docs/CAS/CASProxy/examples/koha_webservice.pl @@ -39,8 +39,7 @@ use utf8; use Modern::Perl; binmode(STDOUT, ":encoding(UTF-8)"); -use C4::Auth qw(check_api_auth); -use C4::Output; +use C4::Auth qw( check_api_auth ); use C4::Context; use CGI qw ( -utf8 ); diff --git a/members/boraccount.pl b/members/boraccount.pl index aab87be2d8e..cb481f8457b 100644 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -26,7 +26,7 @@ use Modern::Perl; use URI::Escape qw( uri_unescape ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use CGI qw ( -utf8 ); use Koha::Cash::Registers; use Koha::Patrons; diff --git a/members/deletemem.pl b/members/deletemem.pl index da4efa679b1..e841ba665cc 100644 --- a/members/deletemem.pl +++ b/members/deletemem.pl @@ -28,9 +28,13 @@ use CGI qw ( -utf8 ); use Try::Tiny qw( catch try ); use C4::Context; -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); -use C4::Auth qw( get_template_and_user haspermission ); -use C4::Suggestions qw( SearchSuggestion ); +use C4::Output qw( + output_and_exit + output_and_exit_if_error + output_html_with_http_headers +); +use C4::Auth qw( get_template_and_user ); +use C4::Suggestions (); use Koha::Patrons; use Koha::Token; use Koha::Patron::Categories; diff --git a/members/discharge.pl b/members/discharge.pl index 6a8d335475f..742e23fe7c2 100644 --- a/members/discharge.pl +++ b/members/discharge.pl @@ -32,7 +32,7 @@ use Carp qw( carp ); use CGI qw( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Reserves; use Koha::Patron::Discharge; use Koha::Patrons; diff --git a/members/discharges.pl b/members/discharges.pl index 7f7fdcbcb65..2d318c5d76d 100644 --- a/members/discharges.pl +++ b/members/discharges.pl @@ -21,7 +21,7 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Context; use Koha::Patron::Discharge; diff --git a/members/files.pl b/members/files.pl index 2abfbc71dee..84cb1214324 100644 --- a/members/files.pl +++ b/members/files.pl @@ -22,7 +22,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Members; use Koha::Patrons; diff --git a/members/housebound.pl b/members/housebound.pl index bb686b0a0a8..d1c68e97a70 100644 --- a/members/housebound.pl +++ b/members/housebound.pl @@ -28,7 +28,7 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use DateTime; use Koha::DateUtils qw( dt_from_string ); use Koha::Libraries; diff --git a/members/ill-requests.pl b/members/ill-requests.pl index f2b23844c07..f13627bb6e7 100644 --- a/members/ill-requests.pl +++ b/members/ill-requests.pl @@ -21,7 +21,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use Koha::Patrons; my $input = CGI->new; diff --git a/members/mancredit.pl b/members/mancredit.pl index 943230b15aa..ffd8dabee4d 100644 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -24,7 +24,11 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( + output_and_exit + output_and_exit_if_error + output_html_with_http_headers +); use CGI qw ( -utf8 ); use C4::Members; diff --git a/members/maninvoice.pl b/members/maninvoice.pl index fff99b923b4..3bfb38de77b 100644 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -26,7 +26,11 @@ use Modern::Perl; use Try::Tiny qw( catch try ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( + output_and_exit + output_and_exit_if_error + output_html_with_http_headers +); use CGI qw ( -utf8 ); use C4::Members; use C4::Accounts; diff --git a/members/member-password.pl b/members/member-password.pl index 5bfb7b9faee..a5b0c0cc986 100644 --- a/members/member-password.pl +++ b/members/member-password.pl @@ -7,7 +7,11 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( + output_and_exit + output_and_exit_if_error + output_html_with_http_headers +); use C4::Context; use C4::Members; use C4::Circulation; diff --git a/members/memberentry.pl b/members/memberentry.pl index 3584c61841f..60d5938dd52 100644 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -27,7 +27,11 @@ use CGI qw ( -utf8 ); # internal modules use C4::Auth qw( get_template_and_user haspermission ); use C4::Context; -use C4::Output qw( output_and_exit output_and_exit_if_error output_html_with_http_headers ); +use C4::Output qw( + output_and_exit + output_and_exit_if_error + output_html_with_http_headers +); use C4::Members qw( checkcardnumber get_cardnumber_length ); use C4::Koha qw( GetAuthorisedValues ); use C4::Letters qw( SendAlerts ); diff --git a/members/members-update-do.pl b/members/members-update-do.pl index 88d021a3943..ef996cb4251 100644 --- a/members/members-update-do.pl +++ b/members/members-update-do.pl @@ -20,7 +20,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output; use C4::Context; use Koha::Patrons; use Koha::Patron::Modifications; diff --git a/members/moremember.pl b/members/moremember.pl index 8012b731cd5..1e9193ff334 100644 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -31,7 +31,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Form::MessagingPreferences; use List::MoreUtils qw( uniq ); use Koha::Patron::Attribute::Types; diff --git a/members/notices.pl b/members/notices.pl index 620a15fc86e..d4b20fd196f 100644 --- a/members/notices.pl +++ b/members/notices.pl @@ -21,7 +21,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use CGI qw ( -utf8 ); use C4::Members; use C4::Letters (); diff --git a/members/pay.pl b/members/pay.pl index e7243072cc1..79efc1acbad 100644 --- a/members/pay.pl +++ b/members/pay.pl @@ -31,7 +31,7 @@ use Modern::Perl; use URI::Escape qw( uri_escape_utf8 uri_unescape ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use CGI qw ( -utf8 ); use Koha::Patrons; use Koha::Items; diff --git a/members/paycollect.pl b/members/paycollect.pl index 5184681e0d2..680b269fc65 100644 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -23,7 +23,11 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( + output_and_exit + output_and_exit_if_error + output_html_with_http_headers +); use Koha::Cash::Registers; use Koha::Patrons; diff --git a/members/print_overdues.pl b/members/print_overdues.pl index 7636d33e11c..3e3790400fd 100644 --- a/members/print_overdues.pl +++ b/members/print_overdues.pl @@ -23,7 +23,7 @@ use CGI (); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Overdues qw( parse_overdues_letter ); use Koha::Patrons; diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl index 154814e195e..688c0cf151e 100644 --- a/members/printfeercpt.pl +++ b/members/printfeercpt.pl @@ -21,7 +21,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use CGI qw ( -utf8 ); use C4::Letters (); use Koha::Account::Lines; diff --git a/members/printinvoice.pl b/members/printinvoice.pl index 8ee352d0b77..d37ad60e6e8 100644 --- a/members/printinvoice.pl +++ b/members/printinvoice.pl @@ -21,7 +21,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use CGI qw ( -utf8 ); use C4::Letters (); use Koha::Account::Lines; diff --git a/members/printslip.pl b/members/printslip.pl index 8f47de880e2..4ba0b18a3e5 100644 --- a/members/printslip.pl +++ b/members/printslip.pl @@ -36,7 +36,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_session get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Members qw( IssueSlip ); #use Smart::Comments; diff --git a/members/purchase-suggestions.pl b/members/purchase-suggestions.pl index 7df9ea02b22..43666f215d8 100644 --- a/members/purchase-suggestions.pl +++ b/members/purchase-suggestions.pl @@ -22,9 +22,9 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Members; -use C4::Suggestions; +use C4::Suggestions qw( SearchSuggestion ); use Koha::Patrons; my $input = CGI->new; diff --git a/members/readingrec.pl b/members/readingrec.pl index b0e2a5b9a1a..e1c4e8da6de 100644 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -25,7 +25,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Members qw( GetAllIssues ); use List::MoreUtils qw( uniq ); use Koha::DateUtils qw( dt_from_string ); diff --git a/members/statistics.pl b/members/statistics.pl index e407eaf025b..f39762bbac9 100644 --- a/members/statistics.pl +++ b/members/statistics.pl @@ -33,7 +33,7 @@ use C4::Members::Statistics qw( GetTotalIssuesReturnedTodayByBorrower GetTotalIssuesTodayByBorrower ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use Koha::Patrons; use Koha::Patron::Categories; diff --git a/members/summary-print.pl b/members/summary-print.pl index 6ea5ba20338..c00d70089b8 100644 --- a/members/summary-print.pl +++ b/members/summary-print.pl @@ -20,7 +20,7 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use C4::Members; use C4::Circulation qw( GetIssuingCharges ); use C4::Reserves; diff --git a/members/update-child.pl b/members/update-child.pl index f6f3e0ce741..68f7f81a4af 100644 --- a/members/update-child.pl +++ b/members/update-child.pl @@ -30,7 +30,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_html_with_http_headers output_and_exit_if_error output_and_exit ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use Koha::Patrons; use Koha::Patron::Categories; use Koha::Patrons; diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl index da7ceb86bd0..c8f769c09e5 100644 --- a/misc/cronjobs/advance_notices.pl +++ b/misc/cronjobs/advance_notices.pl @@ -47,10 +47,9 @@ BEGIN { } use Koha::Script -cron; use C4::Context; -use C4::Letters qw( get_item_content EnqueueLetter GetPreparedLetter ); -use C4::Members; +use C4::Letters (); +use C4::Members (); use C4::Members::Messaging; -use C4::Overdues; use C4::Log qw( cronlogaction ); use Koha::Items; use Koha::Libraries; diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm index 9636758ad8a..f4fc2f94b2c 100644 --- a/misc/translator/LangInstaller.pm +++ b/misc/translator/LangInstaller.pm @@ -23,12 +23,11 @@ use C4::Context; # WARNING: Any other tested YAML library fails to work properly in this # script content # FIXME Really? -use YAML::XS; +use YAML::XS (); use Locale::PO; use FindBin qw( $Bin ); -use File::Basename; use File::Path qw( make_path ); -use File::Copy; +use File::Copy (); sub set_lang { my ($self, $lang) = @_; diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm index e594cf93581..a6a2135a2d5 100644 --- a/misc/translator/TmplTokenizer.pm +++ b/misc/translator/TmplTokenizer.pm @@ -1,7 +1,7 @@ package TmplTokenizer; use Modern::Perl; -use C4::TmplTokenType qw( CDATA UNKNOWN DIRECTIVE TEXT TAG TEXT_PARAMETRIZED to_string ); +use C4::TmplTokenType (); use C4::TmplToken; use C4::TTParser; use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic ); diff --git a/offline_circ/download.pl b/offline_circ/download.pl index 09d7ba2282c..74e585dfd72 100644 --- a/offline_circ/download.pl +++ b/offline_circ/download.pl @@ -20,8 +20,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use JSON qw( to_json ); -use C4::Auth qw( checkauth ); -use C4::Output; use C4::Context; my $query = CGI->new; diff --git a/offline_circ/enqueue_koc.pl b/offline_circ/enqueue_koc.pl index 1618e2d03ed..bec5c33648f 100644 --- a/offline_circ/enqueue_koc.pl +++ b/offline_circ/enqueue_koc.pl @@ -24,10 +24,7 @@ use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Accounts; use C4::Circulation qw( AddOfflineOperation ); -use C4::Members; -use C4::Stats; use Koha::Checkouts; use Koha::UploadedFiles; use Koha::Items; diff --git a/offline_circ/list.pl b/offline_circ/list.pl index 252dc8594b8..cf00758631a 100644 --- a/offline_circ/list.pl +++ b/offline_circ/list.pl @@ -24,8 +24,7 @@ use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Circulation qw( GetOfflineOperations GetOfflineOperation ); -use C4::Members; +use C4::Circulation qw( GetOfflineOperations ); use Koha::Patrons; use Koha::Items; diff --git a/offline_circ/process.pl b/offline_circ/process.pl index 09520a1caee..2d889d37076 100644 --- a/offline_circ/process.pl +++ b/offline_circ/process.pl @@ -22,7 +22,11 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Circulation qw( GetOfflineOperation ProcessOfflineOperation DeleteOfflineOperation ); +use C4::Circulation qw( + DeleteOfflineOperation + GetOfflineOperation + ProcessOfflineOperation +); my $query = CGI->new; diff --git a/offline_circ/process_koc.pl b/offline_circ/process_koc.pl index 9b482538e77..583102a751a 100644 --- a/offline_circ/process_koc.pl +++ b/offline_circ/process_koc.pl @@ -25,11 +25,8 @@ use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Accounts; -use C4::Circulation qw( barcodedecode GetOpenIssue AddRenewal AddIssue MarkIssueReturned ); +use C4::Circulation qw( barcodedecode GetOpenIssue ); use C4::Items qw( ModDateLastSeen ); -use C4::Members; -use C4::Stats; use C4::BackgroundJob; use Koha::UploadedFiles; use Koha::Account; diff --git a/offline_circ/service.pl b/offline_circ/service.pl index 00ae314c0fd..07e139adc66 100644 --- a/offline_circ/service.pl +++ b/offline_circ/service.pl @@ -21,7 +21,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Auth qw( check_api_auth check_cookie_auth ); +use C4::Auth (); use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation ); use Koha::DateUtils qw( dt_from_string ); use DateTime::TimeZone; diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl index a937cb25a8e..7b9f858822a 100644 --- a/opac/opac-ISBDdetail.pl +++ b/opac/opac-ISBDdetail.pl @@ -43,7 +43,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Output qw( parametrized_url output_html_with_http_headers ); +use C4::Output qw( output_html_with_http_headers parametrized_url ); use CGI qw ( -utf8 ); use C4::Biblio qw( CountItemsIssued @@ -53,7 +53,6 @@ use C4::Biblio qw( TransformMarcToKoha ); use C4::Reserves; -use C4::Acquisition; use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials ); use C4::Koha qw( GetNormalizedEAN diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index 272d3e5e593..c6adfb7fb38 100644 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -47,7 +47,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::Output qw( parametrized_url output_html_with_http_headers ); +use C4::Output qw( output_html_with_http_headers parametrized_url ); use CGI qw ( -utf8 ); use C4::Biblio qw( CountItemsIssued @@ -61,7 +61,6 @@ use C4::Biblio qw( ); use C4::Reserves; use C4::Members; -use C4::Acquisition; use C4::Koha qw( GetNormalizedISBN ); use List::MoreUtils qw( uniq ); use Koha::Biblios; diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl index c9abb770dab..0d2a741a650 100644 --- a/opac/opac-account-pay.pl +++ b/opac/opac-account-pay.pl @@ -24,7 +24,6 @@ use Modern::Perl; use CGI (); use C4::Auth qw( get_template_and_user ); -use C4::Output; use C4::Context; use Koha::Acquisition::Currencies; use Koha::Database; diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl index 9d511afc160..d9dc85d2c35 100644 --- a/opac/opac-authorities-home.pl +++ b/opac/opac-authorities-home.pl @@ -26,9 +26,8 @@ use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( pagination_bar output_html_with_http_headers ); +use C4::Output qw( output_html_with_http_headers pagination_bar ); use C4::Auth qw( get_template_and_user ); -use C4::Koha; use C4::Search::History; use Koha::Authority::Types; diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 269e8a013d0..0b077dd00b8 100644 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -26,7 +26,7 @@ use String::Random qw( random_string ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Context; -use C4::Members qw( get_cardnumber_length checkcardnumber ); +use C4::Members qw( checkcardnumber ); use C4::Form::MessagingPreferences; use Koha::AuthUtils (); use Koha::Patrons; diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 748df1505bb..c07ee51451d 100644 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -41,8 +41,8 @@ my ($builder, $searcher); $builder = Koha::SearchEngine::QueryBuilder->new({index => 'biblios'}); $searcher = Koha::SearchEngine::Search->new({index => 'biblios'}); -use C4::Output qw( output_html_with_http_headers pagination_bar output_with_http_headers ); -use C4::Auth qw( get_template_and_user get_session ); +use C4::Output qw( output_html_with_http_headers output_with_http_headers ); +use C4::Auth qw( get_session get_template_and_user ); use C4::Languages qw( getLanguages ); use C4::Search qw( searchResults ); use C4::Search qw( searchResults ); diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 88540c4d214..1a6d208b1de 100644 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -31,7 +31,7 @@ use C4::Koha qw( ); use C4::Items qw( GetItemsLocationInfo ); use C4::Members; -use C4::Output qw( pagination_bar output_with_http_headers ); +use C4::Output qw( output_with_http_headers pagination_bar ); use C4::Tags qw( get_tags ); use C4::XSLT; diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 429eccfb022..f14a3f37657 100644 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -24,7 +24,12 @@ use C4::Auth qw( get_template_and_user ); use C4::Members; use C4::Koha qw( GetAuthorisedValues ); use C4::Output qw( output_html_with_http_headers ); -use C4::Suggestions; +use C4::Suggestions qw( + DelSuggestion + MarcRecordFromNewSuggestion + NewSuggestion + SearchSuggestion +); use C4::Koha qw( GetAuthorisedValues ); use C4::Scrubber; use C4::Search qw( FindDuplicate ); diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl index 1ac4604f430..55d75a4afcc 100644 --- a/opac/opac-tags.pl +++ b/opac/opac-tags.pl @@ -37,7 +37,11 @@ use CGI::Cookie; # need to check cookies before having CGI parse the POST reques use C4::Auth qw( check_cookie_auth get_template_and_user ); use C4::Context; -use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers ); +use C4::Output qw( + is_ajax + output_html_with_http_headers + output_with_http_headers +); use C4::Scrubber; use C4::Biblio qw( GetMarcBiblio ); use C4::Items qw( GetHiddenItemnumbers GetItemsInfo ); diff --git a/patron_lists/delete.pl b/patron_lists/delete.pl index 773ec3d1686..e05c613de10 100644 --- a/patron_lists/delete.pl +++ b/patron_lists/delete.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output; use Koha::List::Patron qw( DelPatronList ); my $cgi = CGI->new; diff --git a/patroncards/add_user_search.pl b/patroncards/add_user_search.pl index 04bc0eb5b39..da5525e9f5a 100644 --- a/patroncards/add_user_search.pl +++ b/patroncards/add_user_search.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Members; use Koha::Patron::Categories; diff --git a/plugins/plugins-uninstall.pl b/plugins/plugins-uninstall.pl index d6a85d39d32..0f7c0a76044 100644 --- a/plugins/plugins-uninstall.pl +++ b/plugins/plugins-uninstall.pl @@ -22,7 +22,6 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Auth qw( get_template_and_user ); -use C4::Output; use C4::Members; use Koha::Plugins::Handler; diff --git a/pos/printreceipt.pl b/pos/printreceipt.pl index d1db34136ee..1d61f7162c2 100644 --- a/pos/printreceipt.pl +++ b/pos/printreceipt.pl @@ -20,7 +20,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); -use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); +use C4::Output qw( output_and_exit_if_error output_html_with_http_headers ); use CGI qw ( -utf8 ); use C4::Letters (); use Koha::Account::Lines; diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index 324574a6fa0..1d27870c525 100644 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -25,7 +25,6 @@ use C4::Context; use C4::Reports qw( GetDelimiterChoices ); use C4::Output qw( output_html_with_http_headers ); use C4::Koha qw( GetAuthorisedValues ); -use C4::Circulation; use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField ); use Koha::ItemTypes; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index 222ac1317ae..ec1a309724c 100644 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -23,8 +23,6 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Context; -use C4::Circulation; -use C4::Members; use C4::Reports qw( GetDelimiterChoices ); use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index 3ace9dcef19..9d7fba6cac6 100644 --- a/reports/borrowers_out.pl +++ b/reports/borrowers_out.pl @@ -23,9 +23,7 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation; use C4::Reports qw( GetDelimiterChoices ); -use C4::Members; use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Patron::Categories; diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index cfa765685a2..f636f6b5664 100644 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -23,10 +23,8 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Koha qw( GetAuthorisedValues ); -use C4::Acquisition; use C4::Output qw( output_html_with_http_headers ); use C4::Reports qw( GetDelimiterChoices ); -use C4::Circulation; use Koha::AuthorisedValues; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl index 5e7116aa6f7..21714811931 100644 --- a/reports/cash_register_stats.pl +++ b/reports/cash_register_stats.pl @@ -21,7 +21,6 @@ use CGI (); use C4::Context; use C4::Reports qw( GetDelimiterChoices ); use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation; use DateTime; use Koha::DateUtils qw( dt_from_string output_pref ); use Text::CSV::Encoded; diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index de9c9d8a8ff..0660af5a6f1 100644 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -24,9 +24,7 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Koha qw( GetAuthorisedValues ); -use C4::Circulation; use C4::Reports qw( GetDelimiterChoices ); -use C4::Members; use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::ItemTypes; diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index bc5f3e7e490..c3795df6d28 100644 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -25,7 +25,6 @@ use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Koha qw( GetAuthorisedValues ); use C4::Reports qw( GetDelimiterChoices ); -use C4::Circulation; use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField ); use Koha::AuthorisedValues; diff --git a/reports/dictionary.pl b/reports/dictionary.pl index ef95e7108d8..16baf7daaf8 100644 --- a/reports/dictionary.pl +++ b/reports/dictionary.pl @@ -20,7 +20,15 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); -use C4::Reports::Guided qw( get_from_dictionary get_columns get_column_type get_distinct_values save_dictionary delete_definition get_report_areas ); +use C4::Reports::Guided qw( + delete_definition + get_column_type + get_columns + get_distinct_values + get_from_dictionary + get_report_areas + save_dictionary +); use Koha::DateUtils qw( dt_from_string output_pref ); =head1 NAME diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 076cc58627f..038bd41c259 100644 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -23,10 +23,26 @@ use Text::CSV::Encoded; use Encode qw( decode ); use URI::Escape (); use File::Temp (); -use C4::Reports::Guided qw( delete_report get_report_areas convert_sql update_sql get_saved_reports get_results ValidateSQLParameters format_results get_report_types get_columns get_from_dictionary get_criteria build_query save_report execute_query nb_rows get_report_groups ); +use C4::Reports::Guided qw( + build_query + delete_report + execute_query + format_results + get_columns + get_criteria + get_from_dictionary + get_report_areas + get_report_groups + get_report_types + get_saved_reports + nb_rows + save_report + update_sql + ValidateSQLParameters +); use Koha::Reports; -use C4::Auth qw( get_template_and_user get_session ); -use C4::Output qw( pagination_bar output_html_with_http_headers ); +use C4::Auth qw( get_session get_template_and_user ); +use C4::Output qw( output_html_with_http_headers pagination_bar ); use C4::Context; use Koha::Caches; use C4::Log qw( logaction ); diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index 02087e7d7ec..7be36a54c2d 100644 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -23,7 +23,6 @@ use C4::Auth qw( get_template_and_user ); use CGI qw ( -utf8 ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation; use C4::Reports qw( GetDelimiterChoices ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::ItemTypes; diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index f97cec15f97..3eb27fb3e27 100644 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -25,9 +25,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Koha qw( GetAuthorisedValues ); use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation; use C4::Reports qw( GetDelimiterChoices ); -use C4::Members; use Koha::AuthorisedValues; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/reports/manager.pl b/reports/manager.pl index 5fa6f96c3a5..ff174f00d33 100644 --- a/reports/manager.pl +++ b/reports/manager.pl @@ -22,7 +22,6 @@ use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Output qw( output_html_with_http_headers ); -use C4::Circulation; my $input = CGI->new; diff --git a/reports/orders_by_fund.pl b/reports/orders_by_fund.pl index 2f25baa55be..5f81be02492 100644 --- a/reports/orders_by_fund.pl +++ b/reports/orders_by_fund.pl @@ -30,8 +30,8 @@ use Modern::Perl; use CGI qw( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Budgets; -use C4::Acquisition; #GetBasket() +use C4::Budgets qw( GetBudgetHierarchy ); +use C4::Acquisition qw( get_rounded_price ); #GetBasket() use Koha::Biblios; use Koha::DateUtils qw( dt_from_string output_pref ); diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index cb63a6ef87d..e1329487681 100644 --- a/reports/reserves_stats.pl +++ b/reports/reserves_stats.pl @@ -26,7 +26,6 @@ use C4::Context; use C4::Koha qw( GetAuthorisedValues ); use C4::Output qw( output_html_with_http_headers ); use C4::Reports qw( GetDelimiterChoices ); -use C4::Members; use Koha::AuthorisedValues; use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::ItemTypes; diff --git a/reviews/reviewswaiting.pl b/reviews/reviewswaiting.pl index 6d50443618a..9d036e8167b 100644 --- a/reviews/reviewswaiting.pl +++ b/reviews/reviewswaiting.pl @@ -19,7 +19,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); -use C4::Output qw( pagination_bar output_html_with_http_headers ); +use C4::Output qw( output_html_with_http_headers pagination_bar ); use C4::Context; use Koha::Biblios; use Koha::Patrons; diff --git a/rotating_collections/addItems.pl b/rotating_collections/addItems.pl index 6cde9aebcee..543f8ff896f 100644 --- a/rotating_collections/addItems.pl +++ b/rotating_collections/addItems.pl @@ -21,7 +21,12 @@ use Modern::Perl; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::RotatingCollections; +use C4::RotatingCollections qw( + AddItemToCollection + GetCollection + GetItemsInCollection + RemoveItemFromCollection +); use Koha::Items; diff --git a/rotating_collections/editCollections.pl b/rotating_collections/editCollections.pl index 28a23e58675..5e82ef55b9d 100644 --- a/rotating_collections/editCollections.pl +++ b/rotating_collections/editCollections.pl @@ -24,7 +24,12 @@ use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::RotatingCollections; +use C4::RotatingCollections qw( + CreateCollection + DeleteCollection + GetCollection + UpdateCollection +); my $query = CGI->new; diff --git a/rotating_collections/rotatingCollections.pl b/rotating_collections/rotatingCollections.pl index b350861d1e3..80730a52612 100644 --- a/rotating_collections/rotatingCollections.pl +++ b/rotating_collections/rotatingCollections.pl @@ -23,7 +23,7 @@ use CGI qw ( -utf8 ); use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::RotatingCollections; +use C4::RotatingCollections qw( GetCollections ); my $query = CGI->new; diff --git a/rotating_collections/transferCollection.pl b/rotating_collections/transferCollection.pl index 1d5dcf8d581..0346c315624 100644 --- a/rotating_collections/transferCollection.pl +++ b/rotating_collections/transferCollection.pl @@ -21,7 +21,7 @@ use Modern::Perl; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Context; -use C4::RotatingCollections; +use C4::RotatingCollections qw( GetCollection TransferCollection ); use CGI qw ( -utf8 ); diff --git a/serials/claims.pl b/serials/claims.pl index 7db7685ab59..f988a6cc4ff 100644 --- a/serials/claims.pl +++ b/serials/claims.pl @@ -21,7 +21,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Serials qw( GetSuppliersWithLateIssues GetLateOrMissingIssues updateClaim can_claim_subscription ); -use C4::Acquisition; use C4::Output qw( output_html_with_http_headers ); use C4::Context; use C4::Letters qw( GetLetters SendAlerts ); diff --git a/serials/lateissues-export.pl b/serials/lateissues-export.pl index f981bc12c71..eaa922fc087 100644 --- a/serials/lateissues-export.pl +++ b/serials/lateissues-export.pl @@ -19,8 +19,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth; use C4::Serials qw( GetLateOrMissingIssues updateClaim ); -use C4::Acquisition; -use C4::Output; use C4::Context; use Koha::CsvProfiles; diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 8359029d5c1..42102cbc426 100644 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -22,7 +22,6 @@ use Date::Calc qw( Add_Delta_Days Add_Delta_YM ); use C4::Koha qw( GetAuthorisedValues ); use C4::Biblio qw( GetMarcBiblio ); use C4::Auth qw( get_template_and_user ); -use C4::Acquisition; use C4::Output qw( output_and_exit output_html_with_http_headers ); use C4::Context; use C4::Serials qw( GetSubscription GetNextExpected GetSerials GetSubscriptionLength NewSubscription ModNextExpected ModSubscription ); diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 347e5cefdb0..c28c513d828 100644 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -19,7 +19,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Acquisition; use C4::Auth qw( get_template_and_user checkauth ); -use C4::Budgets; use C4::Serials qw( CloseSubscription ReopenSubscription GetSubscription GetExpirationDate GetSerials HasSubscriptionStrictlyExpired CountIssues HasItems DelSubscription check_routing abouttoexpire can_edit_subscription ); use C4::Output qw( output_and_exit output_html_with_http_headers ); use C4::Context; diff --git a/suggestion/add_user_search.pl b/suggestion/add_user_search.pl index d4b5ff02434..3f2b105ffcd 100644 --- a/suggestion/add_user_search.pl +++ b/suggestion/add_user_search.pl @@ -20,7 +20,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Members; use Koha::Patron::Categories; diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 683c4d47db4..7ff6798c5d3 100644 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -22,11 +22,22 @@ require Exporter; use CGI qw ( -utf8 ); use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); -use C4::Suggestions; +use C4::Suggestions qw( + DelSuggestion + GetSuggestion + MarcRecordFromNewSuggestion + ModSuggestion + NewSuggestion + SearchSuggestion +); use C4::Koha qw( GetAuthorisedValues ); -use C4::Budgets; +use C4::Budgets qw( + CanUserUseBudget + GetBudget + GetBudgetHierarchy + GetBudgets +); use C4::Search qw( FindDuplicate GetDistinctValues ); -use C4::Members; use Koha::DateUtils qw( dt_from_string ); use Koha::AuthorisedValues; use Koha::Acquisition::Currencies; diff --git a/t/lib/Dates.pm b/t/lib/Dates.pm index 66299d9eb12..53400998812 100644 --- a/t/lib/Dates.pm +++ b/t/lib/Dates.pm @@ -1,7 +1,7 @@ package t::lib::Dates; use Modern::Perl; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string ); use DateTime; =head1 NAME diff --git a/t/lib/Koha/BackgroundJob/BatchTest.pm b/t/lib/Koha/BackgroundJob/BatchTest.pm index 6e740386516..2b6490dbfcc 100644 --- a/t/lib/Koha/BackgroundJob/BatchTest.pm +++ b/t/lib/Koha/BackgroundJob/BatchTest.pm @@ -16,7 +16,7 @@ package t::lib::Koha::BackgroundJob::BatchTest; # along with Koha; if not, see . use Modern::Perl; -use JSON qw( encode_json decode_json ); +use JSON qw( decode_json encode_json ); use Koha::BackgroundJobs; use Koha::DateUtils qw( dt_from_string ); diff --git a/t/lib/Koha/Plugin/BadAPIRoute.pm b/t/lib/Koha/Plugin/BadAPIRoute.pm index baf7e23a3f6..66a1417a3d3 100644 --- a/t/lib/Koha/Plugin/BadAPIRoute.pm +++ b/t/lib/Koha/Plugin/BadAPIRoute.pm @@ -2,7 +2,7 @@ package Koha::Plugin::BadAPIRoute; use Modern::Perl; -use Mojo::JSON qw(decode_json); +use Mojo::JSON qw( decode_json ); use base qw(Koha::Plugins::Base); diff --git a/t/lib/Koha/Plugin/MarcFieldValues.pm b/t/lib/Koha/Plugin/MarcFieldValues.pm index ee763b88384..35b1ba9a07d 100644 --- a/t/lib/Koha/Plugin/MarcFieldValues.pm +++ b/t/lib/Koha/Plugin/MarcFieldValues.pm @@ -2,7 +2,7 @@ package Koha::Plugin::MarcFieldValues; use Modern::Perl; use MARC::Field; -use MARC::Record; +use MARC::Record (); use base qw(Koha::Plugins::Base); diff --git a/t/lib/Koha/Plugin/Test.pm b/t/lib/Koha/Plugin/Test.pm index 1c296b05955..36565397b77 100644 --- a/t/lib/Koha/Plugin/Test.pm +++ b/t/lib/Koha/Plugin/Test.pm @@ -6,7 +6,7 @@ use Modern::Perl; use Koha::Exceptions::Exception; use Koha::Plugins::Tab; -use Mojo::JSON qw(decode_json); +use Mojo::JSON qw( decode_json ); ## Required for all plugins use base qw(Koha::Plugins::Base); diff --git a/t/lib/Selenium.pm b/t/lib/Selenium.pm index 35d2c04fc39..3833deab4ee 100644 --- a/t/lib/Selenium.pm +++ b/t/lib/Selenium.pm @@ -18,8 +18,6 @@ package t::lib::Selenium; use Modern::Perl; use Carp qw( croak ); -use JSON qw( from_json ); -use File::Slurp qw( write_file ); use C4::Context; diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm index cf136cb98b7..4ceae628b86 100644 --- a/t/lib/TestBuilder.pm +++ b/t/lib/TestBuilder.pm @@ -3,15 +3,15 @@ package t::lib::TestBuilder; use Modern::Perl; use Koha::Database; -use C4::Biblio qw( AddBiblio ); +use C4::Biblio (); use Koha::Biblios; use Koha::Items; use Koha::DateUtils qw( dt_from_string ); -use Bytes::Random::Secure; -use Carp; -use Module::Load; -use String::Random; +use Bytes::Random::Secure (); +use Carp qw( carp ); +use Module::Load qw( load ); +use String::Random (); use constant { SIZE_BARCODE => 20, # Not perfect but avoid to fetch the value when creating a new item diff --git a/tags/review.pl b/tags/review.pl index 9abf5dbba57..0ce9049daa0 100644 --- a/tags/review.pl +++ b/tags/review.pl @@ -28,7 +28,12 @@ use URI::Escape qw( uri_escape_utf8 ); use C4::Auth qw( check_cookie_auth get_template_and_user ); use C4::Context; use Koha::DateUtils qw( dt_from_string output_pref ); -use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers ); +use C4::Output qw( + is_ajax + output_html_with_http_headers + output_with_http_headers + pagination_bar +); use C4::Tags qw( approval_counts blacklist diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 084fc0b6ca2..d2417611423 100644 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -38,7 +38,6 @@ use C4::Context; use C4::Koha; use C4::BackgroundJob; use C4::ClassSource qw( GetClassSources ); -use C4::Members; use MARC::File::XML; use List::MoreUtils qw( uniq ); diff --git a/tools/copy-holidays.pl b/tools/copy-holidays.pl index 381f9e70a54..b237c5eb8c8 100644 --- a/tools/copy-holidays.pl +++ b/tools/copy-holidays.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( checkauth ); -use C4::Output; use C4::Calendar; diff --git a/tools/exceptionHolidays.pl b/tools/exceptionHolidays.pl index a96b1d0ebb6..91148cd5c6d 100644 --- a/tools/exceptionHolidays.pl +++ b/tools/exceptionHolidays.pl @@ -5,7 +5,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( checkauth ); -use C4::Output; use DateTime; use C4::Calendar; diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index b07079d52b1..d5e53fb8973 100644 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -22,7 +22,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw( checkauth ); -use C4::Output; use C4::Calendar; use DateTime; diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index 85a529e4928..8a398bf2fbe 100644 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -28,9 +28,8 @@ use C4::Koha qw( GetNormalizedUPC ); use C4::Items qw( GetItemsLocationInfo ); -use C4::Members; -use C4::Output qw( pagination_bar output_html_with_http_headers ); -use C4::XSLT; +use C4::Output qw( output_html_with_http_headers pagination_bar ); +use C4::XSLT qw( XSLTParse4Display ); use Koha::Biblios; use Koha::Biblioitems; -- 2.20.1