@@ -, +, @@ --- C4/Accounts.pm | 3 -- C4/Acquisition.pm | 18 +++----- C4/Auth.pm | 19 ++++---- C4/Auth_with_cas.pm | 5 +-- C4/Auth_with_ldap.pm | 7 ++- C4/Auth_with_shibboleth.pm | 7 ++- C4/AuthoritiesMarc.pm | 5 +-- C4/AuthoritiesMarc/MARC21.pm | 1 - C4/BackgroundJob.pm | 2 +- C4/Barcodes.pm | 4 +- C4/Barcodes/EAN13.pm | 6 +-- C4/Barcodes/annual.pm | 6 +-- C4/Barcodes/hbyymmincr.pm | 6 +-- C4/Biblio.pm | 27 ++++++----- C4/Breeding.pm | 4 +- C4/Budgets.pm | 4 +- C4/Calendar.pm | 4 +- C4/Charset.pm | 10 ++--- C4/Circulation.pm | 45 ++++++++----------- C4/ClassSortRoutine.pm | 1 - C4/ClassSplitRoutine.pm | 1 - C4/ClassSplitRoutine/Dewey.pm | 2 +- C4/ClassSplitRoutine/Generic.pm | 2 +- C4/ClassSplitRoutine/LCC.pm | 2 +- C4/ClassSplitRoutine/RegEx.pm | 1 - C4/Context.pm | 13 +++--- C4/CourseReserves.pm | 2 +- C4/Creators.pm | 18 +++++++- C4/Creators/Batch.pm | 1 - C4/Creators/Layout.pm | 1 - C4/Creators/Lib.pm | 3 +- C4/Creators/PDF.pm | 37 +++++++++++++-- C4/Creators/Profile.pm | 3 +- C4/Creators/Template.pm | 5 +-- C4/External/BakerTaylor.pm | 7 ++- C4/External/OverDrive.pm | 6 +-- C4/External/Syndetics.pm | 9 ++-- C4/Form/MessagingPreferences.pm | 1 - 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 | 12 ++--- 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 | 11 +++-- C4/Languages.pm | 4 +- C4/Letters.pm | 16 +++---- 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 | 2 +- C4/Output.pm | 2 +- C4/Output/JSONStream.pm | 2 +- C4/Overdues.pm | 14 +++--- C4/Patroncards.pm | 11 ++++- C4/Patroncards/Lib.pm | 1 - C4/Patroncards/Patroncard.pm | 10 +++-- C4/Record.pm | 14 +++--- C4/Reports.pm | 1 - C4/Reports/Guided.pm | 9 ++-- C4/Reserves.pm | 16 +++---- C4/Ris.pm | 6 +-- C4/RotatingCollections.pm | 3 +- C4/SIP/ILS.pm | 2 +- C4/SIP/ILS/Item.pm | 12 +++-- C4/SIP/ILS/Patron.pm | 12 ++--- C4/SIP/ILS/Transaction.pm | 4 +- C4/SIP/ILS/Transaction/Checkin.pm | 2 +- C4/SIP/ILS/Transaction/Checkout.pm | 8 ++-- 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 | 4 +- C4/Search.pm | 18 ++++---- C4/Search/History.pm | 7 ++- C4/Search/PazPar2.pm | 6 +-- C4/Serials.pm | 12 ++--- C4/Service.pm | 2 +- C4/SocialData.pm | 2 +- C4/Stats.pm | 4 +- C4/Suggestions.pm | 7 ++- C4/Tags.pm | 6 +-- 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 | 5 +-- 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/Files.pm | 1 - 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 +-- 569 files changed, 986 insertions(+), 1114 deletions(-) --- a/C4/Accounts.pm +++ a/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); --- a/C4/Acquisition.pm +++ a/C4/Acquisition.pm @@ -19,15 +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::Debug; -use C4::Suggestions; -use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal ); -use C4::Contract; -use C4::Debug; -use C4::Log qw(logaction); +use C4::Suggestions qw( GetSuggestionFromBiblionumber ModSuggestion ); +use C4::Biblio qw( GetMarcFromKohaField IsMarcStructureInternal ); +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; @@ -44,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); --- a/C4/Auth.pm +++ a/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); --- a/C4/Auth_with_cas.pm +++ a/C4/Auth_with_cas.pm @@ -20,13 +20,12 @@ package C4::Auth_with_cas; use strict; use warnings; -use C4::Debug; +use C4::Debug qw( $debug ); 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); --- a/C4/Auth_with_ldap.pm +++ a/C4/Auth_with_ldap.pm @@ -18,15 +18,14 @@ package C4::Auth_with_ldap; # along with Koha; if not, see . use Modern::Perl; -use Carp; +use Carp qw( croak ); -use C4::Debug; +use C4::Debug qw( $debug ); 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; --- a/C4/Auth_with_shibboleth.pm +++ a/C4/Auth_with_shibboleth.pm @@ -19,15 +19,14 @@ package C4::Auth_with_shibboleth; use Modern::Perl; -use C4::Debug; +use C4::Debug qw( $debug ); use C4::Context; 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); --- a/C4/AuthoritiesMarc.pm +++ a/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; --- a/C4/AuthoritiesMarc/MARC21.pm +++ a/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 --- a/C4/BackgroundJob.pm +++ a/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 (); --- a/C4/Barcodes.pm +++ a/C4/Barcodes.pm @@ -20,10 +20,10 @@ package C4::Barcodes; use strict; use warnings; -use Carp; +use Carp qw( carp ); use C4::Context; -use C4::Debug; +use C4::Debug qw( $debug ); use C4::Barcodes::hbyymmincr; use C4::Barcodes::annual; use C4::Barcodes::incremental; --- a/C4/Barcodes/EAN13.pm +++ a/C4/Barcodes/EAN13.pm @@ -21,10 +21,10 @@ use strict; use warnings; use C4::Context; -use C4::Debug; +use C4::Debug qw( $debug ); -use Algorithm::CheckDigits; -use Carp; +use Algorithm::CheckDigits qw( CheckDigits ); +use Carp qw( carp ); use vars qw(@ISA); use vars qw($debug $cgi_debug); # from C4::Debug, of course --- a/C4/Barcodes/annual.pm +++ a/C4/Barcodes/annual.pm @@ -20,12 +20,12 @@ package C4::Barcodes::annual; use strict; use warnings; -use Carp; +use Carp qw( carp ); use C4::Context; -use C4::Debug; +use C4::Debug qw( $debug ); -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($debug $cgi_debug); # from C4::Debug, of course --- a/C4/Barcodes/hbyymmincr.pm +++ a/C4/Barcodes/hbyymmincr.pm @@ -19,10 +19,10 @@ package C4::Barcodes::hbyymmincr; use Modern::Perl; -use Carp; +use Carp qw( carp ); use C4::Context; -use C4::Debug; +use C4::Debug qw( $debug ); use Koha::DateUtils qw( dt_from_string output_pref ); @@ -128,7 +128,7 @@ sub new_object { warn "HBYYMM Barcode created with no branchcode, default is blank" if ( $self->branch() eq '' ); # take the branch from argument, or existing object, or default - use Data::Dumper; + use Data::Dumper qw( Dumper ); $debug and print STDERR "(hbyymmincr) new_object: ", Dumper($self), "\n"; return $self; --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -76,26 +76,31 @@ 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::Debug; -use C4::Items qw( GetHiddenItemnumbers GetMarcItem ); +use C4::OAI::Sets (); +use C4::Debug qw( $debug ); +use C4::Items (); use Koha::Caches; use Koha::Authority::Types; --- a/C4/Breeding.pm +++ a/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; --- a/C4/Budgets.pm +++ a/C4/Budgets.pm @@ -22,8 +22,8 @@ use C4::Context; use Koha::Database; use Koha::Patrons; use Koha::Acquisition::Invoice::Adjustments; -use C4::Debug; -use C4::Acquisition; +use C4::Debug qw( $debug ); +use C4::Acquisition (); use vars qw(@ISA @EXPORT); BEGIN { --- a/C4/Calendar.pm +++ a/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; --- a/C4/Charset.pm +++ a/C4/Charset.pm @@ -20,11 +20,11 @@ package C4::Charset; use strict; use warnings; -use MARC::Charset qw/marc8_to_utf8/; -use Text::Iconv; -use C4::Debug; -use Unicode::Normalize; -use Encode qw( decode encode is_utf8 ); +use MARC::Charset (); +use Text::Iconv (); +use C4::Debug qw( $debug ); +use Unicode::Normalize qw( NFC NFD ); +use Encode (); our (@ISA, @EXPORT_OK); BEGIN { --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -21,36 +21,36 @@ 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::Debug; -use C4::Log; # logaction -use C4::Overdues qw( UpdateFine get_chargeable_units CalcFine ); +use C4::Debug qw( $debug ); +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; @@ -63,19 +63,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 { --- a/C4/ClassSortRoutine.pm +++ a/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); --- a/C4/ClassSplitRoutine.pm +++ a/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); --- a/C4/ClassSplitRoutine/Dewey.pm +++ a/C4/ClassSplitRoutine/Dewey.pm @@ -19,7 +19,7 @@ package C4::ClassSplitRoutine::Dewey; use Modern::Perl; -use C4::Debug; +use C4::Debug qw( $debug ); =head1 NAME --- a/C4/ClassSplitRoutine/Generic.pm +++ a/C4/ClassSplitRoutine/Generic.pm @@ -19,7 +19,7 @@ package C4::ClassSplitRoutine::Generic; use Modern::Perl; -use C4::Debug; +use C4::Debug qw( $debug ); =head1 NAME --- a/C4/ClassSplitRoutine/LCC.pm +++ a/C4/ClassSplitRoutine/LCC.pm @@ -20,7 +20,7 @@ package C4::ClassSplitRoutine::LCC; use Modern::Perl; use Library::CallNumber::LC; -use C4::Debug; +use C4::Debug qw( $debug ); =head1 NAME --- a/C4/ClassSplitRoutine/RegEx.pm +++ a/C4/ClassSplitRoutine/RegEx.pm @@ -19,7 +19,6 @@ package C4::ClassSplitRoutine::RegEx; use Modern::Perl; -use C4::Debug; =head1 NAME --- a/C4/Context.pm +++ a/C4/Context.pm @@ -35,16 +35,15 @@ 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 C4::Debug; +use C4::Debug qw( $debug ); use Koha::Caches; use Koha::Config::SysPref; use Koha::Config::SysPrefs; --- a/C4/CourseReserves.pm +++ a/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 ); --- a/C4/Creators.pm +++ a/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; } --- a/C4/Creators/Batch.pm +++ a/C4/Creators/Batch.pm @@ -6,7 +6,6 @@ use warnings; use autouse 'Data::Dumper' => qw(Dumper); use C4::Context; -use C4::Debug; sub _check_params { --- a/C4/Creators/Layout.pm +++ a/C4/Creators/Layout.pm @@ -6,7 +6,6 @@ use warnings; use autouse 'Data::Dumper' => qw(Dumper); use C4::Context; -use C4::Debug; use C4::Creators::PDF; --- a/C4/Creators/Lib.pm +++ a/C4/Creators/Lib.pm @@ -18,12 +18,11 @@ 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); use C4::Context; -use C4::Debug; BEGIN { use base qw(Exporter); --- a/C4/Creators/PDF.pm +++ a/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 { --- a/C4/Creators/Profile.pm +++ a/C4/Creators/Profile.pm @@ -6,8 +6,7 @@ use warnings; use autouse 'Data::Dumper' => qw(Dumper); use C4::Context; -use C4::Debug; -use C4::Creators::Lib qw(get_unit_values); +use C4::Creators::Lib qw( get_unit_values ); sub _check_params { --- a/C4/Creators/Template.pm +++ a/C4/Creators/Template.pm @@ -2,13 +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::Debug; use C4::Creators::Profile; -use C4::Creators::Lib qw(get_unit_values); +use C4::Creators::Lib qw( get_unit_values ); sub _check_params { --- a/C4/External/BakerTaylor.pm +++ a/C4/External/BakerTaylor.pm @@ -18,12 +18,11 @@ 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; -use C4::Debug; +use C4::Debug qw( $debug ); use Modern::Perl; --- a/C4/External/OverDrive.pm +++ a/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; --- a/C4/External/Syndetics.pm +++ a/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; --- a/C4/Form/MessagingPreferences.pm +++ a/C4/Form/MessagingPreferences.pm @@ -23,7 +23,6 @@ use warnings; use CGI qw ( -utf8 ); use C4::Context; use C4::Members::Messaging; -use C4::Debug; use constant MAX_DAYS_IN_ADVANCE => 30; --- a/C4/Heading.pm +++ a/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 --- a/C4/Heading/MARC21.pm +++ a/C4/Heading/MARC21.pm @@ -19,7 +19,6 @@ package C4::Heading::MARC21; use strict; use warnings; -use MARC::Record; use MARC::Field; --- a/C4/Heading/UNIMARC.pm +++ a/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; --- a/C4/HoldsQueue.pm +++ a/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 { --- a/C4/ILSDI/Services.pm +++ a/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; --- a/C4/ImportBatch.pm +++ a/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; --- a/C4/ImportExportFramework.pm +++ a/C4/ImportExportFramework.pm @@ -19,15 +19,15 @@ 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 C4::Debug; +use C4::Debug qw( $debug ); our (@ISA, @EXPORT_OK); --- a/C4/InstallAuth.pm +++ a/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 { --- a/C4/Installer.pm +++ a/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); --- a/C4/Installer/PerlModules.pm +++ a/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 { --- a/C4/Installer/UpgradeBackup.pm +++ a/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 ); --- a/C4/ItemCirculationAlertPreference.pm +++ a/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; --- a/C4/Items.pm +++ a/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; --- a/C4/Koha.pm +++ a/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 { --- a/C4/Labels/Label.pm +++ a/C4/Labels/Label.pm @@ -3,15 +3,14 @@ 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; -use C4::Debug; -use C4::Biblio qw( GetAuthorisedValueDesc GetMarcFromKohaField GetMarcBiblio ); +use C4::Debug qw( $debug ); +use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ); use Koha::ClassSources; use Koha::ClassSortRules; use Koha::ClassSplitRules; --- a/C4/Languages.pm +++ a/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; --- a/C4/Letters.pm +++ a/C4/Letters.pm @@ -20,26 +20,24 @@ 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 C4::Debug; -use Koha::DateUtils; +use C4::Debug qw( $debug ); +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; --- a/C4/Linker.pm +++ a/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); --- a/C4/Linker/Default.pm +++ a/C4/Linker/Default.pm @@ -19,7 +19,6 @@ package C4::Linker::Default; use strict; use warnings; -use Carp; use MARC::Field; use C4::Heading; --- a/C4/Linker/FirstMatch.pm +++ a/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 --- a/C4/Linker/LastMatch.pm +++ a/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 --- a/C4/Log.pm +++ a/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); --- a/C4/MarcModificationTemplates.pm +++ a/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); --- a/C4/Matcher.pm +++ a/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 --- a/C4/Members.pm +++ a/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; --- a/C4/Message.pm +++ a/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 --- a/C4/NewsChannels.pm +++ a/C4/NewsChannels.pm @@ -20,7 +20,7 @@ package C4::NewsChannels; use Modern::Perl; use C4::Context; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use vars qw(@ISA @EXPORT); --- a/C4/Output.pm +++ a/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 ); --- a/C4/Output/JSONStream.pm +++ a/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; --- a/C4/Overdues.pm +++ a/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 C4::Debug; -use Koha::DateUtils; +use C4::Debug qw( $debug ); use Koha::Account::Lines; use Koha::Account::Offsets; use Koha::Libraries; --- a/C4/Patroncards.pm +++ a/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; --- a/C4/Patroncards/Lib.pm +++ a/C4/Patroncards/Lib.pm @@ -23,7 +23,6 @@ use warnings; use autouse 'Data::Dumper' => qw(Dumper); use C4::Context; -use C4::Debug; BEGIN { use base qw(Exporter); --- a/C4/Patroncards/Patroncard.pm +++ a/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 --- a/C4/Record.pm +++ a/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); --- a/C4/Reports.pm +++ a/C4/Reports.pm @@ -21,7 +21,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; -use C4::Debug; our (@ISA, @EXPORT_OK); BEGIN { --- a/C4/Reports/Guided.pm +++ a/C4/Reports/Guided.pm @@ -19,20 +19,19 @@ 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::Debug; -use C4::Log; +use C4::Debug qw( $debug ); +use C4::Log qw( logaction ); use Koha::Notice::Templates; -use C4::Letters; use Koha::AuthorisedValues; use Koha::Patron::Categories; --- a/C4/Reserves.pm +++ a/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 --- a/C4/Ris.pm +++ a/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 ); --- a/C4/RotatingCollections.pm +++ a/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); --- a/C4/SIP/ILS.pm +++ a/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; --- a/C4/SIP/ILS/Item.pm +++ a/C4/SIP/ILS/Item.pm @@ -9,25 +9,23 @@ 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::Debug; -use C4::Items; +use C4::Debug qw( $debug ); 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; --- a/C4/SIP/ILS/Patron.pm +++ a/C4/SIP/ILS/Patron.pm @@ -10,19 +10,19 @@ 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::Debug; +use C4::Debug qw( $debug ); 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; --- a/C4/SIP/ILS/Transaction.pm +++ a/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 = ( --- a/C4/SIP/ILS/Transaction/Checkin.pm +++ a/C4/SIP/ILS/Transaction/Checkin.pm @@ -12,7 +12,7 @@ use strict; use C4::SIP::ILS::Transaction; use C4::Circulation; -use C4::Debug; +use C4::Debug qw( $debug ); use C4::Items qw( ModItemTransfer ); use C4::Reserves qw( ModReserveAffect ); use Koha::DateUtils qw( dt_from_string ); --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ a/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,8 +17,7 @@ use C4::Context; use C4::Circulation; use C4::Members; use C4::Reserves qw(ModReserveFill); -use C4::Debug; -use Koha::DateUtils; +use C4::Debug qw( $debug ); use parent qw(C4::SIP::ILS::Transaction); --- a/C4/SIP/ILS/Transaction/Renew.pm +++ a/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); --- a/C4/SIP/ILS/Transaction/RenewAll.pm +++ a/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; --- a/C4/SIP/SIPServer.pm +++ a/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; --- a/C4/SIP/Sip.pm +++ a/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); --- a/C4/SIP/Sip/Configuration.pm +++ a/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 => { --- a/C4/SIP/Sip/MsgType.pm +++ a/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); --- a/C4/SIP/t/SIPtest.pm +++ a/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); --- a/C4/SMS.pm +++ a/C4/SMS.pm @@ -54,7 +54,7 @@ use strict; use warnings; use C4::Context; -use File::Spec; +use File::Spec (); --- a/C4/Scrubber.pm +++ a/C4/Scrubber.pm @@ -21,11 +21,11 @@ package C4::Scrubber; use strict; use warnings; -use Carp; +use Carp qw( carp croak ); use HTML::Scrubber; use C4::Context; -use C4::Debug; +use C4::Debug qw( $debug ); --- a/C4/Search.pm +++ a/C4/Search.pm @@ -17,24 +17,26 @@ 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::Debug; use C4::Charset qw( SetUTF8Flag ); use Koha::AuthorisedValues; use Koha::ItemTypes; use Koha::Libraries; 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; use vars qw($DEBUG); --- a/C4/Search/History.pm +++ a/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) = @_; --- a/C4/Search/PazPar2.pm +++ a/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 --- a/C4/Serials.pm +++ a/C4/Serials.pm @@ -24,14 +24,14 @@ 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::Debug; -use C4::Serials::Frequency; -use C4::Serials::Numberpattern; +use C4::Log qw( logaction ); # logaction +use C4::Debug qw( $debug ); +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; --- a/C4/Service.pm +++ a/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; --- a/C4/SocialData.pm +++ a/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 --- a/C4/Stats.pm +++ a/C4/Stats.pm @@ -20,9 +20,9 @@ package C4::Stats; use Modern::Perl; require Exporter; -use Carp; +use Carp qw( croak ); use C4::Context; -use C4::Debug; +use C4::Debug qw( $debug ); use Koha::DateUtils qw( dt_from_string ); use Koha::Statistics; --- a/C4/Suggestions.pm +++ a/C4/Suggestions.pm @@ -23,13 +23,12 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output; -use C4::Debug; -use C4::Letters qw( GetPreparedLetter EnqueueLetter ); +use C4::Debug qw( $debug ); +use C4::Letters (); 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( --- a/C4/Tags.pm +++ a/C4/Tags.pm @@ -20,12 +20,12 @@ package C4::Tags; use strict; use warnings; -use Carp; +use Carp qw( carp ); use Exporter; use C4::Context; -use C4::Debug; -use Module::Load::Conditional qw/check_install/; +use C4::Debug qw( $debug ); +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"; --- a/C4/Templates.pm +++ a/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; --- a/C4/TmplToken.pm +++ a/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 --- a/C4/UsageStats.pm +++ a/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; --- a/C4/Utils/DataTables/Members.pm +++ a/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 ) = @_; --- a/C4/Utils/DataTables/TablesSettings.pm +++ a/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; --- a/C4/Utils/DataTables/VirtualShelves.pm +++ a/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 { --- a/C4/XISBN.pm +++ a/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; --- a/C4/XSLT.pm +++ a/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); --- a/Koha/Account.pm +++ a/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; --- a/Koha/Account/CreditType.pm +++ a/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; --- a/Koha/Account/CreditTypes.pm +++ a/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; --- a/Koha/Account/DebitType.pm +++ a/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; --- a/Koha/Account/DebitTypes.pm +++ a/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; --- a/Koha/Account/Line.pm +++ a/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; --- a/Koha/Account/Lines.pm +++ a/Koha/Account/Lines.pm @@ -17,7 +17,6 @@ package Koha::Account::Lines; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Account::Line; --- a/Koha/Account/Offset.pm +++ a/Koha/Account/Offset.pm @@ -17,7 +17,6 @@ package Koha::Account::Offset; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Account::Lines; --- a/Koha/Account/Offsets.pm +++ a/Koha/Account/Offsets.pm @@ -17,7 +17,6 @@ package Koha::Account::Offsets; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Acquisition/Basket.pm +++ a/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 ); --- a/Koha/Acquisition/Bookseller/Contact.pm +++ a/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'; --- a/Koha/Acquisition/Bookseller/Contacts.pm +++ a/Koha/Acquisition/Bookseller/Contacts.pm @@ -2,7 +2,6 @@ package Koha::Acquisition::Bookseller::Contacts; use Modern::Perl; -use Carp; use base qw( Koha::Objects ); --- a/Koha/Acquisition/Currencies.pm +++ a/Koha/Acquisition/Currencies.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Currencies; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Acquisition/Currency.pm +++ a/Koha/Acquisition/Currency.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Currency; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Acquisition/Invoice/Adjustment.pm +++ a/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; --- a/Koha/Acquisition/Invoice/Adjustments.pm +++ a/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; --- a/Koha/Acquisition/Order.pm +++ a/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; --- a/Koha/Acquisition/Order/Claim.pm +++ a/Koha/Acquisition/Order/Claim.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Order::Claim; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Acquisition/Order/Claims.pm +++ a/Koha/Acquisition/Order/Claims.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Order::Claims; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Acquisition/Orders.pm +++ a/Koha/Acquisition/Orders.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Orders; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/AdvancedEditorMacro.pm +++ a/Koha/AdvancedEditorMacro.pm @@ -16,7 +16,6 @@ package Koha::AdvancedEditorMacro; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/AdvancedEditorMacros.pm +++ a/Koha/AdvancedEditorMacros.pm @@ -16,7 +16,6 @@ package Koha::AdvancedEditorMacros; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ApiKey.pm +++ a/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); --- a/Koha/ApiKeys.pm +++ a/Koha/ApiKeys.pm @@ -19,7 +19,6 @@ package Koha::ApiKeys; use Modern::Perl; -use Carp; use Koha::Database; use Koha::ApiKey; --- a/Koha/App/Plugin/CGIBinKoha.pm +++ a/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; --- a/Koha/ArticleRequest.pm +++ a/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); --- a/Koha/ArticleRequests.pm +++ a/Koha/ArticleRequests.pm @@ -19,7 +19,6 @@ package Koha::ArticleRequests; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/AudioAlert.pm +++ a/Koha/AudioAlert.pm @@ -19,7 +19,6 @@ package Koha::AudioAlert; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/AudioAlerts.pm +++ a/Koha/AudioAlerts.pm @@ -19,7 +19,6 @@ package Koha::AudioAlerts; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/AuthUtils.pm +++ a/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; --- a/Koha/AuthorisedValue.pm +++ a/Koha/AuthorisedValue.pm @@ -19,7 +19,6 @@ package Koha::AuthorisedValue; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/AuthorisedValueCategories.pm +++ a/Koha/AuthorisedValueCategories.pm @@ -17,7 +17,6 @@ package Koha::AuthorisedValueCategories; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; --- a/Koha/AuthorisedValueCategory.pm +++ a/Koha/AuthorisedValueCategory.pm @@ -17,7 +17,6 @@ package Koha::AuthorisedValueCategory; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; --- a/Koha/AuthorisedValues.pm +++ a/Koha/AuthorisedValues.pm @@ -19,7 +19,6 @@ package Koha::AuthorisedValues; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Authorities.pm +++ a/Koha/Authorities.pm @@ -19,7 +19,6 @@ package Koha::Authorities; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Authority/MergeRequests.pm +++ a/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); --- a/Koha/Authority/Type.pm +++ a/Koha/Authority/Type.pm @@ -17,7 +17,6 @@ package Koha::Authority::Type; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Authority/Types.pm +++ a/Koha/Authority/Types.pm @@ -17,7 +17,6 @@ package Koha::Authority::Types; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/BackgroundJob.pm +++ a/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 ); --- a/Koha/BackgroundJob/BatchUpdateAuthority.pm +++ a/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 ); --- a/Koha/BackgroundJob/BatchUpdateBiblio.pm +++ a/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'; --- a/Koha/Biblio.pm +++ a/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 ); --- a/Koha/Biblio/Metadata.pm +++ a/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; --- a/Koha/Biblio/Metadatas.pm +++ a/Koha/Biblio/Metadatas.pm @@ -17,7 +17,6 @@ package Koha::Biblio::Metadatas; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/BiblioFramework.pm +++ a/Koha/BiblioFramework.pm @@ -17,7 +17,6 @@ package Koha::BiblioFramework; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/BiblioFrameworks.pm +++ a/Koha/BiblioFrameworks.pm @@ -17,7 +17,6 @@ package Koha::BiblioFrameworks; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/BiblioUtils.pm +++ a/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); --- a/Koha/BiblioUtils/Iterator.pm +++ a/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; --- a/Koha/Biblioitem.pm +++ a/Koha/Biblioitem.pm @@ -17,7 +17,6 @@ package Koha::Biblioitem; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Biblioitems.pm +++ a/Koha/Biblioitems.pm @@ -17,7 +17,6 @@ package Koha::Biblioitems; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Biblios.pm +++ a/Koha/Biblios.pm @@ -19,7 +19,6 @@ package Koha::Biblios; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Cache.pm +++ a/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; --- a/Koha/Cache/Object.pm +++ a/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); --- a/Koha/Calendar.pm +++ a/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; --- a/Koha/Cash/Register.pm +++ a/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; --- a/Koha/Cash/Register/Action.pm +++ a/Koha/Cash/Register/Action.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Action; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Cash/Register/Actions.pm +++ a/Koha/Cash/Register/Actions.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Actions; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Cash/Register/Cashup.pm +++ a/Koha/Cash/Register/Cashup.pm @@ -17,7 +17,6 @@ package Koha::Cash::Register::Cashup; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Cash/Register/Cashups.pm +++ a/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; --- a/Koha/Cash/Registers.pm +++ a/Koha/Cash/Registers.pm @@ -17,7 +17,6 @@ package Koha::Cash::Registers; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Charges/Fees.pm +++ a/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 ); --- a/Koha/Checkout.pm +++ a/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; --- a/Koha/Checkouts.pm +++ a/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); --- a/Koha/Checkouts/ReturnClaims.pm +++ a/Koha/Checkouts/ReturnClaims.pm @@ -19,7 +19,6 @@ package Koha::Checkouts::ReturnClaims; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/CirculationRules.pm +++ a/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; --- a/Koha/Cities.pm +++ a/Koha/Cities.pm @@ -17,7 +17,6 @@ package Koha::Cities; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/City.pm +++ a/Koha/City.pm @@ -17,7 +17,6 @@ package Koha::City; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ClassSortRule.pm +++ a/Koha/ClassSortRule.pm @@ -17,7 +17,6 @@ package Koha::ClassSortRule; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ClassSortRules.pm +++ a/Koha/ClassSortRules.pm @@ -17,7 +17,6 @@ package Koha::ClassSortRules; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ClassSource.pm +++ a/Koha/ClassSource.pm @@ -17,7 +17,6 @@ package Koha::ClassSource; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ClassSources.pm +++ a/Koha/ClassSources.pm @@ -17,7 +17,6 @@ package Koha::ClassSources; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ClassSplitRule.pm +++ a/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; --- a/Koha/Club.pm +++ a/Koha/Club.pm @@ -19,7 +19,6 @@ package Koha::Club; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Enrollment.pm +++ a/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); --- a/Koha/Club/Enrollment/Field.pm +++ a/Koha/Club/Enrollment/Field.pm @@ -19,7 +19,6 @@ package Koha::Club::Enrollment::Field; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Enrollment/Fields.pm +++ a/Koha/Club/Enrollment/Fields.pm @@ -19,7 +19,6 @@ package Koha::Club::Enrollment::Fields; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Enrollments.pm +++ a/Koha/Club/Enrollments.pm @@ -19,7 +19,6 @@ package Koha::Club::Enrollments; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Field.pm +++ a/Koha/Club/Field.pm @@ -19,7 +19,6 @@ package Koha::Club::Field; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Fields.pm +++ a/Koha/Club/Fields.pm @@ -19,7 +19,6 @@ package Koha::Club::Fields; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Hold.pm +++ a/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 --- a/Koha/Club/Hold/PatronHold.pm +++ a/Koha/Club/Hold/PatronHold.pm @@ -19,7 +19,6 @@ package Koha::Club::Hold::PatronHold; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Hold/PatronHolds.pm +++ a/Koha/Club/Hold/PatronHolds.pm @@ -19,7 +19,6 @@ package Koha::Club::Hold::PatronHolds; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Holds.pm +++ a/Koha/Club/Holds.pm @@ -19,7 +19,6 @@ package Koha::Club::Holds; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Template.pm +++ a/Koha/Club/Template.pm @@ -19,7 +19,6 @@ package Koha::Club::Template; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Template/EnrollmentField.pm +++ a/Koha/Club/Template/EnrollmentField.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::EnrollmentField; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Template/EnrollmentFields.pm +++ a/Koha/Club/Template/EnrollmentFields.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::EnrollmentFields; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Template/Field.pm +++ a/Koha/Club/Template/Field.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::Field; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Template/Fields.pm +++ a/Koha/Club/Template/Fields.pm @@ -19,7 +19,6 @@ package Koha::Club::Template::Fields; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Club/Templates.pm +++ a/Koha/Club/Templates.pm @@ -19,7 +19,6 @@ package Koha::Club::Templates; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Clubs.pm +++ a/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 ); --- a/Koha/Config/SysPref.pm +++ a/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); --- a/Koha/Config/SysPrefs.pm +++ a/Koha/Config/SysPrefs.pm @@ -19,7 +19,6 @@ package Koha::Config::SysPrefs; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Course.pm +++ a/Koha/Course.pm @@ -17,7 +17,6 @@ package Koha::Course; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Course/Instructor.pm +++ a/Koha/Course/Instructor.pm @@ -17,7 +17,6 @@ package Koha::Course::Instructor; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Course/Instructors.pm +++ a/Koha/Course/Instructors.pm @@ -17,7 +17,6 @@ package Koha::Course::Instructors; use Modern::Perl; -use Carp; use Koha::Course::Instructor; --- a/Koha/Course/Item.pm +++ a/Koha/Course/Item.pm @@ -17,7 +17,6 @@ package Koha::Course::Item; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Course/Items.pm +++ a/Koha/Course/Items.pm @@ -17,7 +17,6 @@ package Koha::Course::Items; use Modern::Perl; -use Carp; use Koha::Course::Item; --- a/Koha/Course/Reserve.pm +++ a/Koha/Course/Reserve.pm @@ -17,7 +17,6 @@ package Koha::Course::Reserve; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Course/Reserves.pm +++ a/Koha/Course/Reserves.pm @@ -17,7 +17,6 @@ package Koha::Course::Reserves; use Modern::Perl; -use Carp; use Koha::Course::Reserve; --- a/Koha/Courses.pm +++ a/Koha/Courses.pm @@ -17,7 +17,6 @@ package Koha::Courses; use Modern::Perl; -use Carp; use Koha::Course; --- a/Koha/CoverImage.pm +++ a/Koha/CoverImage.pm @@ -17,8 +17,7 @@ package Koha::CoverImage; use Modern::Perl; -use Carp; -use GD; +use GD (); use Koha::Database; --- a/Koha/CoverImages.pm +++ a/Koha/CoverImages.pm @@ -17,7 +17,6 @@ package Koha::CoverImages; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/CsvProfile.pm +++ a/Koha/CsvProfile.pm @@ -17,7 +17,6 @@ package Koha::CsvProfile; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/CsvProfiles.pm +++ a/Koha/CsvProfiles.pm @@ -17,7 +17,6 @@ package Koha::CsvProfiles; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Database.pm +++ a/Koha/Database.pm @@ -33,7 +33,6 @@ Koha::Database =cut use Modern::Perl; -use Carp; use C4::Context; use base qw(Class::Accessor); --- a/Koha/Desk.pm +++ a/Koha/Desk.pm @@ -18,7 +18,6 @@ package Koha::Desk; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Desks.pm +++ a/Koha/Desks.pm @@ -19,7 +19,6 @@ package Koha::Desks; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/EDI.pm +++ a/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; --- a/Koha/Edifact.pm +++ a/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; --- a/Koha/Edifact/Line.pm +++ a/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 ) = @_; --- a/Koha/Edifact/Order.pm +++ a/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; --- a/Koha/Edifact/Transport.pm +++ a/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 { --- a/Koha/Email.pm +++ a/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; --- a/Koha/Exporter/Record.pm +++ a/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) = @_; --- a/Koha/ExternalContent.pm +++ a/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)); --- a/Koha/ExternalContent/OverDrive.pm +++ a/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; --- a/Koha/ExternalContent/RecordedBooks.pm +++ a/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; --- a/Koha/Filter/MARC/EmbedItems.pm +++ a/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'; --- a/Koha/Filter/MARC/EmbedItemsAvailability.pm +++ a/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); --- a/Koha/Filter/MARC/EmbedSeeFromHeadings.pm +++ a/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'; --- a/Koha/Filter/MARC/Null.pm +++ a/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'; --- a/Koha/Filter/MARC/ViewPolicy.pm +++ a/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); --- a/Koha/Hold.pm +++ a/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; --- a/Koha/Holds.pm +++ a/Koha/Holds.pm @@ -19,7 +19,6 @@ package Koha::Holds; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/I18N.pm +++ a/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'; --- a/Koha/Illrequest.pm +++ a/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; --- a/Koha/Illrequest/Availability.pm +++ a/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 ); --- a/Koha/Illrequest/Config.pm +++ a/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; --- a/Koha/Illrequest/Logger.pm +++ a/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; --- a/Koha/Indexer/Utils.pm +++ a/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 --- a/Koha/Item.pm +++ a/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 ); --- a/Koha/Item/Transfer.pm +++ a/Koha/Item/Transfer.pm @@ -17,13 +17,12 @@ package Koha::Item::Transfer; use Modern::Perl; -use Carp; -use Try::Tiny; +use Try::Tiny qw( try ); 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); --- a/Koha/Item/Transfer/Limit.pm +++ a/Koha/Item/Transfer/Limit.pm @@ -18,7 +18,6 @@ package Koha::Item::Transfer::Limit; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Item/Transfers.pm +++ a/Koha/Item/Transfers.pm @@ -17,7 +17,6 @@ package Koha::Item::Transfers; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/ItemType.pm +++ a/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; --- a/Koha/ItemTypes.pm +++ a/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; --- a/Koha/Items.pm +++ a/Koha/Items.pm @@ -19,7 +19,6 @@ package Koha::Items; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/KeyboardShortcut.pm +++ a/Koha/KeyboardShortcut.pm @@ -17,7 +17,6 @@ package Koha::KeyboardShortcut; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/KeyboardShortcuts.pm +++ a/Koha/KeyboardShortcuts.pm @@ -17,7 +17,6 @@ package Koha::KeyboardShortcuts; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Libraries.pm +++ a/Koha/Libraries.pm @@ -19,7 +19,6 @@ package Koha::Libraries; use Modern::Perl; -use Carp; use C4::Context; --- a/Koha/Library.pm +++ a/Koha/Library.pm @@ -19,7 +19,6 @@ package Koha::Library; use Modern::Perl; -use Carp; use C4::Context; --- a/Koha/Library/Group.pm +++ a/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); --- a/Koha/Library/Groups.pm +++ a/Koha/Library/Groups.pm @@ -19,7 +19,6 @@ package Koha::Library::Groups; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Library/OverDriveInfo.pm +++ a/Koha/Library/OverDriveInfo.pm @@ -17,7 +17,6 @@ package Koha::Library::OverDriveInfo; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Library/OverDriveInfos.pm +++ a/Koha/Library/OverDriveInfos.pm @@ -17,7 +17,6 @@ package Koha::Library::OverDriveInfos; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Linktracker.pm +++ a/Koha/Linktracker.pm @@ -32,7 +32,6 @@ Koha::Linktracker =cut use Modern::Perl; -use Carp; use C4::Context; use base qw(Class::Accessor); --- a/Koha/List/Patron.pm +++ a/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; --- a/Koha/Logger.pm +++ a/Koha/Logger.pm @@ -37,7 +37,6 @@ Koha::Logger use Modern::Perl; use Log::Log4perl; -use Carp; use C4::Context; --- a/Koha/MarcSubfieldStructure.pm +++ a/Koha/MarcSubfieldStructure.pm @@ -17,7 +17,6 @@ package Koha::MarcSubfieldStructure; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/MarcSubfieldStructures.pm +++ a/Koha/MarcSubfieldStructures.pm @@ -17,7 +17,6 @@ package Koha::MarcSubfieldStructures; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/MessageAttribute.pm +++ a/Koha/MessageAttribute.pm @@ -19,7 +19,6 @@ package Koha::MessageAttribute; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/MessageAttributes.pm +++ a/Koha/MessageAttributes.pm @@ -19,7 +19,6 @@ package Koha::MessageAttributes; use Modern::Perl; -use Carp; use base qw(Koha::Objects); use Koha::MessageAttribute; --- a/Koha/MetaSearcher.pm +++ a/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'; --- a/Koha/MetadataRecord.pm +++ a/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); --- a/Koha/MetadataRecord/Authority.pm +++ a/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; --- a/Koha/Middleware/RealIP.pm +++ a/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 --- a/Koha/News.pm +++ a/Koha/News.pm @@ -19,7 +19,6 @@ package Koha::News; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/NewsItem.pm +++ a/Koha/NewsItem.pm @@ -19,7 +19,6 @@ package Koha::NewsItem; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Patrons; --- a/Koha/Notice/Message.pm +++ a/Koha/Notice/Message.pm @@ -17,7 +17,6 @@ package Koha::Notice::Message; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Notice/Messages.pm +++ a/Koha/Notice/Messages.pm @@ -17,7 +17,6 @@ package Koha::Notice::Messages; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Notice/Template.pm +++ a/Koha/Notice/Template.pm @@ -17,7 +17,6 @@ package Koha::Notice::Template; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Notice/Templates.pm +++ a/Koha/Notice/Templates.pm @@ -17,7 +17,6 @@ package Koha::Notice::Templates; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Number/Price.pm +++ a/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; --- a/Koha/OAI/Server/GetRecord.pm +++ a/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"); --- a/Koha/OAI/Server/ListBase.pm +++ a/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 { --- a/Koha/OAI/Server/ListSets.pm +++ a/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"); --- a/Koha/OAI/Server/Record.pm +++ a/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"); --- a/Koha/OAI/Server/Repository.pm +++ a/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 --- a/Koha/Object.pm +++ a/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 --- a/Koha/Object/Limit/Library.pm +++ a/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 --- a/Koha/Objects.pm +++ a/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; --- a/Koha/Old/Holds.pm +++ a/Koha/Old/Holds.pm @@ -19,7 +19,6 @@ package Koha::Old::Holds; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Patron.pm +++ a/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; --- a/Koha/Patron/Category.pm +++ a/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); --- a/Koha/Patron/Discharge.pm +++ a/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) = @_; --- a/Koha/Patron/Files.pm +++ a/Koha/Patron/Files.pm @@ -22,7 +22,6 @@ use Modern::Perl; use C4::Context; use C4::Output; -use C4::Debug; =head1 NAME --- a/Koha/Patron/Image.pm +++ a/Koha/Patron/Image.pm @@ -17,7 +17,6 @@ package Koha::Patron::Image; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Patron/Images.pm +++ a/Koha/Patron/Images.pm @@ -17,7 +17,6 @@ package Koha::Patron::Images; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Patron/Message.pm +++ a/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; --- a/Koha/Patron/Messages.pm +++ a/Koha/Patron/Messages.pm @@ -17,7 +17,6 @@ package Koha::Patron::Messages; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Patron/Modification.pm +++ a/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); --- a/Koha/Patron/Modifications.pm +++ a/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); --- a/Koha/Patron/Password/Recovery.pm +++ a/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 { --- a/Koha/Patron/Relationship.pm +++ a/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; --- a/Koha/Patron/Relationships.pm +++ a/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; --- a/Koha/Patrons.pm +++ a/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); --- a/Koha/Patrons/Import.pm +++ a/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 --- a/Koha/Plugins.pm +++ a/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; --- a/Koha/Plugins/Base.pm +++ a/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}; --- a/Koha/Plugins/Handler.pm +++ a/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; --- a/Koha/Plugins/Method.pm +++ a/Koha/Plugins/Method.pm @@ -17,7 +17,6 @@ package Koha::Plugins::Method; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Plugins/Methods.pm +++ a/Koha/Plugins/Methods.pm @@ -17,7 +17,6 @@ package Koha::Plugins::Methods; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/PseudonymizedTransaction.pm +++ a/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; --- a/Koha/PseudonymizedTransactions.pm +++ a/Koha/PseudonymizedTransactions.pm @@ -16,7 +16,6 @@ package Koha::PseudonymizedTransactions; use Modern::Perl; -use Carp; use Koha::Database; use Koha::PseudonymizedTransaction; --- a/Koha/Quote.pm +++ a/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; --- a/Koha/Quotes.pm +++ a/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); --- a/Koha/RDF.pm +++ a/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; --- a/Koha/REST/Plugin/Objects.pm +++ a/Koha/REST/Plugin/Objects.pm @@ -19,7 +19,7 @@ use Modern::Perl; use Mojo::Base 'Mojolicious::Plugin'; -use JSON; +use JSON (); =head1 NAME --- a/Koha/REST/Plugin/PluginRoutes.pm +++ a/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 --- a/Koha/REST/Plugin/Query.pm +++ a/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; --- a/Koha/REST/V1.pm +++ a/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 --- a/Koha/REST/V1/Acquisitions/Funds.pm +++ a/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 --- a/Koha/REST/V1/Acquisitions/Orders.pm +++ a/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 --- a/Koha/REST/V1/Acquisitions/Vendors.pm +++ a/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 --- a/Koha/REST/V1/AdvancedEditorMacro.pm +++ a/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 --- a/Koha/REST/V1/Auth.pm +++ a/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 --- a/Koha/REST/V1/Biblios.pm +++ a/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 --- a/Koha/REST/V1/CashRegisters/Cashups.pm +++ a/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; --- a/Koha/REST/V1/Checkouts.pm +++ a/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 --- a/Koha/REST/V1/CirculationRules.pm +++ a/Koha/REST/V1/CirculationRules.pm @@ -21,7 +21,6 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::CirculationRules; -use Try::Tiny; =head1 API --- a/Koha/REST/V1/Cities.pm +++ a/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 --- a/Koha/REST/V1/Clubs/Holds.pm +++ a/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 --- a/Koha/REST/V1/Config/SMTP/Servers.pm +++ a/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 --- a/Koha/REST/V1/Holds.pm +++ a/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 --- a/Koha/REST/V1/ImportBatchProfiles.pm +++ a/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 --- a/Koha/REST/V1/Items.pm +++ a/Koha/REST/V1/Items.pm @@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller'; use Koha::Items; -use Try::Tiny; +use Try::Tiny qw( catch try ); =head1 NAME --- a/Koha/REST/V1/Libraries.pm +++ a/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 --- a/Koha/REST/V1/OAuth.pm +++ a/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'; --- a/Koha/REST/V1/Patrons.pm +++ a/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 --- a/Koha/REST/V1/Patrons/Account.pm +++ a/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 --- a/Koha/REST/V1/Patrons/Attributes.pm +++ a/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 --- a/Koha/REST/V1/Patrons/Password.pm +++ a/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 --- a/Koha/REST/V1/Quotes.pm +++ a/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 --- a/Koha/REST/V1/ReturnClaims.pm +++ a/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 --- a/Koha/REST/V1/Static.pm +++ a/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 --- a/Koha/REST/V1/TransferLimits.pm +++ a/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 --- a/Koha/Rating.pm +++ a/Koha/Rating.pm @@ -17,7 +17,6 @@ package Koha::Rating; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Ratings.pm +++ a/Koha/Ratings.pm @@ -17,7 +17,6 @@ package Koha::Ratings; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/RecordProcessor.pm +++ a/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); --- a/Koha/Report.pm +++ a/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 ); --- a/Koha/Reports.pm +++ a/Koha/Reports.pm @@ -17,7 +17,6 @@ package Koha::Reports; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Review.pm +++ a/Koha/Review.pm @@ -17,7 +17,6 @@ package Koha::Review; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Reviews.pm +++ a/Koha/Reviews.pm @@ -17,7 +17,6 @@ package Koha::Reviews; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/SMS/Provider.pm +++ a/Koha/SMS/Provider.pm @@ -19,7 +19,6 @@ package Koha::SMS::Provider; use Modern::Perl; -use Carp; use Koha::Patrons; --- a/Koha/SMS/Providers.pm +++ a/Koha/SMS/Providers.pm @@ -19,7 +19,6 @@ package Koha::SMS::Providers; use Modern::Perl; -use Carp; use Koha::SMS::Provider; --- a/Koha/SMTP/Server.pm +++ a/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); --- a/Koha/Schema/Loader/mysql.pm +++ a/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. --- a/Koha/Script.pm +++ a/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; --- a/Koha/SearchEngine.pm +++ a/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 --- a/Koha/SearchEngine/Elasticsearch.pm +++ a/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 )); --- a/Koha/SearchEngine/Elasticsearch/Indexer.pm +++ a/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 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ a/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; --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ a/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 )); --- a/Koha/SearchEngine/Indexer.pm +++ a/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'; --- a/Koha/SearchEngine/QueryBuilder.pm +++ a/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"); --- a/Koha/SearchEngine/Search.pm +++ a/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'; --- a/Koha/SearchEngine/Zebra/Indexer.pm +++ a/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 --- a/Koha/SearchField.pm +++ a/Koha/SearchField.pm @@ -17,7 +17,6 @@ package Koha::SearchField; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/SearchFields.pm +++ a/Koha/SearchFields.pm @@ -17,7 +17,6 @@ package Koha::SearchFields; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/SearchMarcMap.pm +++ a/Koha/SearchMarcMap.pm @@ -17,7 +17,6 @@ package Koha::SearchMarcMap; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/SearchMarcMaps.pm +++ a/Koha/SearchMarcMaps.pm @@ -17,7 +17,6 @@ package Koha::SearchMarcMaps; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Serial.pm +++ a/Koha/Serial.pm @@ -19,7 +19,6 @@ package Koha::Serial; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Serial/Item.pm +++ a/Koha/Serial/Item.pm @@ -19,7 +19,6 @@ package Koha::Serial::Item; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Serial/Items.pm +++ a/Koha/Serial/Items.pm @@ -19,7 +19,6 @@ package Koha::Serial::Items; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Serials.pm +++ a/Koha/Serials.pm @@ -19,7 +19,6 @@ package Koha::Serials; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/SharedContent.pm +++ a/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; --- a/Koha/Sitemapper.pm +++ a/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; --- a/Koha/Sitemapper/Writer.pm +++ a/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; --- a/Koha/Statistic.pm +++ a/Koha/Statistic.pm @@ -17,7 +17,6 @@ package Koha::Statistic; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Items; --- a/Koha/Statistics.pm +++ a/Koha/Statistics.pm @@ -17,7 +17,6 @@ package Koha::Statistics; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/StockRotationItem.pm +++ a/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); --- a/Koha/Subscription.pm +++ a/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); --- a/Koha/Subscription/Frequencies.pm +++ a/Koha/Subscription/Frequencies.pm @@ -17,7 +17,6 @@ package Koha::Subscription::Frequencies; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Subscription/Frequency.pm +++ a/Koha/Subscription/Frequency.pm @@ -17,7 +17,6 @@ package Koha::Subscription::Frequency; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Subscription/Histories.pm +++ a/Koha/Subscription/Histories.pm @@ -19,7 +19,6 @@ package Koha::Subscription::Histories; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Subscription/History.pm +++ a/Koha/Subscription/History.pm @@ -19,7 +19,6 @@ package Koha::Subscription::History; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Subscription/Routinglist.pm +++ a/Koha/Subscription/Routinglist.pm @@ -18,7 +18,6 @@ package Koha::Subscription::Routinglist; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Subscriptions; --- a/Koha/Subscription/Routinglists.pm +++ a/Koha/Subscription/Routinglists.pm @@ -18,7 +18,6 @@ package Koha::Subscription::Routinglists; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Subscription::Routinglist; --- a/Koha/Subscriptions.pm +++ a/Koha/Subscriptions.pm @@ -19,7 +19,6 @@ package Koha::Subscriptions; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Suggestion.pm +++ a/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); --- a/Koha/SuggestionEngine.pm +++ a/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); --- a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm +++ a/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); --- a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm +++ a/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); --- a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm +++ a/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); --- a/Koha/SuggestionEngine/Plugin/Null.pm +++ a/Koha/SuggestionEngine/Plugin/Null.pm @@ -33,7 +33,6 @@ SuggestionEngine. use strict; use warnings; -use Carp; use base qw(Koha::SuggestionEngine::Base); --- a/Koha/Suggestions.pm +++ a/Koha/Suggestions.pm @@ -19,7 +19,6 @@ package Koha::Suggestions; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Tag.pm +++ a/Koha/Tag.pm @@ -17,7 +17,6 @@ package Koha::Tag; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Tags.pm +++ a/Koha/Tags.pm @@ -17,7 +17,6 @@ package Koha::Tags; use Modern::Perl; -use Carp; use Koha::Tag; --- a/Koha/Tags/Approval.pm +++ a/Koha/Tags/Approval.pm @@ -17,7 +17,6 @@ package Koha::Tags::Approval; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Tags/Approvals.pm +++ a/Koha/Tags/Approvals.pm @@ -17,7 +17,6 @@ package Koha::Tags::Approvals; use Modern::Perl; -use Carp; use Koha::Tags::Approval; --- a/Koha/Tags/Index.pm +++ a/Koha/Tags/Index.pm @@ -17,7 +17,6 @@ package Koha::Tags::Index; use Modern::Perl; -use Carp; use base qw(Koha::Object); --- a/Koha/Tags/Indexes.pm +++ a/Koha/Tags/Indexes.pm @@ -17,7 +17,6 @@ package Koha::Tags::Indexes; use Modern::Perl; -use Carp; use Koha::Tags::Index; --- a/Koha/Template/Plugin/Asset.pm +++ a/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; --- a/Koha/Template/Plugin/AudioAlerts.pm +++ a/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 ); --- a/Koha/Template/Plugin/Categories.pm +++ a/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 { --- a/Koha/Template/Plugin/I18N.pm +++ a/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 --- a/Koha/Template/Plugin/KohaDates.pm +++ a/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; --- a/Koha/Template/Plugin/KohaNews.pm +++ a/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 ) = @_; --- a/Koha/Template/Plugin/KohaPlugins.pm +++ a/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; --- a/Koha/Template/Plugin/Languages.pm +++ a/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 ) = @_; --- a/Koha/Template/Plugin/To.pm +++ a/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 { --- a/Koha/Token.pm +++ a/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; --- a/Koha/UploadedFile.pm +++ a/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); --- a/Koha/UploadedFiles.pm +++ a/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); --- a/Koha/Uploader.pm +++ a/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); --- a/Koha/Util/MARC.pm +++ a/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 --- a/Koha/Util/OpenDocument.pm +++ a/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 ); --- a/Koha/Virtualshelf.pm +++ a/Koha/Virtualshelf.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelf; use Modern::Perl; -use Carp; use C4::Auth qw( haspermission ); --- a/Koha/Virtualshelfcontent.pm +++ a/Koha/Virtualshelfcontent.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelfcontent; use Modern::Perl; -use Carp; use Koha::Database; use Koha::Exceptions; --- a/Koha/Virtualshelfcontents.pm +++ a/Koha/Virtualshelfcontents.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelfcontents; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Virtualshelfshare.pm +++ a/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); --- a/Koha/Virtualshelfshares.pm +++ a/Koha/Virtualshelfshares.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelfshares; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Virtualshelves.pm +++ a/Koha/Virtualshelves.pm @@ -17,7 +17,6 @@ package Koha::Virtualshelves; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/XSLT/Base.pm +++ a/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; --- a/Koha/XSLT/Security.pm +++ a/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; --- a/Koha/Z3950Server.pm +++ a/Koha/Z3950Server.pm @@ -17,7 +17,6 @@ package Koha::Z3950Server; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/Z3950Servers.pm +++ a/Koha/Z3950Servers.pm @@ -17,7 +17,6 @@ package Koha::Z3950Servers; use Modern::Perl; -use Carp; use Koha::Database; --- a/Koha/pdfformat/layout2pages.pm +++ a/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 { --- a/Koha/pdfformat/layout2pagesde.pm +++ a/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); --- a/Koha/pdfformat/layout3pages.pm +++ a/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 { --- a/Koha/pdfformat/layout3pagesfr.pm +++ a/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 { --- a/about.pl +++ a/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; --- a/acqui/acqui-home.pl +++ a/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; --- a/acqui/add_user_search.pl +++ a/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; --- a/acqui/addorder.pl +++ a/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 ); --- a/acqui/addorderiso2709.pl +++ a/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; --- a/acqui/basket.pl +++ a/acqui/basket.pl @@ -22,13 +22,27 @@ 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::Debug qw( $debug ); -use C4::Suggestions; +use C4::Suggestions qw( GetSuggestionInfoFromBiblionumber ); use Koha::Biblios; use Koha::Acquisition::Baskets; use Koha::Acquisition::Booksellers; --- a/acqui/basketheader.pl +++ a/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; --- a/acqui/booksellers.pl +++ a/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; --- a/acqui/cancelorder.pl +++ a/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; --- a/acqui/check_budget_total.pl +++ a/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 --- a/acqui/duplicate_orders.pl +++ a/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; --- a/acqui/edimsg.pl +++ a/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 ); --- a/acqui/finishreceive.pl +++ a/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; --- a/acqui/histsearch.pl +++ a/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 ); --- a/acqui/invoice-files.pl +++ a/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; --- a/acqui/invoice.pl +++ a/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; --- a/acqui/invoices.pl +++ a/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; --- a/acqui/lateorders-export.pl +++ a/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; --- a/acqui/lateorders.pl +++ a/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; --- a/acqui/modordernotes.pl +++ a/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; --- a/acqui/neworderempty.pl +++ a/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; --- a/acqui/newordersubscription.pl +++ a/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; --- a/acqui/newordersuggestion.pl +++ a/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; --- a/acqui/ordered.pl +++ a/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; --- a/acqui/orderreceive.pl +++ a/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; --- a/acqui/parcel.pl +++ a/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; --- a/acqui/parcels.pl +++ a/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 ); --- a/acqui/spent.pl +++ a/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; --- a/acqui/supplier.pl +++ a/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; --- a/acqui/transferorder.pl +++ a/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; --- a/acqui/uncertainprice.pl +++ a/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; --- a/acqui/updatesupplier.pl +++ a/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; --- a/admin/aqbudgetperiods.pl +++ a/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; --- a/admin/aqbudgets.pl +++ a/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; --- a/admin/aqplan.pl +++ a/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; --- a/admin/cash_registers.pl +++ a/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; --- a/admin/check_budget_parent.pl +++ a/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 --- a/admin/check_parent_total.pl +++ a/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 --- a/admin/searchengine/elasticsearch/mappings.pl +++ a/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 (); --- a/authorities/auth_finder.pl +++ a/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; --- a/basket/basket.pl +++ a/basket/basket.pl @@ -18,7 +18,6 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Koha; use C4::Biblio qw( GetBiblioData GetMarcAuthors --- a/catalogue/MARCdetail.pl +++ a/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 ); --- a/catalogue/detail.pl +++ a/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; --- a/catalogue/item-export.pl +++ a/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; --- a/catalogue/updateitem.pl +++ a/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; --- a/cataloguing/additem.pl +++ a/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 --- a/cataloguing/merge.pl +++ a/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; --- a/cataloguing/moveitem.pl +++ a/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; --- a/cataloguing/value_builder/unimarc_field_210c.pl +++ a/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 ); --- a/circ/add_message.pl +++ a/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; --- a/circ/bookcount.pl +++ a/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; --- a/circ/branchtransfers.pl +++ a/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; --- a/circ/circulation.pl +++ a/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; --- a/circ/del_message.pl +++ a/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; --- a/circ/on-site_checkouts.pl +++ a/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; --- a/circ/pendingreserves.pl +++ a/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; --- a/circ/renew.pl +++ a/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; --- a/circ/request-article.pl +++ a/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; --- a/circ/reserveratios.pl +++ a/circ/reserveratios.pl @@ -27,7 +27,7 @@ use C4::Context; use C4::Output qw( output_html_with_http_headers ); use C4::Auth qw( get_template_and_user ); use C4::Debug qw( $debug ); -use C4::Acquisition qw/GetOrdersByBiblionumber/; +use C4::Acquisition qw( GetOrdersByBiblionumber ); use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::Acquisition::Baskets; --- a/circ/returns.pl +++ a/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; --- a/circ/set-library.pl +++ a/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; --- a/circ/transferstoreceive.pl +++ a/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; --- a/circ/waitingreserves.pl +++ a/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; --- a/docs/CAS/CASProxy/examples/koha_webservice.pl +++ a/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 ); --- a/members/boraccount.pl +++ a/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; --- a/members/deletemem.pl +++ a/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; --- a/members/discharge.pl +++ a/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; --- a/members/discharges.pl +++ a/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; --- a/members/files.pl +++ a/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; --- a/members/housebound.pl +++ a/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; --- a/members/ill-requests.pl +++ a/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; --- a/members/mancredit.pl +++ a/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; --- a/members/maninvoice.pl +++ a/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; --- a/members/member-password.pl +++ a/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; --- a/members/memberentry.pl +++ a/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 ); --- a/members/members-update-do.pl +++ a/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; --- a/members/moremember.pl +++ a/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; --- a/members/notices.pl +++ a/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 (); --- a/members/pay.pl +++ a/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; --- a/members/paycollect.pl +++ a/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; --- a/members/print_overdues.pl +++ a/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; --- a/members/printfeercpt.pl +++ a/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; --- a/members/printinvoice.pl +++ a/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; --- a/members/printslip.pl +++ a/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; --- a/members/purchase-suggestions.pl +++ a/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; --- a/members/readingrec.pl +++ a/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 ); --- a/members/statistics.pl +++ a/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; --- a/members/summary-print.pl +++ a/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; --- a/members/update-child.pl +++ a/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; --- a/misc/cronjobs/advance_notices.pl +++ a/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; --- a/misc/translator/LangInstaller.pm +++ a/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) = @_; --- a/misc/translator/TmplTokenizer.pm +++ a/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 ); --- a/offline_circ/download.pl +++ a/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; --- a/offline_circ/enqueue_koc.pl +++ a/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; --- a/offline_circ/list.pl +++ a/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; --- a/offline_circ/process.pl +++ a/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; --- a/offline_circ/process_koc.pl +++ a/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; --- a/offline_circ/service.pl +++ a/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; --- a/opac/opac-ISBDdetail.pl +++ a/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 --- a/opac/opac-MARCdetail.pl +++ a/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; --- a/opac/opac-account-pay.pl +++ a/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; --- a/opac/opac-authorities-home.pl +++ a/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; --- a/opac/opac-memberentry.pl +++ a/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; --- a/opac/opac-search.pl +++ a/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 ); --- a/opac/opac-shelves.pl +++ a/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; --- a/opac/opac-suggestions.pl +++ a/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 ); --- a/opac/opac-tags.pl +++ a/opac/opac-tags.pl @@ -38,7 +38,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::Debug qw( $debug ); -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 ); --- a/patron_lists/delete.pl +++ a/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; --- a/patroncards/add_user_search.pl +++ a/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; --- a/plugins/plugins-uninstall.pl +++ a/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; --- a/pos/printreceipt.pl +++ a/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; --- a/reports/acquisitions_stats.pl +++ a/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 ); --- a/reports/bor_issues_top.pl +++ a/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 C4::Debug qw( $debug ); --- a/reports/borrowers_out.pl +++ a/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; --- a/reports/borrowers_stats.pl +++ a/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 ); --- a/reports/cash_register_stats.pl +++ a/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; --- a/reports/cat_issues_top.pl +++ a/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; --- a/reports/catalogue_stats.pl +++ a/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; --- a/reports/dictionary.pl +++ a/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 --- a/reports/guided_reports.pl +++ a/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 ); --- a/reports/issues_avg_stats.pl +++ a/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; --- a/reports/issues_stats.pl +++ a/reports/issues_stats.pl @@ -26,9 +26,7 @@ use C4::Debug qw( $debug ); 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 ); --- a/reports/manager.pl +++ a/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; --- a/reports/orders_by_fund.pl +++ a/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 ); --- a/reports/reserves_stats.pl +++ a/reports/reserves_stats.pl @@ -27,7 +27,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; --- a/reviews/reviewswaiting.pl +++ a/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; --- a/rotating_collections/addItems.pl +++ a/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; --- a/rotating_collections/editCollections.pl +++ a/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; --- a/rotating_collections/rotatingCollections.pl +++ a/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; --- a/rotating_collections/transferCollection.pl +++ a/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 ); --- a/serials/claims.pl +++ a/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 ); --- a/serials/lateissues-export.pl +++ a/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; --- a/serials/subscription-add.pl +++ a/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 ); --- a/serials/subscription-detail.pl +++ a/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; --- a/suggestion/add_user_search.pl +++ a/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; --- a/suggestion/suggestion.pl +++ a/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; --- a/t/lib/Dates.pm +++ a/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 --- a/t/lib/Koha/BackgroundJob/BatchTest.pm +++ a/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 ); --- a/t/lib/Koha/Plugin/BadAPIRoute.pm +++ a/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); --- a/t/lib/Koha/Plugin/MarcFieldValues.pm +++ a/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); --- a/t/lib/Koha/Plugin/Test.pm +++ a/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); --- a/t/lib/Selenium.pm +++ a/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; --- a/t/lib/TestBuilder.pm +++ a/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 --- a/tags/review.pl +++ a/tags/review.pl @@ -29,7 +29,12 @@ 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::Koha; -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::Debug qw( $debug ); use C4::Tags qw( approval_counts --- a/tools/batchMod.pl +++ a/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 ); --- a/tools/copy-holidays.pl +++ a/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; --- a/tools/exceptionHolidays.pl +++ a/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; --- a/tools/newHolidays.pl +++ a/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; --- a/virtualshelves/shelves.pl +++ a/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; --