Bug 17600: Standardize our EXPORT_OK
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 9 Nov 2016 12:06:44 +0000 (12:06 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Jul 2021 06:58:47 +0000 (08:58 +0200)
On bug 17591 we discovered that there was something weird going on with
the way we export and use subroutines/modules.
This patch tries to standardize our EXPORT to use EXPORT_OK only.

That way we will need to explicitely define the subroutine we want to
use from a module.

This patch is a squashed version of:
Bug 17600: After export.pl
Bug 17600: After perlimport
Bug 17600: Manual changes
Bug 17600: Other manual changes after second perlimports run
Bug 17600: Fix tests

And a lot of other manual changes.

export.pl is a dirty script that can be found on bug 17600.

"perlimport" is:
git clone https://github.com/oalders/App-perlimports.git
cd App-perlimports/
cpanm --installdeps .
export PERL5LIB="$PERL5LIB:/kohadevbox/koha/App-perlimports/lib"
find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \;

The ideas of this patch are to:
* use EXPORT_OK instead of EXPORT
* perltidy the EXPORT_OK list
* remove '&' before the subroutine names
* remove some uneeded use statements
* explicitely import the subroutines we need within the controllers or
modules

Note that the private subroutines (starting with _) should not be
exported (and not used from outside of the module except from tests).

EXPORT vs EXPORT_OK (from
https://www.thegeekstuff.com/2010/06/perl-exporter-examples/)
"""
Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members.

@EXPORT and @EXPORT_OK are the two main variables used during export operation.

@EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace.

@EXPORT_OK does export of symbols on demand basis.
"""

If this patch caused a conflict with a patch you wrote prior to its
push:
* Make sure you are not reintroducing a "use" statement that has been
removed
* "$subroutine" is not exported by the C4::$MODULE module
means that you need to add the subroutine to the @EXPORT_OK list
* Bareword "$subroutine" not allowed while "strict subs"
means that you didn't imported the subroutine from the module:
  - use $MODULE qw( $subroutine list );
You can also use the fully qualified namespace: C4::$MODULE::$subroutine

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
1311 files changed:
C4/Accounts.pm
C4/Acquisition.pm
C4/Auth.pm
C4/Auth_with_cas.pm
C4/Auth_with_ldap.pm
C4/Auth_with_shibboleth.pm
C4/AuthoritiesMarc.pm
C4/AuthoritiesMarc/MARC21.pm
C4/BackgroundJob.pm
C4/Barcodes.pm
C4/Barcodes/EAN13.pm
C4/Barcodes/annual.pm
C4/Barcodes/hbyymmincr.pm
C4/Biblio.pm
C4/Breeding.pm
C4/Budgets.pm
C4/Calendar.pm
C4/Charset.pm
C4/Circulation.pm
C4/ClassSortRoutine.pm
C4/ClassSortRoutine/Dewey.pm
C4/ClassSortRoutine/Generic.pm
C4/ClassSortRoutine/LCC.pm
C4/ClassSource.pm
C4/ClassSplitRoutine.pm
C4/Context.pm
C4/Contract.pm
C4/CourseReserves.pm
C4/Creators.pm
C4/Creators/Lib.pm
C4/Creators/PDF.pm
C4/Creators/Profile.pm
C4/Creators/Template.pm
C4/External/BakerTaylor.pm
C4/External/OverDrive.pm
C4/External/Syndetics.pm
C4/Heading.pm
C4/Heading/MARC21.pm
C4/Heading/UNIMARC.pm
C4/HoldsQueue.pm
C4/ILSDI/Services.pm
C4/ImportBatch.pm
C4/ImportExportFramework.pm
C4/InstallAuth.pm
C4/Installer.pm
C4/Installer/PerlModules.pm
C4/Installer/UpgradeBackup.pm
C4/ItemCirculationAlertPreference.pm
C4/Items.pm
C4/Koha.pm
C4/Labels/Label.pm
C4/Languages.pm
C4/Letters.pm
C4/Linker.pm
C4/Linker/Default.pm
C4/Linker/FirstMatch.pm
C4/Linker/LastMatch.pm
C4/Log.pm
C4/MarcModificationTemplates.pm
C4/Matcher.pm
C4/Members.pm
C4/Members/Statistics.pm
C4/Message.pm
C4/OAI/Sets.pm
C4/Output.pm
C4/Output/JSONStream.pm
C4/Overdues.pm
C4/Patroncards.pm
C4/Patroncards/Patroncard.pm
C4/Record.pm
C4/Reports.pm
C4/Reports/Guided.pm
C4/Reserves.pm
C4/Ris.pm
C4/RotatingCollections.pm
C4/SIP/ILS.pm
C4/SIP/ILS/Item.pm
C4/SIP/ILS/Transaction/Checkin.pm
C4/SIP/ILS/Transaction/Checkout.pm
C4/SIP/ILS/Transaction/Hold.pm
C4/SIP/ILS/Transaction/Renew.pm
C4/SIP/ILS/Transaction/RenewAll.pm
C4/SIP/SIPServer.pm
C4/SIP/Sip.pm
C4/Scheduler.pm
C4/Scrubber.pm
C4/Search.pm
C4/Search/History.pm
C4/Search/PazPar2.pm
C4/Serials.pm
C4/Serials/Frequency.pm
C4/Serials/Numberpattern.pm
C4/Service.pm
C4/ShelfBrowser.pm
C4/SocialData.pm
C4/Stats.pm
C4/Suggestions.pm
C4/Tags.pm
C4/Templates.pm
C4/TmplTokenType.pm
C4/UsageStats.pm
C4/Utils/DataTables/Members.pm
C4/Utils/DataTables/VirtualShelves.pm
C4/XISBN.pm
C4/XSLT.pm
Koha/Account.pm
Koha/Account/CreditType.pm
Koha/Account/CreditTypes.pm
Koha/Account/DebitType.pm
Koha/Account/DebitTypes.pm
Koha/Account/Line.pm
Koha/Account/Lines.pm
Koha/Account/Offset.pm
Koha/Account/Offsets.pm
Koha/Acquisition/Basket.pm
Koha/Acquisition/Bookseller/Contact.pm
Koha/Acquisition/Bookseller/Contacts.pm
Koha/Acquisition/Currencies.pm
Koha/Acquisition/Currency.pm
Koha/Acquisition/Invoice/Adjustment.pm
Koha/Acquisition/Invoice/Adjustments.pm
Koha/Acquisition/Order.pm
Koha/Acquisition/Order/Claim.pm
Koha/Acquisition/Order/Claims.pm
Koha/Acquisition/Orders.pm
Koha/AdvancedEditorMacro.pm
Koha/AdvancedEditorMacros.pm
Koha/ApiKey.pm
Koha/ApiKeys.pm
Koha/ArticleRequest.pm
Koha/ArticleRequests.pm
Koha/AudioAlert.pm
Koha/AudioAlerts.pm
Koha/AuthUtils.pm
Koha/AuthorisedValue.pm
Koha/AuthorisedValueCategories.pm
Koha/AuthorisedValueCategory.pm
Koha/AuthorisedValues.pm
Koha/Authorities.pm
Koha/Authority/MergeRequests.pm
Koha/Authority/Type.pm
Koha/Authority/Types.pm
Koha/BackgroundJob.pm
Koha/BackgroundJob/BatchUpdateAuthority.pm
Koha/BackgroundJob/BatchUpdateBiblio.pm
Koha/Biblio.pm
Koha/Biblio/Metadatas.pm
Koha/BiblioFramework.pm
Koha/BiblioFrameworks.pm
Koha/BiblioUtils.pm
Koha/BiblioUtils/Iterator.pm
Koha/Biblioitem.pm
Koha/Biblioitems.pm
Koha/Biblios.pm
Koha/Cache.pm
Koha/Cache/Object.pm
Koha/Calendar.pm
Koha/Cash/Register.pm
Koha/Cash/Register/Action.pm
Koha/Cash/Register/Actions.pm
Koha/Cash/Register/Cashup.pm
Koha/Cash/Register/Cashups.pm
Koha/Cash/Registers.pm
Koha/Charges/Fees.pm
Koha/Checkout.pm
Koha/Checkouts.pm
Koha/Checkouts/ReturnClaims.pm
Koha/CirculationRules.pm
Koha/Cities.pm
Koha/City.pm
Koha/ClassSortRule.pm
Koha/ClassSortRules.pm
Koha/ClassSource.pm
Koha/ClassSources.pm
Koha/ClassSplitRule.pm
Koha/Club.pm
Koha/Club/Enrollment.pm
Koha/Club/Enrollment/Field.pm
Koha/Club/Enrollment/Fields.pm
Koha/Club/Enrollments.pm
Koha/Club/Field.pm
Koha/Club/Fields.pm
Koha/Club/Hold.pm
Koha/Club/Hold/PatronHold.pm
Koha/Club/Hold/PatronHolds.pm
Koha/Club/Holds.pm
Koha/Club/Template.pm
Koha/Club/Template/EnrollmentField.pm
Koha/Club/Template/EnrollmentFields.pm
Koha/Club/Template/Field.pm
Koha/Club/Template/Fields.pm
Koha/Club/Templates.pm
Koha/Clubs.pm
Koha/Config.pm
Koha/Config/SysPref.pm
Koha/Config/SysPrefs.pm
Koha/Course.pm
Koha/Course/Instructor.pm
Koha/Course/Instructors.pm
Koha/Course/Item.pm
Koha/Course/Items.pm
Koha/Course/Reserve.pm
Koha/Course/Reserves.pm
Koha/Courses.pm
Koha/CoverImage.pm
Koha/CoverImages.pm
Koha/CsvProfile.pm
Koha/CsvProfiles.pm
Koha/Database.pm
Koha/Desk.pm
Koha/Desks.pm
Koha/EDI.pm
Koha/Edifact.pm
Koha/Edifact/Line.pm
Koha/Edifact/Order.pm
Koha/Edifact/Transport.pm
Koha/Email.pm
Koha/Exporter/Record.pm
Koha/ExternalContent.pm
Koha/ExternalContent/OverDrive.pm
Koha/ExternalContent/RecordedBooks.pm
Koha/Filter/MARC/EmbedItemsAvailability.pm
Koha/Filter/MARC/EmbedSeeFromHeadings.pm
Koha/Filter/MARC/Null.pm
Koha/Filter/MARC/ViewPolicy.pm
Koha/Hold.pm
Koha/Holds.pm
Koha/I18N.pm
Koha/Illrequest.pm
Koha/Illrequest/Config.pm
Koha/Illrequest/Logger.pm
Koha/Item.pm
Koha/Item/Search/Field.pm
Koha/Item/Transfer.pm
Koha/Item/Transfer/Limit.pm
Koha/Item/Transfers.pm
Koha/ItemType.pm
Koha/ItemTypes.pm
Koha/Items.pm
Koha/KeyboardShortcut.pm
Koha/KeyboardShortcuts.pm
Koha/Libraries.pm
Koha/Library.pm
Koha/Library/Group.pm
Koha/Library/Groups.pm
Koha/Library/OverDriveInfo.pm
Koha/Library/OverDriveInfos.pm
Koha/Linktracker.pm
Koha/List/Patron.pm
Koha/Logger.pm
Koha/MarcSubfieldStructure.pm
Koha/MarcSubfieldStructures.pm
Koha/MessageAttribute.pm
Koha/MessageAttributes.pm
Koha/MetaSearcher.pm
Koha/MetadataRecord.pm
Koha/MetadataRecord/Authority.pm
Koha/News.pm
Koha/NewsItem.pm
Koha/Notice/Message.pm
Koha/Notice/Messages.pm
Koha/Notice/Template.pm
Koha/Notice/Templates.pm
Koha/OAI/Server/Description.pm
Koha/OAI/Server/GetRecord.pm
Koha/OAI/Server/ListBase.pm
Koha/OAI/Server/ListSets.pm
Koha/OAI/Server/Repository.pm
Koha/Object.pm
Koha/Object/Limit/Library.pm
Koha/Objects.pm
Koha/Old/Holds.pm
Koha/Patron.pm
Koha/Patron/Category.pm
Koha/Patron/Discharge.pm
Koha/Patron/Image.pm
Koha/Patron/Images.pm
Koha/Patron/Message.pm
Koha/Patron/Messages.pm
Koha/Patron/Modification.pm
Koha/Patron/Modifications.pm
Koha/Patron/Password/Recovery.pm
Koha/Patron/Relationship.pm
Koha/Patron/Relationships.pm
Koha/Patrons.pm
Koha/Patrons/Import.pm
Koha/Plugins.pm
Koha/Plugins/Base.pm
Koha/Plugins/Handler.pm
Koha/Plugins/Method.pm
Koha/Plugins/Methods.pm
Koha/PseudonymizedTransaction.pm
Koha/PseudonymizedTransactions.pm
Koha/Quote.pm
Koha/Quotes.pm
Koha/REST/Plugin/PluginRoutes.pm
Koha/REST/Plugin/Query.pm
Koha/REST/V1.pm
Koha/REST/V1/Acquisitions/Funds.pm
Koha/REST/V1/Acquisitions/Orders.pm
Koha/REST/V1/Acquisitions/Vendors.pm
Koha/REST/V1/AdvancedEditorMacro.pm
Koha/REST/V1/Auth.pm
Koha/REST/V1/Biblios.pm
Koha/REST/V1/CashRegisters/Cashups.pm
Koha/REST/V1/Checkouts.pm
Koha/REST/V1/CirculationRules.pm
Koha/REST/V1/Cities.pm
Koha/REST/V1/Clubs/Holds.pm
Koha/REST/V1/Config/SMTP/Servers.pm
Koha/REST/V1/Holds.pm
Koha/REST/V1/ImportBatchProfiles.pm
Koha/REST/V1/Items.pm
Koha/REST/V1/Libraries.pm
Koha/REST/V1/OAuth.pm
Koha/REST/V1/Patrons.pm
Koha/REST/V1/Patrons/Account.pm
Koha/REST/V1/Patrons/Attributes.pm
Koha/REST/V1/Patrons/Password.pm
Koha/REST/V1/Quotes.pm
Koha/REST/V1/ReturnClaims.pm
Koha/REST/V1/Static.pm
Koha/REST/V1/TransferLimits.pm
Koha/Rating.pm
Koha/Ratings.pm
Koha/RecordProcessor.pm
Koha/Report.pm
Koha/Reports.pm
Koha/Review.pm
Koha/Reviews.pm
Koha/SMS/Provider.pm
Koha/SMS/Providers.pm
Koha/Schema/Loader/mysql.pm
Koha/Script.pm
Koha/SearchEngine.pm
Koha/SearchEngine/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/Indexer.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm
Koha/SearchEngine/Indexer.pm
Koha/SearchEngine/QueryBuilder.pm
Koha/SearchEngine/Search.pm
Koha/SearchEngine/Zebra/Indexer.pm
Koha/SearchEngine/Zebra/Search.pm
Koha/SearchField.pm
Koha/SearchFields.pm
Koha/SearchMarcMap.pm
Koha/SearchMarcMaps.pm
Koha/Serial.pm
Koha/Serial/Item.pm
Koha/Serial/Items.pm
Koha/Serials.pm
Koha/SharedContent.pm
Koha/SimpleMARC.pm
Koha/Sitemapper/Writer.pm
Koha/Statistic.pm
Koha/Statistics.pm
Koha/StockRotationItem.pm
Koha/Subscription.pm
Koha/Subscription/Frequencies.pm
Koha/Subscription/Frequency.pm
Koha/Subscription/Histories.pm
Koha/Subscription/History.pm
Koha/Subscription/Routinglist.pm
Koha/Subscription/Routinglists.pm
Koha/Subscriptions.pm
Koha/Suggestion.pm
Koha/SuggestionEngine.pm
Koha/SuggestionEngine/Plugin/AuthorityFile.pm
Koha/SuggestionEngine/Plugin/ExplodedTerms.pm
Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm
Koha/SuggestionEngine/Plugin/Null.pm
Koha/Suggestions.pm
Koha/Tag.pm
Koha/Tags.pm
Koha/Tags/Approval.pm
Koha/Tags/Approvals.pm
Koha/Tags/Index.pm
Koha/Tags/Indexes.pm
Koha/Template/Plugin/Asset.pm
Koha/Template/Plugin/AudioAlerts.pm
Koha/Template/Plugin/AuthorisedValues.pm
Koha/Template/Plugin/Categories.pm
Koha/Template/Plugin/I18N.pm
Koha/Template/Plugin/KohaDates.pm
Koha/Template/Plugin/KohaPlugins.pm
Koha/Template/Plugin/To.pm
Koha/Token.pm
Koha/UploadedFiles.pm
Koha/Uploader.pm
Koha/Util/FrameworkPlugin.pm
Koha/Util/MARC.pm
Koha/Util/OpenDocument.pm
Koha/Virtualshelf.pm
Koha/Virtualshelfcontent.pm
Koha/Virtualshelfcontents.pm
Koha/Virtualshelfshare.pm
Koha/Virtualshelfshares.pm
Koha/Virtualshelves.pm
Koha/XSLT/Security.pm
Koha/Z3950Responder/Session.pm
Koha/Z3950Server.pm
Koha/Z3950Servers.pm
Koha/pdfformat/layout2pages.pm
Koha/pdfformat/layout2pagesde.pm
Koha/pdfformat/layout3pages.pm
Koha/pdfformat/layout3pagesfr.pm
about.pl
acqui/acqui-home.pl
acqui/add_user_search.pl
acqui/addorder.pl
acqui/addorderiso2709.pl
acqui/ajax-getauthvaluedropbox.pl
acqui/basket.pl
acqui/basketgroup.pl
acqui/basketheader.pl
acqui/booksellers.pl
acqui/cancelorder.pl
acqui/check_budget_total.pl
acqui/check_uniqueness.pl
acqui/duplicate_orders.pl
acqui/edi_ean.pl
acqui/edifactmsgs.pl
acqui/edimsg.pl
acqui/finishreceive.pl
acqui/histsearch.pl
acqui/invoice-files.pl
acqui/invoice.pl
acqui/invoices.pl
acqui/lateorders-export.pl
acqui/lateorders.pl
acqui/modordernotes.pl
acqui/neworderempty.pl
acqui/newordersubscription.pl
acqui/newordersuggestion.pl
acqui/ordered.pl
acqui/orderreceive.pl
acqui/parcel.pl
acqui/parcels.pl
acqui/showorder.pl
acqui/spent.pl
acqui/supplier.pl
acqui/transferorder.pl
acqui/uncertainprice.pl
acqui/updatesupplier.pl
acqui/z3950_search.pl
admin/add_user_search.pl
admin/additional-fields.pl
admin/admin-home.pl
admin/adveditorshortcuts.pl
admin/aqbudgetperiods.pl
admin/aqbudgets.pl
admin/aqcontract.pl
admin/aqplan.pl
admin/audio_alerts.pl
admin/auth_subfields_structure.pl
admin/auth_tag_structure.pl
admin/authorised_values.pl
admin/authtypes.pl
admin/background_jobs.pl
admin/biblio_framework.pl
admin/branch_transfer_limits.pl
admin/branches.pl
admin/cash_registers.pl
admin/categories.pl
admin/check_budget_parent.pl
admin/check_parent_total.pl
admin/checkmarc.pl
admin/cities.pl
admin/classsources.pl
admin/clone-rules.pl
admin/columns_settings.pl
admin/credit_types.pl
admin/currency.pl
admin/debit_types.pl
admin/desks.pl
admin/didyoumean.pl
admin/edi_accounts.pl
admin/edi_ean_accounts.pl
admin/import_export_framework.pl
admin/item_circulation_alerts.pl
admin/items_search_field.pl
admin/items_search_fields.pl
admin/itemtypes.pl
admin/koha2marclinks.pl
admin/library_groups.pl
admin/localization.pl
admin/marc_subfields_structure.pl
admin/marctagstructure.pl
admin/matching-rules.pl
admin/oai_set_mappings.pl
admin/oai_sets.pl
admin/overdrive.pl
admin/patron-attr-types.pl
admin/preferences.pl
admin/searchengine/elasticsearch/mappings.pl
admin/share_content.pl
admin/smart-rules.pl
admin/sms_providers.pl
admin/smtp_servers.pl
admin/sru_modmapping.pl
admin/systempreferences.pl
admin/transfer_limits.pl
admin/transport-cost-matrix.pl
admin/usage_statistics.pl
admin/z3950servers.pl
api/v1/app.pl
authorities/auth_finder.pl
authorities/authorities-home.pl
authorities/authorities.pl
authorities/blinddetail-biblio-search.pl
authorities/detail-biblio-search.pl
authorities/detail.pl
authorities/export.pl
authorities/merge.pl
authorities/merge_ajax.pl
authorities/ysearch.pl
basket/basket.pl
basket/downloadcart.pl
basket/sendbasket.pl
catalogue/ISBDdetail.pl
catalogue/MARCdetail.pl
catalogue/detail.pl
catalogue/export.pl
catalogue/getitem-ajax.pl
catalogue/imageviewer.pl
catalogue/issuehistory.pl
catalogue/item-export.pl
catalogue/itemsearch.pl
catalogue/labeledMARCdetail.pl
catalogue/moredetail.pl
catalogue/search-history.pl
catalogue/search.pl
catalogue/showmarc.pl
catalogue/stockrotation.pl
catalogue/updateitem.pl
cataloguing/addbiblio.pl
cataloguing/addbooks.pl
cataloguing/additem.pl
cataloguing/editor.pl
cataloguing/linkitem.pl
cataloguing/merge.pl
cataloguing/merge_ajax.pl
cataloguing/moveitem.pl
cataloguing/value_builder/EXAMPLE.pl
cataloguing/value_builder/barcode.pl
cataloguing/value_builder/barcode_manual.pl
cataloguing/value_builder/callnumber-KU.pl
cataloguing/value_builder/callnumber.pl
cataloguing/value_builder/cn_browser.pl
cataloguing/value_builder/dateaccessioned.pl
cataloguing/value_builder/macles.pl
cataloguing/value_builder/marc21_field_006.pl
cataloguing/value_builder/marc21_field_007.pl
cataloguing/value_builder/marc21_field_008.pl
cataloguing/value_builder/marc21_field_008_authorities.pl
cataloguing/value_builder/marc21_field_008_classifications.pl
cataloguing/value_builder/marc21_leader.pl
cataloguing/value_builder/marc21_leader_authorities.pl
cataloguing/value_builder/marc21_linking_section.pl
cataloguing/value_builder/normarc_field_007.pl
cataloguing/value_builder/normarc_field_008.pl
cataloguing/value_builder/normarc_leader.pl
cataloguing/value_builder/stocknumberAV.pl
cataloguing/value_builder/stocknumberam123.pl
cataloguing/value_builder/unimarc_field_010.pl
cataloguing/value_builder/unimarc_field_100.pl
cataloguing/value_builder/unimarc_field_100_authorities.pl
cataloguing/value_builder/unimarc_field_105.pl
cataloguing/value_builder/unimarc_field_106.pl
cataloguing/value_builder/unimarc_field_110.pl
cataloguing/value_builder/unimarc_field_115a.pl
cataloguing/value_builder/unimarc_field_115b.pl
cataloguing/value_builder/unimarc_field_116.pl
cataloguing/value_builder/unimarc_field_117.pl
cataloguing/value_builder/unimarc_field_120.pl
cataloguing/value_builder/unimarc_field_121a.pl
cataloguing/value_builder/unimarc_field_121b.pl
cataloguing/value_builder/unimarc_field_122.pl
cataloguing/value_builder/unimarc_field_123a.pl
cataloguing/value_builder/unimarc_field_123d.pl
cataloguing/value_builder/unimarc_field_123e.pl
cataloguing/value_builder/unimarc_field_123f.pl
cataloguing/value_builder/unimarc_field_123g.pl
cataloguing/value_builder/unimarc_field_123i.pl
cataloguing/value_builder/unimarc_field_123j.pl
cataloguing/value_builder/unimarc_field_124.pl
cataloguing/value_builder/unimarc_field_124a.pl
cataloguing/value_builder/unimarc_field_124b.pl
cataloguing/value_builder/unimarc_field_124c.pl
cataloguing/value_builder/unimarc_field_124d.pl
cataloguing/value_builder/unimarc_field_124e.pl
cataloguing/value_builder/unimarc_field_124f.pl
cataloguing/value_builder/unimarc_field_124g.pl
cataloguing/value_builder/unimarc_field_125.pl
cataloguing/value_builder/unimarc_field_125a.pl
cataloguing/value_builder/unimarc_field_125b.pl
cataloguing/value_builder/unimarc_field_126.pl
cataloguing/value_builder/unimarc_field_126a.pl
cataloguing/value_builder/unimarc_field_126b.pl
cataloguing/value_builder/unimarc_field_127.pl
cataloguing/value_builder/unimarc_field_128a.pl
cataloguing/value_builder/unimarc_field_128b.pl
cataloguing/value_builder/unimarc_field_128c.pl
cataloguing/value_builder/unimarc_field_130.pl
cataloguing/value_builder/unimarc_field_135a.pl
cataloguing/value_builder/unimarc_field_140.pl
cataloguing/value_builder/unimarc_field_141.pl
cataloguing/value_builder/unimarc_field_210c.pl
cataloguing/value_builder/unimarc_field_210c_bis.pl
cataloguing/value_builder/unimarc_field_225a.pl
cataloguing/value_builder/unimarc_field_225a_bis.pl
cataloguing/value_builder/unimarc_field_4XX.pl
cataloguing/value_builder/unimarc_field_686a.pl
cataloguing/value_builder/unimarc_field_700-4.pl
cataloguing/value_builder/unimarc_leader.pl
cataloguing/ysearch.pl
cataloguing/z3950_auth_search.pl
cataloguing/z3950_search.pl
circ/add_message.pl
circ/article-request-slip.pl
circ/article-requests.pl
circ/bookcount.pl
circ/branchoverdues.pl
circ/branchtransfers.pl
circ/checkout-notes.pl
circ/circulation-home.pl
circ/circulation.pl
circ/del_message.pl
circ/hold-transfer-slip.pl
circ/offline-mf.pl
circ/offline.pl
circ/on-site_checkouts.pl
circ/overdue.pl
circ/pendingreserves.pl
circ/renew.pl
circ/request-article.pl
circ/reserveratios.pl
circ/returns.pl
circ/set-library.pl
circ/transfer-slip.pl
circ/transfers_to_send.pl
circ/transferstoreceive.pl
circ/view_holdsqueue.pl
circ/waitingreserves.pl
circ/ysearch.pl
clubs/club-enrollments.pl
clubs/clubs-add-modify.pl
clubs/clubs.pl
clubs/patron-clubs-tab.pl
clubs/patron-enroll.pl
clubs/templates-add-modify.pl
course_reserves/add_items.pl
course_reserves/batch_add_items.pl
course_reserves/batch_rm_items.pl
course_reserves/course-details.pl
course_reserves/course-reserves.pl
course_reserves/course.pl
course_reserves/mod_course.pl
docs/CAS/CASProxy/examples/proxy_cas_callback.pl
docs/CAS/CASProxy/examples/proxy_cas_data.pl
errors/400.pl
errors/401.pl
errors/402.pl
errors/403.pl
errors/404.pl
errors/500.pl
help.pl
ill/ill-requests.pl
installer/data/mysql/backfill_statistics.pl
installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl
installer/data/mysql/update22to30.pl
installer/html-template-to-template-toolkit.pl
installer/install.pl
installer/onboarding.pl
koha_perl_deps.pl
labels/label-create-csv.pl
labels/label-create-pdf.pl
labels/label-create-xml.pl
labels/label-edit-batch.pl
labels/label-edit-layout.pl
labels/label-edit-profile.pl
labels/label-edit-range.pl
labels/label-edit-template.pl
labels/label-home.pl
labels/label-item-search.pl
labels/label-manage.pl
labels/label-print.pl
labels/spinelabel-home.pl
labels/spinelabel-print.pl
lib/CGI/Session/Serialize/yamlxs.pm
mainpage.pl
members/accountline-details.pl
members/apikeys.pl
members/boraccount.pl
members/cancel-charge.pl
members/deletemem.pl
members/discharge.pl
members/discharges.pl
members/files.pl
members/guarantor_search.pl
members/holdshistory.pl
members/housebound.pl
members/ill-requests.pl
members/mancredit.pl
members/maninvoice.pl
members/member-flags.pl
members/member-password.pl
members/member.pl
members/memberentry.pl
members/members-home.pl
members/members-update-do.pl
members/members-update.pl
members/merge-patrons.pl
members/mod_debarment.pl
members/moremember.pl
members/notices.pl
members/pay.pl
members/paycollect.pl
members/print_overdues.pl
members/printfeercpt.pl
members/printinvoice.pl
members/printslip.pl
members/purchase-suggestions.pl
members/readingrec.pl
members/routing-lists.pl
members/setstatus.pl
members/statistics.pl
members/summary-print.pl
members/update-child.pl
misc/add_date_fields_to_marc_records.pl
misc/admin/set_password.pl
misc/background_jobs_worker.pl
misc/batchCompareMARCvsFrameworks.pl
misc/batchDeleteUnusedSubfields.pl
misc/batchImportMARCWithBiblionumbers.pl
misc/batchRebuildBiblioTables.pl
misc/batchRebuildItemsTables.pl
misc/batchRepairMissingBiblionumbers.pl
misc/batchdeletebiblios.pl
misc/bin/connexion_import_daemon.pl
misc/check_sysprefs.pl
misc/commit_file.pl
misc/cronjobs/advance_notices.pl
misc/cronjobs/archive_purchase_suggestions.pl
misc/cronjobs/automatic_checkin.pl
misc/cronjobs/automatic_item_modification_by_age.pl
misc/cronjobs/automatic_renewals.pl
misc/cronjobs/batch_anonymise.pl
misc/cronjobs/build_browser_and_cloud.pl
misc/cronjobs/cart_to_shelf.pl
misc/cronjobs/check-url-quick.pl
misc/cronjobs/cleanup_database.pl
misc/cronjobs/cloud-kw.pl
misc/cronjobs/create_koc_db.pl
misc/cronjobs/delete_items.pl
misc/cronjobs/delete_patrons.pl
misc/cronjobs/delete_records_via_leader.pl
misc/cronjobs/edi_cron.pl
misc/cronjobs/fines.pl
misc/cronjobs/gather_print_notices.pl
misc/cronjobs/holds/auto_unsuspend_holds.pl
misc/cronjobs/holds/build_holds_queue.pl
misc/cronjobs/holds/cancel_expired_holds.pl
misc/cronjobs/holds/cancel_unfilled_holds.pl
misc/cronjobs/holds/holds_reminder.pl
misc/cronjobs/import_webservice_batch.pl
misc/cronjobs/longoverdue.pl
misc/cronjobs/membership_expiry.pl
misc/cronjobs/merge_authorities.pl
misc/cronjobs/notice_unprocessed_suggestions.pl
misc/cronjobs/overdue_notices.pl
misc/cronjobs/patron_emailer.pl
misc/cronjobs/plugins_nightly.pl
misc/cronjobs/process_message_queue.pl
misc/cronjobs/purge_suggestions.pl
misc/cronjobs/reconcile_balances.pl
misc/cronjobs/rss/rss.pl
misc/cronjobs/runreport.pl
misc/cronjobs/serialsUpdate.pl
misc/cronjobs/share_usage_with_koha_community.pl
misc/cronjobs/sitemap.pl
misc/cronjobs/staticfines.pl
misc/cronjobs/stockrotation.pl
misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl
misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl
misc/cronjobs/update_patrons_category.pl
misc/cronjobs/update_totalissues.pl
misc/cronjobs/writeoff_debts.pl
misc/devel/add_missing_filters.pl
misc/devel/coverage.pl
misc/devel/create_superlibrarian.pl
misc/devel/get_prepared_letter.pl
misc/devel/install_plugins.pl
misc/devel/update_dbix_class_files.pl
misc/export_borrowers.pl
misc/export_records.pl
misc/exportauth.pl
misc/import_patrons.pl
misc/link_bibs_to_authorities.pl
misc/load_testing/benchmark_circulation.pl
misc/load_testing/benchmark_staff.pl
misc/load_testing/benchmark_webservices.pl
misc/load_yaml.pl
misc/maintenance/UNIMARC_fix_collectiontitle.pl
misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl
misc/maintenance/auth_show_hidden_data.pl
misc/maintenance/borrowers-force-messaging-defaults.pl
misc/maintenance/check_syspref_cache.pl
misc/maintenance/cmp_sysprefs.pl
misc/maintenance/fix_accountlines_date.pl
misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl
misc/maintenance/fix_mysql_constraints.pl
misc/maintenance/fix_tags_weight.pl
misc/maintenance/generate_MARC21Languages.pl
misc/maintenance/process_record_through_filter.pl
misc/maintenance/remove_items_from_biblioitems.pl
misc/maintenance/sanitize_records.pl
misc/maintenance/search_for_data_inconsistencies.pl
misc/maintenance/touch_all_biblios.pl
misc/maintenance/touch_all_items.pl
misc/maintenance/update_authorities.pl
misc/migration_tools/22_to_30/convert_to_utf8.pl
misc/migration_tools/22_to_30/export_Authorities.pl
misc/migration_tools/22_to_30/export_Authorities_xml.pl
misc/migration_tools/22_to_30/missing090field.pl
misc/migration_tools/22_to_30/move_marc_to_authheader.pl
misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
misc/migration_tools/22_to_30/rebuild_leader.pl
misc/migration_tools/22_to_30/rebuild_unimarc_100.pl
misc/migration_tools/buildCOUNTRY.pl
misc/migration_tools/buildEDITORS.pl
misc/migration_tools/buildLANG.pl
misc/migration_tools/build_oai_sets.pl
misc/migration_tools/bulkmarcimport.pl
misc/migration_tools/checkNonIndexedBiblios.pl
misc/migration_tools/create_analytical_rel.pl
misc/migration_tools/ifla/update.pl
misc/migration_tools/import_lexile.pl
misc/migration_tools/koha-svc.pl
misc/migration_tools/rebuild_zebra.pl
misc/migration_tools/remove_unused_authorities.pl
misc/migration_tools/switch_marc21_series_info.pl
misc/migration_tools/upgradeitems.pl
misc/mod_zebraqueue.pl
misc/recreateIssueStatistics.pl
misc/sax_parser_test.pl
misc/search_tools/export_elasticsearch_mappings.pl
misc/search_tools/rebuild_elasticsearch.pl
misc/stage_file.pl
misc/translator/LangInstaller.pm
misc/translator/TmplTokenizer.pm
misc/translator/VerboseWarnings.pm
misc/translator/tmpl_process3.pl
misc/translator/xgettext.pl
misc/z3950_responder.pl
offline_circ/download.pl
offline_circ/enqueue_koc.pl
offline_circ/list.pl
offline_circ/process.pl
offline_circ/process_koc.pl
offline_circ/service.pl
opac/clubs/clubs-tab.pl
opac/clubs/enroll.pl
opac/errors/400.pl
opac/errors/401.pl
opac/errors/402.pl
opac/errors/403.pl
opac/errors/404.pl
opac/errors/500.pl
opac/external/overdrive/auth.pl
opac/ilsdi.pl
opac/maintenance.pl
opac/opac-ISBDdetail.pl
opac/opac-MARCdetail.pl
opac/opac-account-pay-return.pl
opac/opac-account-pay.pl
opac/opac-account.pl
opac/opac-addbybiblionumber.pl
opac/opac-alert-subscribe.pl
opac/opac-article-request-cancel.pl
opac/opac-authorities-home.pl
opac/opac-authoritiesdetail.pl
opac/opac-basket.pl
opac/opac-blocked.pl
opac/opac-browse.pl
opac/opac-browser.pl
opac/opac-course-details.pl
opac/opac-course-reserves.pl
opac/opac-detail.pl
opac/opac-discharge.pl
opac/opac-downloadcart.pl
opac/opac-downloadshelf.pl
opac/opac-export.pl
opac/opac-holdshistory.pl
opac/opac-ics.pl
opac/opac-idref.pl
opac/opac-illrequests.pl
opac/opac-imageviewer.pl
opac/opac-issue-note.pl
opac/opac-library.pl
opac/opac-main.pl
opac/opac-memberentry.pl
opac/opac-messaging.pl
opac/opac-modrequest-suspend.pl
opac/opac-modrequest.pl
opac/opac-mymessages.pl
opac/opac-news-rss.pl
opac/opac-overdrive-search.pl
opac/opac-passwd.pl
opac/opac-password-recovery.pl
opac/opac-patron-consent.pl
opac/opac-patron-image.pl
opac/opac-privacy.pl
opac/opac-ratings-ajax.pl
opac/opac-ratings.pl
opac/opac-readingrecord.pl
opac/opac-recordedbooks-search.pl
opac/opac-registration-verify.pl
opac/opac-renew.pl
opac/opac-reportproblem.pl
opac/opac-request-article.pl
opac/opac-reserve.pl
opac/opac-restrictedpage.pl
opac/opac-retrieve-file.pl
opac/opac-review.pl
opac/opac-routing-lists.pl
opac/opac-search-history.pl
opac/opac-search.pl
opac/opac-sendbasket.pl
opac/opac-sendshelf.pl
opac/opac-serial-issues.pl
opac/opac-shareshelf.pl
opac/opac-shelves.pl
opac/opac-showmarc.pl
opac/opac-showreviews.pl
opac/opac-suggestions.pl
opac/opac-tags.pl
opac/opac-tags_subject.pl
opac/opac-topissues.pl
opac/opac-user.pl
opac/sci/sci-main.pl
opac/sco/help.pl
opac/sco/printslip.pl
opac/sco/sco-main.pl
opac/sco/sco-patron-image.pl
opac/svc/checkout_notes
opac/svc/shelfbrowser.pl
opac/tracklinks.pl
patron_lists/add-modify.pl
patron_lists/delete.pl
patron_lists/list.pl
patron_lists/lists.pl
patron_lists/patrons.pl
patroncards/add_user_search.pl
patroncards/create-pdf.pl
patroncards/edit-batch.pl
patroncards/edit-layout.pl
patroncards/edit-profile.pl
patroncards/edit-template.pl
patroncards/home.pl
patroncards/image-manage.pl
patroncards/manage.pl
patroncards/print.pl
plugins/plugins-enable.pl
plugins/plugins-home.pl
plugins/plugins-uninstall.pl
plugins/plugins-upload.pl
plugins/run.pl
pos/pay.pl
pos/printreceipt.pl
pos/register.pl
pos/registers.pl
reports/acquisitions_stats.pl
reports/bor_issues_top.pl
reports/borrowers_out.pl
reports/borrowers_stats.pl
reports/cash_register_stats.pl
reports/cat_issues_top.pl
reports/catalogue_out.pl
reports/catalogue_stats.pl
reports/dictionary.pl
reports/guided_reports.pl
reports/issues_avg_stats.pl
reports/issues_stats.pl
reports/itemslost.pl
reports/manager.pl
reports/orders_by_fund.pl
reports/reports-home.pl
reports/reserves_stats.pl
reports/serials_stats.pl
reserve/modrequest.pl
reserve/modrequest_suspendall.pl
reserve/placerequest.pl
reserve/request.pl
reviews/reviewswaiting.pl
rotating_collections/addItems.pl
rotating_collections/editCollections.pl
rotating_collections/rotatingCollections.pl
rotating_collections/transferCollection.pl
serials/acqui-search-result.pl
serials/acqui-search.pl
serials/add_user_search.pl
serials/checkexpiration.pl
serials/claims.pl
serials/create-numberpattern.pl
serials/lateissues-export.pl
serials/routing-preview.pl
serials/routing.pl
serials/serials-collection.pl
serials/serials-edit.pl
serials/serials-home.pl
serials/serials-search.pl
serials/showpredictionpattern.pl
serials/subscription-add.pl
serials/subscription-batchedit.pl
serials/subscription-bib-search.pl
serials/subscription-detail.pl
serials/subscription-frequencies.pl
serials/subscription-frequency.pl
serials/subscription-history.pl
serials/subscription-numberpattern.pl
serials/subscription-numberpatterns.pl
serials/subscription-renew.pl
serials/viewalerts.pl
services/itemrecorddisplay.pl
suggestion/add_user_search.pl
suggestion/suggestion.pl
svc/authorised_values
svc/cataloguing/automatic_linker.pl
svc/checkout_notes
svc/creator_batches
svc/problem_reports
t/Acquisition/CanUserManageBasket.t
t/Auth.t
t/Auth_with_shibboleth.t
t/AuthoritiesMarc_MARC21.t
t/AuthoritiesMarc_UNIMARC.t
t/Biblio.t
t/Biblio/TransformHtmlToXml.t
t/Biblio2.t
t/Budgets/CanUserModifyBudget.t
t/Budgets/CanUserUseBudget.t
t/Charset.t
t/Circulation/AgeRestrictionMarkers.t
t/Circulation_barcodedecode.t
t/ClassSortRoutine_Dewey.t
t/ClassSortRoutine_Generic.t
t/ClassSortRoutine_LCC.t
t/Creators.t
t/External/BakerTaylor.t
t/ImportBatch.t
t/Koha.t
t/Koha/Util/MARC.t
t/Koha/sleep.pl
t/Koha/wait.pl
t/Koha_Util_MARC.t
t/Labels.t
t/Labels_split_Regex.t
t/Labels_split_ddcn.t
t/Labels_split_lccn.t
t/Languages.t
t/Letters.t
t/Matcher.t
t/Members/cardnumber.t
t/Output.t
t/Prices.t
t/SIP/Sip.t
t/SMS.t
t/Scheduler.t
t/Scrubber.t
t/Search/History.t
t/Search/buildQuery.t
t/Serials/GetNextSeq.t
t/Serials/ModSerialStatus.t
t/SimpleMARC.t
t/SocialData.t
t/TmplToken.t
t/db_dependent/Accounts.t
t/db_dependent/Acquisition.t
t/db_dependent/Acquisition/CancelReceipt.t
t/db_dependent/Acquisition/GetBasketAsCSV.t
t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t
t/db_dependent/Acquisition/GetOrdersByBiblionumber.t
t/db_dependent/Acquisition/Invoices.t
t/db_dependent/Acquisition/NewOrder.t
t/db_dependent/Acquisition/OrderFromSubscription.t
t/db_dependent/Acquisition/OrderUsers.t
t/db_dependent/Acquisition/StandingOrders.t
t/db_dependent/Acquisition/TransferOrder.t
t/db_dependent/Acquisition/close_reopen_basket.t
t/db_dependent/Acquisition/populate_order_with_prices.t
t/db_dependent/Amazon.t
t/db_dependent/Auth.t
t/db_dependent/Auth/haspermission.t
t/db_dependent/Auth_with_cas.t
t/db_dependent/Auth_with_ldap.t
t/db_dependent/AuthoritiesMarc.t
t/db_dependent/Authority/Merge.t
t/db_dependent/BackgroundJob.t
t/db_dependent/Barcodes.t
t/db_dependent/Barcodes_ValueBuilder.t
t/db_dependent/Biblio.t
t/db_dependent/Biblio/Isbd.t
t/db_dependent/Biblio/ModBiblioMarc.t
t/db_dependent/Biblio/TransformHtmlToMarc.t
t/db_dependent/Biblio/TransformKohaToMarc.t
t/db_dependent/Biblio/TransformMarcToKoha.t
t/db_dependent/Budgets.t
t/db_dependent/Charset.t
t/db_dependent/Circulation.t
t/db_dependent/Circulation/Branch.t
t/db_dependent/Circulation/CalcDateDue.t
t/db_dependent/Circulation/CalcFine.t
t/db_dependent/Circulation/CheckIfIssuedToPatron.t
t/db_dependent/Circulation/CheckValidBarcode.t
t/db_dependent/Circulation/GetHardDueDate.t
t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t
t/db_dependent/Circulation/GetTopIssues.t
t/db_dependent/Circulation/IsItemIssued.t
t/db_dependent/Circulation/MarkIssueReturned.t
t/db_dependent/Circulation/OfflineOperation.t
t/db_dependent/Circulation/ReturnClaims.t
t/db_dependent/Circulation/Returns.t
t/db_dependent/Circulation/StoreLastBorrower.t
t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
t/db_dependent/Circulation/TooMany.t
t/db_dependent/Circulation/issue.t
t/db_dependent/Circulation/transferbook.t
t/db_dependent/Circulation/transfers.t
t/db_dependent/Contract.t
t/db_dependent/CourseReserves.t
t/db_dependent/CourseReserves/CourseItems.t
t/db_dependent/Creators/Lib.t
t/db_dependent/DecreaseLoanHighHolds.t
t/db_dependent/Exporter/Record.t
t/db_dependent/Filter_MARC_ViewPolicy.t
t/db_dependent/Fines.t
t/db_dependent/FrameworkPlugin.t
t/db_dependent/Heading.t
t/db_dependent/Heading_MARC21.t
t/db_dependent/Hold.t
t/db_dependent/Holds.t
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
t/db_dependent/Holds/HoldFulfillmentPolicy.t
t/db_dependent/Holds/HoldItemtypeLimit.t
t/db_dependent/Holds/LocalHoldsPriority.t
t/db_dependent/Holds/RevertWaitingStatus.t
t/db_dependent/Holds/WaitingReserves.t
t/db_dependent/HoldsQueue.t
t/db_dependent/Holidays.t
t/db_dependent/ILSDI_Services.t
t/db_dependent/Illrequests.t
t/db_dependent/ImportBatch.t
t/db_dependent/ImportExportFramework.t
t/db_dependent/Installer.t
t/db_dependent/Items.t
t/db_dependent/Items/AutomaticItemModificationByAge.t
t/db_dependent/Items/GetHostItemsInfo.t
t/db_dependent/Items/GetItemsForInventory.t
t/db_dependent/Items/MoveItemFromBiblio.t
t/db_dependent/Koha.t
t/db_dependent/Koha/Account/Line.t
t/db_dependent/Koha/Acquisition/Basket.t
t/db_dependent/Koha/Acquisition/Booksellers.t
t/db_dependent/Koha/Acquisition/Order.t
t/db_dependent/Koha/ActionLogs.t
t/db_dependent/Koha/Authorities.t
t/db_dependent/Koha/Biblio.t
t/db_dependent/Koha/Biblio/Metadata.t
t/db_dependent/Koha/Biblios.t
t/db_dependent/Koha/Charges/Fees.t
t/db_dependent/Koha/Checkouts.t
t/db_dependent/Koha/Club/Enrollment.t
t/db_dependent/Koha/Filter/EmbedItems.t
t/db_dependent/Koha/Filter/EmbedItemsAvailability.t
t/db_dependent/Koha/Holds.t
t/db_dependent/Koha/Item.t
t/db_dependent/Koha/ItemTypes.t
t/db_dependent/Koha/Items.t
t/db_dependent/Koha/Object.t
t/db_dependent/Koha/Patron/Category.t
t/db_dependent/Koha/Patrons.t
t/db_dependent/Koha/Plugins/Circulation_hooks.t
t/db_dependent/Koha/Plugins/Holds_hooks.t
t/db_dependent/Koha/Pseudonymization.t
t/db_dependent/Koha/SearchEngine/Indexer.t
t/db_dependent/Koha/Statistics.t
t/db_dependent/Koha/Z3950Responder/Session.t
t/db_dependent/Koha/Z3950Responder/Session2.t
t/db_dependent/Koha_Authority.t
t/db_dependent/Koha_ExternalContent_RecordedBooks.t
t/db_dependent/Labels/t_Batch.t
t/db_dependent/Languages.t
t/db_dependent/Letters.t
t/db_dependent/Letters/GetLettersAvailableForALibrary.t
t/db_dependent/Letters/TemplateToolkit.t
t/db_dependent/LibraryGroups.t
t/db_dependent/Linker_Default.t
t/db_dependent/Linker_FirstMatch.t
t/db_dependent/Log.t
t/db_dependent/MarcModificationTemplates.t
t/db_dependent/Members.t
t/db_dependent/Members/GetAllIssues.t
t/db_dependent/Members/IssueSlip.t
t/db_dependent/Members/Statistics.t
t/db_dependent/Message.t
t/db_dependent/MungeMarcPrice.t
t/db_dependent/OAI/AndSets.t
t/db_dependent/OAI/Server.t
t/db_dependent/OAI/Sets.t
t/db_dependent/Overdues.t
t/db_dependent/Passwordrecovery.t
t/db_dependent/Patron/Borrower_PrevCheckout.t
t/db_dependent/Patron/Messages.t
t/db_dependent/Patroncards.t
t/db_dependent/Record.t
t/db_dependent/Record/Record.t
t/db_dependent/Record/marcrecord2csv.t
t/db_dependent/Reports.t
t/db_dependent/Reports/Guided.t
t/db_dependent/Reserves.t
t/db_dependent/Reserves/AutoUnsuspendReserves.t
t/db_dependent/Reserves/CancelExpiredReserves.t
t/db_dependent/Reserves/GetReserveFee.t
t/db_dependent/Reserves/MultiplePerRecord.t
t/db_dependent/RotatingCollections.t
t/db_dependent/SIP/ILS.t
t/db_dependent/SIP/Message.t
t/db_dependent/SIP/SIPServer.t
t/db_dependent/SIP/Transaction.t
t/db_dependent/Search.t
t/db_dependent/Search/History.t
t/db_dependent/Serials.t
t/db_dependent/Serials/Claims.t
t/db_dependent/Serials/Frequency.t
t/db_dependent/Serials/GetFictiveIssueNumber.t
t/db_dependent/Serials/GetNextDate.t
t/db_dependent/Serials/GetNextSeq.t
t/db_dependent/Serials/Numberpattern.t
t/db_dependent/Serials/ReNewSubscription.t
t/db_dependent/Serials_2.t
t/db_dependent/ShelfBrowser.t
t/db_dependent/Stats.t
t/db_dependent/Suggestions.t
t/db_dependent/Tags.t
t/db_dependent/Templates.t
t/db_dependent/UsageStats.t
t/db_dependent/Utils/Datatables.t
t/db_dependent/Utils/Datatables_Virtualshelves.t
t/db_dependent/XISBN.t
t/db_dependent/XSLT.t
t/db_dependent/api/v1/auth.t
t/db_dependent/api/v1/checkouts.t
t/db_dependent/api/v1/holds.t
t/db_dependent/api/v1/return_claims.t
t/db_dependent/rollingloans.t
t/db_dependent/selenium/basic_workflow.t
t/db_dependent/selenium/regressions.t
t/db_dependent/www/regressions.t
t/db_dependent/zebra_config.pl
t/lib/Dates.pm
t/lib/Koha/BackgroundJob/BatchTest.pm
t/lib/Koha/Plugin/BadAPIRoute.pm
t/lib/Koha/Plugin/Test.pm
t/lib/Mocks.pm
t/lib/Selenium.pm
t/lib/TestBuilder.pm
tags/list.pl
tags/review.pl
tools/access_files.pl
tools/ajax-inventory.pl
tools/automatic_item_modification_by_age.pl
tools/background-job-progress.pl
tools/batchMod.pl
tools/batch_delete_records.pl
tools/batch_record_modification.pl
tools/batch_records_ajax.pl
tools/cleanborrowers.pl
tools/copy-holidays.pl
tools/csv-profiles.pl
tools/exceptionHolidays.pl
tools/export.pl
tools/holidays.pl
tools/import_borrowers.pl
tools/inventory.pl
tools/koha-news.pl
tools/letter.pl
tools/manage-marc-import.pl
tools/marc_modification_templates.pl
tools/modborrowers.pl
tools/newHolidays.pl
tools/overduerules.pl
tools/picture-upload.pl
tools/problem-reports.pl
tools/quotes-upload.pl
tools/quotes.pl
tools/scheduler.pl
tools/showdiffmarc.pl
tools/stage-marc-import.pl
tools/stockrotation.pl
tools/tools-home.pl
tools/upload-cover-image.pl
tools/upload-file.pl
tools/upload.pl
tools/viewlog.pl
virtualshelves/addbybiblionumber.pl
virtualshelves/downloadshelf.pl
virtualshelves/sendshelf.pl
virtualshelves/shelves.pl
xt/yaml_valid.pl

index 7d7ac76..ad0d34f 100644 (file)
@@ -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);
 
@@ -37,8 +34,8 @@ BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
     @EXPORT = qw(
-      &chargelostitem
-      &purge_zero_balance_fees
+      chargelostitem
+      purge_zero_balance_fees
     );
 }
 
index 1d6f350..3d74f84 100644 (file)
@@ -19,13 +19,13 @@ package C4::Acquisition;
 
 
 use Modern::Perl;
-use Carp;
+use Carp qw( carp croak );
 use Text::CSV_XS;
 use C4::Context;
-use C4::Suggestions;
-use C4::Biblio;
-use C4::Contract;
-use C4::Log qw(logaction);
+use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
+use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure 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;
@@ -42,60 +42,58 @@ use Koha::Patrons;
 use C4::Koha;
 
 use MARC::Field;
-use MARC::Record;
-use JSON qw(to_json);
+use JSON qw( to_json );
 
-use Time::localtime;
-
-use vars qw(@ISA @EXPORT);
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
-    @ISA    = qw(Exporter);
-    @EXPORT = qw(
-        &GetBasket &NewBasket &ReopenBasket &ModBasket
-        &GetBasketAsCSV &GetBasketGroupAsCSV
-        &GetBasketsByBookseller &GetBasketsByBasketgroup
-        &GetBasketsInfosByBookseller
-
-        &GetBasketUsers &ModBasketUsers
-        &CanUserManageBasket
-
-        &ModBasketHeader
-
-        &ModBasketgroup &NewBasketgroup &DelBasketgroup &GetBasketgroup &CloseBasketgroup
-        &GetBasketgroups &ReOpenBasketgroup
-
-        &ModOrder &GetOrder &GetOrders &GetOrdersByBiblionumber
-        &GetOrderFromItemnumber
-        &SearchOrders &GetHistory &GetRecentAcqui
-        &ModReceiveOrder &CancelReceipt
-        &TransferOrder
-        &ModItemOrder
-
-        &GetParcels
-
-        &GetInvoices
-        &GetInvoice
-        &GetInvoiceDetails
-        &AddInvoice
-        &ModInvoice
-        &CloseInvoice
-        &ReopenInvoice
-        &DelInvoice
-        &MergeInvoices
-
-        &AddClaim
-        &GetBiblioCountByBasketno
-
-        &GetOrderUsers
-        &ModOrderUsers
-        &NotifyOrderUsers
-
-        &FillWithDefaultValues
-
-        &get_rounded_price
-        &get_rounding_sql
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+      GetBasket NewBasket ReopenBasket ModBasket
+      GetBasketAsCSV GetBasketGroupAsCSV
+      GetBasketsByBookseller GetBasketsByBasketgroup
+      GetBasketsInfosByBookseller
+
+      GetBasketUsers ModBasketUsers
+      CanUserManageBasket
+
+      ModBasketHeader
+
+      ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroup CloseBasketgroup
+      GetBasketgroups ReOpenBasketgroup
+
+      ModOrder GetOrder GetOrders GetOrdersByBiblionumber
+      GetOrderFromItemnumber
+      SearchOrders GetHistory GetRecentAcqui
+      ModReceiveOrder CancelReceipt
+      populate_order_with_prices
+      TransferOrder
+      ModItemOrder
+
+      GetParcels
+
+      GetInvoices
+      GetInvoice
+      GetInvoiceDetails
+      AddInvoice
+      ModInvoice
+      CloseInvoice
+      ReopenInvoice
+      DelInvoice
+      MergeInvoices
+
+      AddClaim
+      GetBiblioCountByBasketno
+
+      GetOrderUsers
+      ModOrderUsers
+      NotifyOrderUsers
+
+      FillWithDefaultValues
+
+      get_rounded_price
+      get_rounding_sql
     );
 }
 
index 4ca4935..133cb03 100644 (file)
@@ -19,14 +19,11 @@ 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;
 
-require Exporter;
 use C4::Context;
 use C4::Templates;    # to get the template
 use C4::Languages;
@@ -34,25 +31,25 @@ use C4::Search::History;
 use Koha;
 use Koha::Logger;
 use Koha::Caches;
-use Koha::AuthUtils qw(get_script_name hash_password);
+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 C4::Auth_with_shibboleth;
+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 C4::Log qw( logaction );
 
 # use utf8;
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $ldap $cas $caslogout);
 
+use vars qw($ldap $cas $caslogout);
+our (@ISA, @EXPORT_OK);
 BEGIN {
     sub psgi_env { any { /^psgi\./ } keys %ENV }
 
@@ -63,12 +60,15 @@ BEGIN {
 
     C4::Context->set_remote_address;
 
-    @ISA       = qw(Exporter);
-    @EXPORT    = qw(&checkauth &get_template_and_user &haspermission &get_user_subpermissions);
-    @EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash
-      &get_all_subpermissions &get_user_subpermissions track_login_daily &in_iprange
+    require Exporter;
+    @ISA = qw(Exporter);
+
+    @EXPORT_OK = qw(
+      checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
+      get_all_subpermissions get_user_subpermissions track_login_daily in_iprange
+      get_template_and_user haspermission
     );
-    %EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] );
+
     $ldap      = C4::Context->config('useldapserver') || 0;
     $cas       = C4::Context->preference('casAuthentication');
     $caslogout = C4::Context->preference('casLogout');
index 855766b..8c922ec 100644 (file)
@@ -21,20 +21,19 @@ use strict;
 use warnings;
 
 use C4::Context;
-use Koha::AuthUtils qw(get_script_name);
+use Koha::AuthUtils qw( get_script_name );
 use Authen::CAS::Client;
 use CGI qw ( -utf8 );
-use FindBin;
 use YAML::XS;
 
 use Koha::Logger;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+our (@ISA, @EXPORT_OK);
 
 BEGIN {
     require Exporter;
     @ISA   = qw(Exporter);
-    @EXPORT = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required);
+    @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required);
 }
 my $defaultcasserver;
 my $casservers;
index 296f409..7f6c99a 100644 (file)
@@ -18,23 +18,21 @@ package C4::Auth_with_ldap;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Carp;
+use Carp qw( croak );
 
 use C4::Context;
 use C4::Members::Messaging;
-use C4::Auth qw(checkpw_internal);
+use C4::Auth qw( checkpw_internal );
 use Koha::Patrons;
-use Koha::AuthUtils qw(hash_password);
-use List::MoreUtils qw( any );
+use Koha::AuthUtils qw( hash_password );
 use Net::LDAP;
 use Net::LDAP::Filter;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
        require Exporter;
        @ISA    = qw(Exporter);
-       @EXPORT = qw( checkpw_ldap );
+       @EXPORT_OK = qw( checkpw_ldap );
 }
 
 # Redefine checkpw_ldap:
index e3af9eb..e214a53 100644 (file)
@@ -20,22 +20,20 @@ package C4::Auth_with_shibboleth;
 use Modern::Perl;
 
 use C4::Context;
-use Koha::AuthUtils qw(get_script_name);
+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 Koha::Logger;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA     = qw(Exporter);
-    @EXPORT =
+    @EXPORT_OK =
       qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
 }
 
index 1bb808b..2b31146 100644 (file)
@@ -21,13 +21,12 @@ package C4::AuthoritiesMarc;
 use strict;
 use warnings;
 use C4::Context;
-use MARC::Record;
-use C4::Biblio;
-use C4::Search;
+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;
-use C4::Log;
+use C4::Charset qw( SetUTF8Flag );
+use C4::Log qw( logaction );
 use Koha::MetadataRecord::Authority;
 use Koha::Authorities;
 use Koha::Authority::MergeRequests;
@@ -38,35 +37,38 @@ use Koha::SearchEngine;
 use Koha::SearchEngine::Indexer;
 use Koha::SearchEngine::Search;
 
-use vars qw(@ISA @EXPORT);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
 
-       require Exporter;
-       @ISA = qw(Exporter);
-       @EXPORT = qw(
-           &GetTagsLabels
-       &GetAuthMARCFromKohaField 
-
-       &AddAuthority
-       &ModAuthority
-       &DelAuthority
-       &GetAuthority
-       &GetAuthorityXML
-
-       &SearchAuthorities
-    
-        &BuildSummary
-        &BuildAuthHierarchies
-        &BuildAuthHierarchy
-        &GenerateHierarchy
-    
-       &merge
-       &FindDuplicateAuthority
-
-        &GuessAuthTypeCode
-        &GuessAuthId
-       );
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+      GetTagsLabels
+      GetAuthMARCFromKohaField
+
+      AddAuthority
+      ModAuthority
+      DelAuthority
+      GetAuthority
+      GetAuthorityXML
+
+      SearchAuthorities
+
+      BuildSummary
+      BuildAuthHierarchies
+      BuildAuthHierarchy
+      GenerateHierarchy
+      GetHeaderAuthority
+      AddAuthorityTrees
+      CompareFieldWithAuthority
+
+      merge
+      FindDuplicateAuthority
+
+      GuessAuthTypeCode
+      GuessAuthId
+      compare_fields
+    );
 }
 
 
index c704a68..c3c6f84 100644 (file)
@@ -18,7 +18,6 @@ package C4::AuthoritiesMarc::MARC21;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use MARC::Record;
 
 =head1 NAME
 
index 48683f9..733f72e 100644 (file)
@@ -20,7 +20,7 @@ package C4::BackgroundJob;
 
 use Modern::Perl;
 use C4::Context;
-use C4::Auth qw/get_session/;
+use C4::Auth qw( get_session );
 use Digest::MD5;
 
 
index bd50054..957d60f 100644 (file)
@@ -20,7 +20,7 @@ package C4::Barcodes;
 use strict;
 use warnings;
 
-use Carp;
+use Carp qw( carp );
 
 use C4::Context;
 use C4::Barcodes::hbyymmincr;
@@ -28,15 +28,8 @@ use C4::Barcodes::annual;
 use C4::Barcodes::incremental;
 use C4::Barcodes::EAN13;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 use vars qw($max $prefformat);
 
-BEGIN {
-       require Exporter;
-    @ISA = qw(Exporter);
-    @EXPORT_OK = qw();
-}
-
 sub _prefformat {
        unless (defined $prefformat) {
                unless ($prefformat = C4::Context->preference('autoBarcode')) {
index c691b0e..7927d19 100644 (file)
@@ -22,8 +22,8 @@ use warnings;
 
 use C4::Context;
 
-use Algorithm::CheckDigits;
-use Carp;
+use Algorithm::CheckDigits qw( CheckDigits );
+use Carp qw( carp );
 
 use vars qw(@ISA);
 
index b0d46c1..0d7e05a 100644 (file)
@@ -20,11 +20,11 @@ package C4::Barcodes::annual;
 use strict;
 use warnings;
 
-use Carp;
+use Carp qw( carp );
 
 use C4::Context;
 
-use Koha::DateUtils qw( output_pref dt_from_string );
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 use vars qw(@ISA);
 use vars qw($width);
index 28cb3f8..bd345a6 100644 (file)
@@ -19,7 +19,7 @@ package C4::Barcodes::hbyymmincr;
 
 use Modern::Perl;
 
-use Carp;
+use Carp qw( carp );
 
 use C4::Context;
 
index 8aeef65..ebebe41 100644 (file)
@@ -21,12 +21,12 @@ package C4::Biblio;
 
 use Modern::Perl;
 
-use vars qw(@ISA @EXPORT);
+use vars qw(@ISA @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
 
-    @EXPORT = qw(
+    @EXPORT_OK = qw(
         AddBiblio
         GetBiblioData
         GetMarcBiblio
@@ -45,6 +45,7 @@ BEGIN {
         GetMarcQuantity
         GetAuthorisedValueDesc
         GetMarcStructure
+        GetMarcSubfieldStructure
         IsMarcStructureInternal
         GetMarcFromKohaField
         GetMarcSubfieldStructureFromKohaField
@@ -54,6 +55,7 @@ BEGIN {
         CountItemsIssued
         ModBiblio
         ModZebra
+        EmbedItemsInMarcBiblio
         UpdateTotalIssues
         RemoveAllNsb
         DelBiblio
@@ -63,35 +65,42 @@ BEGIN {
         TransformHtmlToMarc
         TransformHtmlToXml
         prepare_host_field
+        TransformMarcToKohaOneField
     );
 
     # Internal functions
     # those functions are exported but should not be used
     # they are useful in a few circumstances, so they are exported,
     # but don't use them unless you are a core developer ;-)
-    push @EXPORT, qw(
+    push @EXPORT_OK, qw(
       ModBiblioMarc
     );
 }
 
-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::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;
-use C4::Charset;
+use C4::ClassSource qw( GetClassSort );
+use C4::Charset qw(
+    nsb_clean
+    SetMarcUnicodeFlag
+    SetUTF8Flag
+    StripNonXmlChars
+);
 use C4::Linker;
 use C4::OAI::Sets;
+use C4::Items qw( GetHiddenItemnumbers GetMarcItem );
 
 use Koha::Logger;
 use Koha::Caches;
@@ -2572,7 +2581,6 @@ sub EmbedItemsInMarcBiblio {
     my $opachiddenitems = $opac
       && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
 
-    require C4::Items;
     while ( my ($itemnumber) = $sth->fetchrow_array ) {
         next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
         my $item;
index 6b103b3..ce99efe 100644 (file)
@@ -22,22 +22,21 @@ use strict;
 use warnings;
 
 use C4::Biblio;
-use C4::Koha;
-use C4::Charset;
+use C4::Koha qw( GetNormalizedISBN );
+use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
 use MARC::File::USMARC;
 use MARC::Field;
-use C4::ImportBatch;
+use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch );
 use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority
 use C4::Languages;
 use Koha::Database;
 use Koha::XSLT::Base;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA = qw(Exporter);
-    @EXPORT = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth);
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(BreedingSearch Z3950Search Z3950SearchAuth);
 }
 
 =head1 NAME
index 15d7e0e..888bd7b 100644 (file)
@@ -23,54 +23,61 @@ use Koha::Database;
 use Koha::Patrons;
 use Koha::Acquisition::Invoice::Adjustments;
 use C4::Acquisition;
-use vars qw(@ISA @EXPORT);
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-
-        &GetBudget
-        &GetBudgetByOrderNumber
-        &GetBudgetByCode
-        &GetBudgets
-        &BudgetsByActivity
-        &GetBudgetsReport
-        &GetBudgetReport
-        &GetBudgetHierarchy
-           &AddBudget
-        &ModBudget
-        &DelBudget
-        &GetBudgetSpent
-        &GetBudgetOrdered
-        &GetBudgetName
-        &GetPeriodsCount
-        GetBudgetHierarchySpent
-        GetBudgetHierarchyOrdered
-
-        &GetBudgetUsers
-        &ModBudgetUsers
-        &CanUserUseBudget
-        &CanUserModifyBudget
-
-           &GetBudgetPeriod
-        &GetBudgetPeriods
-        &ModBudgetPeriod
-        &AddBudgetPeriod
-           &DelBudgetPeriod
-
-        &ModBudgetPlan
-
-               &GetBudgetsPlanCell
-        &AddBudgetPlanValue
-        &GetBudgetAuthCats
-        &BudgetHasChildren
-        &CheckBudgetParent
-        &CheckBudgetParentPerm
-
-        &HideCols
-        &GetCols
-       );
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+
+      GetBudget
+      GetBudgetByOrderNumber
+      GetBudgetByCode
+      GetBudgets
+      BudgetsByActivity
+      GetBudgetsReport
+      GetBudgetReport
+      GetBudgetsByActivity
+      GetBudgetHierarchy
+      AddBudget
+      ModBudget
+      DelBudget
+      GetBudgetSpent
+      GetBudgetOrdered
+      GetBudgetName
+      GetPeriodsCount
+      GetBudgetHierarchySpent
+      GetBudgetHierarchyOrdered
+
+      GetBudgetUsers
+      ModBudgetUsers
+      CanUserUseBudget
+      CanUserModifyBudget
+
+      GetBudgetPeriod
+      GetBudgetPeriods
+      ModBudgetPeriod
+      AddBudgetPeriod
+      DelBudgetPeriod
+
+      ModBudgetPlan
+
+      GetBudgetsPlanCell
+      AddBudgetPlanValue
+      GetBudgetAuthCats
+      BudgetHasChildren
+      GetBudgetChildren
+      SetOwnerToFundHierarchy
+      CheckBudgetParent
+      CheckBudgetParentPerm
+
+      HideCols
+      GetCols
+
+      CloneBudgetPeriod
+      CloneBudgetHierarchy
+      MoveOrders
+    );
 }
 
 # ----------------------------BUDGETS.PM-----------------------------";
index 6a5d8a7..257119c 100644 (file)
@@ -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;
index c215a56..e780cef 100644 (file)
@@ -19,19 +19,18 @@ package C4::Charset;
 
 use Modern::Perl;
 
-use MARC::Charset qw/marc8_to_utf8/;
+use MARC::Charset;
 use Text::Iconv;
-use Unicode::Normalize;
-use Encode qw( decode encode is_utf8 );
+use Unicode::Normalize qw( NFC NFD );
+use Encode;
 
 use Koha::Logger;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
-    @EXPORT = qw(
+    @EXPORT_OK = qw(
         NormalizeString
         IsStringUTF8ish
         MarcToUTF8Record
index 330b1bb..0549230 100644 (file)
@@ -24,32 +24,31 @@ use POSIX qw( floor );
 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::Reserves;
-use C4::Biblio;
-use C4::Items;
-use C4::Members;
+use C4::Stats qw( UpdateStats );
+use C4::Reserves qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority RevertWaitingStatus IsItemOnHoldAndFound IsAvailableForItemLevelRequest );
+use C4::Biblio qw( UpdateTotalIssues );
+use C4::Items qw( ModItemTransfer ModDateLastSeen CartToShelf );
 use C4::Accounts;
 use C4::ItemCirculationAlertPreference;
 use C4::Message;
-use C4::Log; # logaction
-use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units);
+use C4::Log qw( logaction ); # logaction
+use C4::Overdues;
 use C4::RotatingCollections qw(GetCollectionItemBranches);
-use Algorithm::CheckDigits;
+use Algorithm::CheckDigits qw( CheckDigits );
 
-use Data::Dumper;
+use Data::Dumper qw( Dumper );
 use Koha::Account;
 use Koha::AuthorisedValues;
 use Koha::Biblioitems;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Calendar;
 use Koha::Checkouts;
 use Koha::Illrequests;
 use Koha::Items;
 use Koha::Patrons;
-use Koha::Patron::Debarments;
+use Koha::Patron::Debarments qw( DelUniqueDebarment GetDebarments );
 use Koha::Database;
 use Koha::Libraries;
 use Koha::Account::Lines;
@@ -62,77 +61,68 @@ 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 vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+use Date::Calc qw( Date_to_Days );
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA    = qw(Exporter);
-
-       # FIXME subs that should probably be elsewhere
-       push @EXPORT, qw(
-               &barcodedecode
-        &LostItem
-        &ReturnLostItem
-        &GetPendingOnSiteCheckouts
-       );
-
-       # subs to deal with issuing a book
-       push @EXPORT, qw(
-               &CanBookBeIssued
-               &CanBookBeRenewed
-               &AddIssue
-               &AddRenewal
-               &GetRenewCount
-        &GetSoonestRenewDate
-        &GetLatestAutoRenewDate
-               &GetIssuingCharges
-        &GetBranchBorrowerCircRule
-        &GetBranchItemRule
-               &GetOpenIssue
-        &CheckIfIssuedToPatron
-        &IsItemIssued
-        GetTopIssues
-       );
-
-       # subs to deal with returns
-       push @EXPORT, qw(
-               &AddReturn
-        &MarkIssueReturned
-       );
-
-       # subs to deal with transfers
-       push @EXPORT, qw(
-               &transferbook
-               &GetTransfers
-               &GetTransfersFromTo
-               &updateWrongTransfer
-                &IsBranchTransferAllowed
-                &CreateBranchTransferLimit
-                &DeleteBranchTransferLimits
-        &TransferSlip
-       );
-
-    # subs to deal with offline circulation
-    push @EXPORT, qw(
-      &GetOfflineOperations
-      &GetOfflineOperation
-      &AddOfflineOperation
-      &DeleteOfflineOperation
-      &ProcessOfflineOperation
+
+    require Exporter;
+    @ISA = qw(Exporter);
+
+    # FIXME subs that should probably be elsewhere
+    push @EXPORT_OK, qw(
+      barcodedecode
+      LostItem
+      ReturnLostItem
+      GetPendingOnSiteCheckouts
+
+      CanBookBeIssued
+      checkHighHolds
+      CanBookBeRenewed
+      AddIssue
+      GetLoanLength
+      GetHardDueDate
+      AddRenewal
+      GetRenewCount
+      GetSoonestRenewDate
+      GetLatestAutoRenewDate
+      GetIssuingCharges
+      AddIssuingCharge
+      GetBranchBorrowerCircRule
+      GetBranchItemRule
+      GetBiblioIssues
+      GetOpenIssue
+      GetUpcomingDueIssues
+      CheckIfIssuedToPatron
+      IsItemIssued
+      GetAgeRestriction
+      GetTopIssues
+
+      AddReturn
+      MarkIssueReturned
+
+      transferbook
+      TooMany
+      GetTransfers
+      GetTransfersFromTo
+      updateWrongTransfer
+      CalcDateDue
+      CheckValidBarcode
+      IsBranchTransferAllowed
+      CreateBranchTransferLimit
+      DeleteBranchTransferLimits
+      TransferSlip
+
+      GetOfflineOperations
+      GetOfflineOperation
+      AddOfflineOperation
+      DeleteOfflineOperation
+      ProcessOfflineOperation
+      ProcessOfflinePayment
     );
+    push @EXPORT_OK, '_GetCircControlBranch';    # This is wrong!
 }
 
 =head1 NAME
index 77826cf..248baa7 100644 (file)
@@ -20,12 +20,18 @@ package C4::ClassSortRoutine;
 use strict;
 use warnings;
 
-require Exporter;
 use Class::Factory::Util;
 use C4::Context;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(
+       GetSortRoutineNames
+       GetClassSortKey
+    );
+}
 
 =head1 NAME 
 
@@ -40,12 +46,6 @@ use C4::ClassSortRoutine;
 
 =cut
 
-@ISA    = qw(Exporter);
-@EXPORT = qw(
-   &GetSortRoutineNames
-   &GetClassSortKey
-);
-
 # initialization code
 my %loaded_routines = ();
 my @sort_routines = GetSortRoutineNames();
index 111bafb..eedf4ed 100644 (file)
@@ -28,7 +28,7 @@ C4::ClassSortRoutine::Dewey - generic call number sorting key routine
 
 =head1 SYNOPSIS
 
-use C4::ClassSortRoutine;
+use C4::ClassSortRoutine qw( GetClassSortKey );
 
 my $cn_sort = GetClassSortKey('Dewey', $cn_class, $cn_item);
 
index 8b7d890..665dd53 100644 (file)
@@ -28,7 +28,7 @@ C4::ClassSortRoutine::Generic - generic call number sorting key routine
 
 =head1 SYNOPSIS
 
-use C4::ClassSortRoutine;
+use C4::ClassSortRoutine qw( GetClassSortKey );
 
 my $cn_sort = GetClassSortKey('Generic', $cn_class, $cn_item);
 
index 5f9c8f9..b943fb6 100644 (file)
@@ -30,7 +30,7 @@ C4::ClassSortRoutine::LCC - generic call number sorting key routine
 
 =head1 SYNOPSIS
 
-use C4::ClassSortRoutine;
+use C4::ClassSortRoutine qw( GetClassSortKey );
 
 my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item);
 
index 8c133bc..e948791 100644 (file)
@@ -20,12 +20,20 @@ package C4::ClassSource;
 use strict;
 use warnings;
 
-require Exporter;
 use C4::Context;
-use C4::ClassSortRoutine;
-
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+use C4::ClassSortRoutine qw( GetClassSortKey );
+
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(
+        GetClassSources
+        GetClassSource
+        GetClassSortRule
+        GetClassSort
+    );
+}
 
 =head1 NAME
 
@@ -44,17 +52,6 @@ sources and sorting rules.
 
 =cut
 
-
-@ISA    = qw(Exporter);
-@EXPORT = qw(
-    &GetClassSources
-    &GetClassSource
-    &GetClassSortRule
-
-    &GetClassSort
-
-);
-
 =head2 GetClassSources
 
   my $sources = GetClassSources();
index cfa8403..ed6f665 100644 (file)
@@ -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);
 
@@ -39,7 +38,7 @@ use C4::ClassSplitRoutine;
 
 @ISA    = qw(Exporter);
 @EXPORT = qw(
-   &GetSplitRoutineNames
+   GetSplitRoutineNames
 );
 
 =head2 GetSplitRoutineNames
index db896ad..63187bf 100644 (file)
@@ -35,12 +35,11 @@ BEGIN {
     }
 };
 
-use Carp;
+use Carp qw( carp );
 use DateTime::TimeZone;
 use Encode;
 use File::Spec;
-use Module::Load::Conditional qw(can_load);
-use POSIX ();
+use POSIX;
 use YAML::XS;
 use ZOOM;
 
index 13b9538..2630af4 100644 (file)
@@ -25,14 +25,14 @@ use vars qw(@ISA @EXPORT);
 
 BEGIN {
     require Exporter;
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-        &GetContracts
-        &GetContract
-        &AddContract
-        &ModContract
-        &DelContract
-       );
+    @ISA    = qw(Exporter);
+    @EXPORT = qw(
+      GetContracts
+      GetContract
+      AddContract
+      ModContract
+      DelContract
+    );
 }
 
 =head1 NAME
index 7794534..7f9a4aa 100644 (file)
@@ -17,43 +17,42 @@ package C4::CourseReserves;
 
 use Modern::Perl;
 
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 use C4::Context;
-use C4::Circulation qw(GetOpenIssue);
+use C4::Circulation qw( GetOpenIssue );
 
 use Koha::Courses;
 use Koha::Course::Instructors;
 use Koha::Course::Items;
 use Koha::Course::Reserves;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS @FIELDS);
-
+use vars qw(@FIELDS);
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA       = qw(Exporter);
     @EXPORT_OK = qw(
-      &GetCourse
-      &ModCourse
-      &GetCourses
-      &DelCourse
+      GetCourse
+      ModCourse
+      GetCourses
+      DelCourse
 
-      &GetCourseInstructors
-      &ModCourseInstructors
+      GetCourseInstructors
+      ModCourseInstructors
 
-      &GetCourseItem
-      &ModCourseItem
+      GetCourseItem
+      ModCourseItem
 
-      &GetCourseReserve
-      &ModCourseReserve
-      &GetCourseReserves
-      &DelCourseReserve
+      GetCourseReserve
+      ModCourseReserve
+      GetCourseReserves
+      DelCourseReserve
 
-      &SearchCourses
+      SearchCourses
 
-      &GetItemCourseReservesInfo
+      GetItemCourseReservesInfo
     );
-    %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
 
     @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
 }
index 2704322..de81a8b 100644 (file)
@@ -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;
 }
 
index f64d871..d4831ab 100644 (file)
@@ -18,7 +18,7 @@ package C4::Creators::Lib;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Storable qw(dclone);
+use Storable qw( dclone );
 
 use autouse 'Data::Dumper' => qw(Dumper);
 
index 9796feb..e90b0bd 100644 (file)
@@ -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 List::Util qw( first );
 
 
 sub _InitVars {
index 2b2ab92..cd1de40 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use autouse 'Data::Dumper' => qw(Dumper);
 
 use C4::Context;
-use C4::Creators::Lib qw(get_unit_values);
+use C4::Creators::Lib qw( get_unit_values );
 
 
 sub _check_params {
index 30d27dd..1636c16 100644 (file)
@@ -2,12 +2,12 @@ package C4::Creators::Template;
 
 use strict;
 use warnings;
-use POSIX qw(ceil);
+use POSIX qw( ceil );
 use autouse 'Data::Dumper' => qw(Dumper);
 
 use C4::Context;
 use C4::Creators::Profile;
-use C4::Creators::Lib qw(get_unit_values);
+use C4::Creators::Lib qw( get_unit_values );
 
 
 sub _check_params {
index d6957d8..13b2b53 100644 (file)
@@ -19,21 +19,20 @@ package C4::External::BakerTaylor;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use XML::Simple;
-use LWP::Simple;
-use HTTP::Request::Common;
+use LWP::Simple qw( get );
 
 use C4::Context;
 
 use Modern::Perl;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
+use vars qw(%EXPORT_TAGS $VERSION);
+our (@ISA, @EXPORT_OK);
 
 BEGIN {
-       require Exporter;
-       @ISA = qw(Exporter);
+    require Exporter;
+    @ISA = qw(Exporter);
     $VERSION = 3.07.00.049;
-       @EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link);
-       %EXPORT_TAGS = (all=>\@EXPORT_OK);
+    @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
 }
 
 # These variables are plack safe: they are initialized each time
index 897e2b3..efc663f 100644 (file)
@@ -21,7 +21,7 @@ use strict;
 use warnings;
 
 use Koha;
-use JSON;
+use JSON qw( from_json );
 use Koha::Caches;
 use HTTP::Request;
 use HTTP::Request::Common;
index 0570d0f..7788ee5 100644 (file)
@@ -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 <http://www.gnu.org/licenses>.
 
-use XML::Simple;
+use XML::Simple qw( XMLout );
 use XML::LibXML;
-use LWP::Simple;
+use LWP::Simple qw( $ua );
 use LWP::UserAgent;
-use HTTP::Request::Common;
 
 use strict;
 use warnings;
@@ -32,13 +31,13 @@ BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
     @EXPORT = qw(
-        &get_syndetics_index
-        &get_syndetics_summary
-        &get_syndetics_toc
-        &get_syndetics_editions
-        &get_syndetics_excerpt
-        &get_syndetics_reviews
-        &get_syndetics_anotes
+        get_syndetics_index
+        get_syndetics_summary
+        get_syndetics_toc
+        get_syndetics_editions
+        get_syndetics_excerpt
+        get_syndetics_reviews
+        get_syndetics_anotes
     );
 }
 
index c65c127..bd4eed2 100644 (file)
@@ -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
index 6a1a334..b021447 100644 (file)
@@ -19,7 +19,6 @@ package C4::Heading::MARC21;
 
 use strict;
 use warnings;
-use MARC::Record;
 use MARC::Field;
 
 
index b998433..9767f75 100644 (file)
@@ -20,7 +20,6 @@ package C4::Heading::UNIMARC;
 use 5.010;
 use strict;
 use warnings;
-use MARC::Record;
 use MARC::Field;
 use C4::Context;
 
index 3774214..06b0b2a 100644 (file)
@@ -24,29 +24,26 @@ use warnings;
 
 use C4::Context;
 use C4::Search;
-use C4::Items;
-use C4::Circulation;
-use C4::Members;
-use C4::Biblio;
-use Koha::DateUtils;
+use C4::Circulation qw( GetTransfers GetBranchItemRule );
+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 );
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
     @EXPORT_OK = qw(
-        &CreateQueue
-        &GetHoldsQueueItems
+        CreateQueue
+        GetHoldsQueueItems
 
-        &TransportCostMatrix
-        &UpdateTransportCostMatrix
+        TransportCostMatrix
+        UpdateTransportCostMatrix
+        GetPendingHoldRequestsForBib
      );
 }
 
index a28c382..54ef783 100644 (file)
@@ -21,19 +21,17 @@ use strict;
 use warnings;
 
 use C4::Members;
-use C4::Items;
-use C4::Circulation;
+use C4::Items qw( get_hostitemnumbers_of );
+use C4::Circulation qw( CanBookBeRenewed barcodedecode CanBookBeIssued AddRenewal );
 use C4::Accounts;
-use C4::Biblio;
-use C4::Reserves qw(AddReserve CanBookBeReserved CanItemBeReserved IsAvailableForItemLevelRequest);
+use C4::Biblio qw( GetMarcBiblio );
+use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved );
 use C4::Context;
-use C4::AuthoritiesMarc;
-use XML::Simple;
-use HTML::Entities;
+use C4::Auth;
 use CGI qw ( -utf8 );
 use DateTime;
 use C4::Auth;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 use Koha::Biblios;
 use Koha::Checkouts;
index 2a5696d..9a4978f 100644 (file)
@@ -21,67 +21,78 @@ use strict;
 use warnings;
 
 use C4::Context;
-use C4::Koha;
-use C4::Biblio;
-use C4::Items;
-use C4::Charset;
+use C4::Koha qw( GetNormalizedISBN );
+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;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-    GetZ3950BatchId
-    GetWebserviceBatchId
-    GetImportRecordMarc
-    GetImportRecordMarcXML
-    AddImportBatch
-    GetImportBatch
-    AddAuthToBatch
-    AddBiblioToBatch
-    AddItemsToImportBiblio
-    ModAuthorityInBatch
-    ModBiblioInBatch
-
-    BatchStageMarcRecords
-    BatchFindDuplicates
-    BatchCommitRecords
-    BatchRevertRecords
-    CleanBatch
-    DeleteBatch
-
-    GetAllImportBatches
-    GetStagedWebserviceBatches
-    GetImportBatchRangeDesc
-    GetNumberOfNonZ3950ImportBatches
-    GetImportBiblios
-    GetImportRecordsRange
-       GetItemNumbersFromImportBatch
-    
-    GetImportBatchStatus
-    SetImportBatchStatus
-    GetImportBatchOverlayAction
-    SetImportBatchOverlayAction
-    GetImportBatchNoMatchAction
-    SetImportBatchNoMatchAction
-    GetImportBatchItemAction
-    SetImportBatchItemAction
-    GetImportBatchMatcher
-    SetImportBatchMatcher
-    GetImportRecordOverlayStatus
-    SetImportRecordOverlayStatus
-    GetImportRecordStatus
-    SetImportRecordStatus
-    SetMatchedBiblionumber
-    GetImportRecordMatches
-    SetImportRecordMatches
-       );
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+      GetZ3950BatchId
+      GetWebserviceBatchId
+      GetImportRecordMarc
+      GetImportRecordMarcXML
+      GetRecordFromImportBiblio
+      AddImportBatch
+      GetImportBatch
+      AddAuthToBatch
+      AddBiblioToBatch
+      AddItemsToImportBiblio
+      ModAuthorityInBatch
+      ModBiblioInBatch
+
+      BatchStageMarcRecords
+      BatchFindDuplicates
+      BatchCommitRecords
+      BatchRevertRecords
+      CleanBatch
+      DeleteBatch
+
+      GetAllImportBatches
+      GetStagedWebserviceBatches
+      GetImportBatchRangeDesc
+      GetNumberOfNonZ3950ImportBatches
+      GetImportBiblios
+      GetImportRecordsRange
+      GetItemNumbersFromImportBatch
+
+      GetImportBatchStatus
+      SetImportBatchStatus
+      GetImportBatchOverlayAction
+      SetImportBatchOverlayAction
+      GetImportBatchNoMatchAction
+      SetImportBatchNoMatchAction
+      GetImportBatchItemAction
+      SetImportBatchItemAction
+      GetImportBatchMatcher
+      SetImportBatchMatcher
+      GetImportRecordOverlayStatus
+      SetImportRecordOverlayStatus
+      GetImportRecordStatus
+      SetImportRecordStatus
+      SetMatchedBiblionumber
+      GetImportRecordMatches
+      SetImportRecordMatches
+
+      RecordsFromMARCXMLFile
+      RecordsFromISO2709File
+      RecordsFromMarcPlugin
+    );
 }
 
 =head1 NAME
index 51c0aae..2ad5ac9 100644 (file)
@@ -21,23 +21,22 @@ use strict;
 use warnings;
 use XML::LibXML;
 use XML::LibXML::XPathContext;
-use Digest::MD5 qw();
-use POSIX qw(strftime);
+use Digest::MD5;
+use POSIX qw( strftime );
 use Text::CSV_XS;
-use List::MoreUtils qw(indexes);
+use List::MoreUtils qw( indexes );
 
 use C4::Context;
 use Koha::Logger;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
-    @EXPORT = qw(
-        &ExportFramework
-        &ImportFramework
-        &createODS
+    @EXPORT_OK = qw(
+        ExportFramework
+        ImportFramework
+        createODS
     );
 }
 
index c3f5adc..bb868aa 100644 (file)
@@ -18,24 +18,23 @@ package C4::InstallAuth;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Digest::MD5 qw(md5_base64);
 use CGI::Session;
 use File::Spec;
 
 require Exporter;
 
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Templates;
-use C4::Koha;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-@ISA    = qw(Exporter);
-@EXPORT = qw(
-  &checkauth
-  &get_template_and_user
-);
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(
+      checkauth
+      get_template_and_user
+    );
+}
 
 =head1 NAME
 
index 2d6b523..7aa85de 100644 (file)
@@ -19,7 +19,7 @@ package C4::Installer;
 
 use Modern::Perl;
 
-use Encode qw( encode is_utf8 );
+use Encode;
 use DBIx::RunSQL;
 use YAML::XS;
 use C4::Context;
@@ -30,7 +30,7 @@ use vars qw(@ISA @EXPORT);
 BEGIN {
     require Exporter;
     @ISA = qw( Exporter );
-    push @EXPORT, qw( primary_key_exists foreign_key_exists index_exists column_exists TableExists);
+    push @EXPORT, qw( primary_key_exists foreign_key_exists index_exists column_exists TableExists marc_framework_sql_list);
 };
 
 =head1 NAME
index 01ccc53..f143bc6 100644 (file)
@@ -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 {
index 2ca97b6..61aa6fb 100644 (file)
@@ -18,10 +18,10 @@ package C4::Installer::UpgradeBackup;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use File::Compare qw(compare);
-use Cwd qw(cwd);
+use File::Compare qw( compare );
+use Cwd qw( cwd );
 use File::Copy;
-use File::Find;
+use File::Find qw( find );
 use File::Spec;
 use Exporter;
 
index c793516..45d30d9 100644 (file)
@@ -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;
index 1f0d560..14774e4 100644 (file)
@@ -20,12 +20,12 @@ package C4::Items;
 
 use Modern::Perl;
 
-use vars qw(@ISA @EXPORT);
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
 
-    @EXPORT = qw(
+    @EXPORT_OK = qw(
         AddItemFromMarc
         AddItemBatchFromMarc
         ModItemFromMarc
@@ -39,30 +39,30 @@ BEGIN {
         GetHostItemsInfo
         get_hostitemnumbers_of
         GetHiddenItemnumbers
+        GetMarcItem
         MoveItemFromBiblio
         CartToShelf
         GetAnalyticsCount
         SearchItems
         PrepareItemrecordDisplay
+        ToggleNewStatus
     );
 }
 
-use Carp;
-use Try::Tiny;
+use Carp qw( croak );
 use C4::Context;
 use C4::Koha;
-use C4::Biblio;
-use Koha::DateUtils;
+use C4::Biblio qw( GetMarcStructure TransformMarcToKoha );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use MARC::Record;
-use C4::ClassSource;
-use C4::Log;
-use List::MoreUtils qw(any);
+use C4::ClassSource qw( GetClassSort GetClassSources GetClassSource );
+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;
index 8388005..681d6ff 100644 (file)
@@ -30,34 +30,35 @@ use Koha::MarcSubfieldStructures;
 use Business::ISBN;
 use Business::ISSN;
 use autouse 'Data::cselectall_arrayref' => qw(Dumper);
-use vars qw(@ISA @EXPORT @EXPORT_OK);
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-        &GetItemTypesCategorized
-        &getallthemes
-        &getFacets
-        &getnbpages
-               &getitemtypeimagedir
-               &getitemtypeimagesrc
-               &getitemtypeimagelocation
-               &GetAuthorisedValues
-               &GetNormalizedUPC
-               &GetNormalizedISBN
-               &GetNormalizedEAN
-               &GetNormalizedOCLCNumber
-        &xml_escape
-
-        &GetVariationsOfISBN
-        &GetVariationsOfISBNs
-        &NormalizeISBN
-        &GetVariationsOfISSN
-        &GetVariationsOfISSNs
-        &NormalizeISSN
-
-       );
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+      GetItemTypesCategorized
+      getallthemes
+      getFacets
+      getImageSets
+      getnbpages
+      getitemtypeimagedir
+      getitemtypeimagesrc
+      getitemtypeimagelocation
+      GetAuthorisedValues
+      GetNormalizedUPC
+      GetNormalizedISBN
+      GetNormalizedEAN
+      GetNormalizedOCLCNumber
+      xml_escape
+
+      GetVariationsOfISBN
+      GetVariationsOfISBNs
+      NormalizeISBN
+      GetVariationsOfISSN
+      GetVariationsOfISSNs
+      NormalizeISSN
+
+    );
 }
 
 =head1 NAME
index deb7429..5f3a610 100644 (file)
@@ -3,14 +3,13 @@ package C4::Labels::Label;
 use strict;
 use warnings;
 
-use Text::Wrap;
-use Algorithm::CheckDigits;
+use Text::Wrap qw( wrap );
+use Algorithm::CheckDigits qw( CheckDigits );
 use Text::CSV_XS;
-use Data::Dumper;
 use Text::Bidi qw( log2vis );
 
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField );
 use Koha::ClassSources;
 use Koha::ClassSortRules;
 use Koha::ClassSplitRules;
index 58cf16c..b9c7e6d 100644 (file)
@@ -22,24 +22,24 @@ package C4::Languages;
 use strict;
 use warnings;
 
-use Carp;
+use Carp qw( carp );
 use CGI;
 use List::MoreUtils qw( any );
 use C4::Context;
 use Koha::Caches;
 use Koha::Cache::Memory::Lite;
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
-    @EXPORT = qw(
-        &getFrameworkLanguages
-        &getTranslatedLanguages
-        &getLanguages
-        &getAllLanguages
+    @EXPORT_OK = qw(
+        getFrameworkLanguages
+        getTranslatedLanguages
+        getLanguages
+        getAllLanguages
     );
-    @EXPORT_OK = qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage);
+    push @EXPORT_OK, qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage get_rfc4646_from_iso639);
 }
 
 =head1 NAME
index 6b86105..177a4f5 100644 (file)
@@ -20,36 +20,47 @@ package C4::Letters;
 use Modern::Perl;
 
 use MIME::Lite;
-use Date::Calc qw( Add_Delta_Days );
-use Encode;
-use Carp;
+use Carp qw( carp croak );
 use Template;
-use Module::Load::Conditional qw(can_load);
+use Module::Load::Conditional qw( can_load );
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use C4::Members;
-use C4::Log;
+use C4::Log qw( logaction );
 use C4::SMS;
 use C4::Templates;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::SMS::Providers;
 
 use Koha::Email;
 use Koha::Notice::Messages;
 use Koha::Notice::Templates;
-use Koha::DateUtils qw( format_sqldatetime dt_from_string );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
 use Koha::SMTP::Servers;
 use Koha::Subscriptions;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
-    @EXPORT = qw(
-        &EnqueueLetter &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &SendAlerts &GetPrintMessages &GetMessageTransportTypes
+    @EXPORT_OK = qw(
+      GetLetters
+      GetLettersAvailableForALibrary
+      GetLetterTemplates
+      DelLetter
+      GetPreparedLetter
+      GetWrappedLetter
+      SendAlerts
+      GetPrintMessages
+      GetQueuedMessages
+      GetMessage
+      GetMessageTransportTypes
+
+      EnqueueLetter
+      SendQueuedMessages
+      ResendMessage
     );
 }
 
index 969d2ea..0648ee3 100644 (file)
@@ -47,7 +47,6 @@ to the preferred form.
 
 use strict;
 use warnings;
-use Carp;
 use C4::Context;
 
 use base qw(Class::Accessor);
index 934e875..c5cbee0 100644 (file)
@@ -19,7 +19,6 @@ package C4::Linker::Default;
 
 use strict;
 use warnings;
-use Carp;
 use MARC::Field;
 use C4::Heading;
 
index 13c8525..873395a 100644 (file)
@@ -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
 
index 1109f7a..1f873d8 100644 (file)
@@ -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
 
index dc3c63f..5a9077d 100644 (file)
--- a/C4/Log.pm
+++ b/C4/Log.pm
@@ -27,7 +27,6 @@ use warnings;
 use JSON qw( to_json );
 
 use C4::Context;
-use Koha::DateUtils;
 use Koha::Logger;
 
 use vars qw(@ISA @EXPORT);
@@ -35,7 +34,7 @@ use vars qw(@ISA @EXPORT);
 BEGIN {
         require Exporter;
         @ISA = qw(Exporter);
-        @EXPORT = qw(&logaction &cronlogaction);
+        @EXPORT = qw(logaction cronlogaction);
 }
 
 =head1 NAME
index a82dcba..13b81ca 100644 (file)
@@ -22,29 +22,38 @@ use Modern::Perl;
 use DateTime;
 
 use C4::Context;
-use Koha::SimpleMARC;
+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);
 
 BEGIN {
-    @ISA = qw(Exporter);
+    @ISA    = qw(Exporter);
     @EXPORT = qw(
-        &GetModificationTemplates
-        &AddModificationTemplate
-        &DelModificationTemplate
+      GetModificationTemplates
+      AddModificationTemplate
+      DelModificationTemplate
 
-        &GetModificationTemplateAction
-        &GetModificationTemplateActions
+      GetModificationTemplateAction
+      GetModificationTemplateActions
 
-        &AddModificationTemplateAction
-        &ModModificationTemplateAction
-        &DelModificationTemplateAction
-        &MoveModificationTemplateAction
+      AddModificationTemplateAction
+      ModModificationTemplateAction
+      DelModificationTemplateAction
+      MoveModificationTemplateAction
 
-        &ModifyRecordsWithTemplate
-        &ModifyRecordWithTemplate
+      ModifyRecordsWithTemplate
+      ModifyRecordWithTemplate
     );
 }
 
index 923b4ac..e8a8ec3 100644 (file)
@@ -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
 
index 301e6f7..73b254c 100644 (file)
@@ -22,47 +22,41 @@ 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 C4::Overdues;
+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;
+use C4::Letters qw( GetPreparedLetter );
 use DateTime;
 use Koha::Database;
-use Koha::DateUtils;
-use Koha::AuthUtils qw(hash_password);
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Database;
 use Koha::Holds;
-use Koha::List::Patron;
 use Koha::News;
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
-our (@ISA,@EXPORT,@EXPORT_OK);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
-    #Get data
-    push @EXPORT, qw(
+    @EXPORT_OK = qw(
+      GetMemberDetails
+      GetMember
 
-        &GetAllIssues
+      GetAllIssues
 
-        &GetBorrowersToExpunge
+      GetBorrowersToExpunge
 
-        &IssueSlip
-    );
+      IssueSlip
+
+      checkuserpassword
+      get_cardnumber_length
+      checkcardnumber
 
-    #Check data
-    push @EXPORT, qw(
-        &checkuserpassword
-        &checkcardnumber
+      DeleteUnverifiedOpacRegistrations
+      DeleteExpiredOpacRegistrations
     );
 }
 
index e8c5d1f..8259dda 100644 (file)
@@ -26,16 +26,17 @@ use Modern::Perl;
 
 use C4::Context;
 
-our ( @ISA, @EXPORT, @EXPORT_OK );
+our ( @ISA, @EXPORT_OK );
 
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
 
-    push @EXPORT, qw(
-        &GetTotalIssuesTodayByBorrower
-        &GetTotalIssuesReturnedTodayByBorrower
-        &GetPrecedentStateByBorrower
+    @EXPORT_OK = qw(
+        get_fields
+        GetTotalIssuesTodayByBorrower
+        GetTotalIssuesReturnedTodayByBorrower
+        GetPrecedentStateByBorrower
     );
 }
 
index e10e3c5..3a32166 100644 (file)
@@ -22,10 +22,10 @@ package C4::Message;
 use strict;
 use warnings;
 use C4::Context;
-use C4::Letters;
-use YAML::XS;
+use C4::Letters qw( GetPreparedLetter EnqueueLetter );
+use YAML::XS qw( Dump );
 use Encode;
-use Carp;
+use Carp qw( carp );
 
 =head1 NAME
 
index 0ecdc77..ac9eb22 100644 (file)
@@ -38,10 +38,10 @@ BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
     @EXPORT = qw(
-        &GetOAISets &GetOAISet &GetOAISetBySpec &ModOAISet &DelOAISet &AddOAISet
-        &GetOAISetsMappings &GetOAISetMappings &ModOAISetMappings
-        &GetOAISetsBiblio &ModOAISetsBiblios &AddOAISetsBiblios
-        &CalcOAISetsBiblio &UpdateOAISetsBiblio &DelOAISetsBiblio
+        GetOAISets GetOAISet GetOAISetBySpec ModOAISet DelOAISet AddOAISet
+        GetOAISetsMappings GetOAISetMappings ModOAISetMappings
+        GetOAISetsBiblio ModOAISetsBiblios AddOAISetsBiblios
+        CalcOAISetsBiblio UpdateOAISetsBiblio DelOAISetsBiblio
     );
 }
 
index d57a80d..09dc73d 100644 (file)
@@ -30,30 +30,23 @@ use Modern::Perl;
 use URI::Escape;
 use Scalar::Util qw( looks_like_number );
 
-use C4::Auth qw(get_template_and_user);
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::Templates;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+our (@ISA, @EXPORT_OK);
 
 BEGIN {
     require Exporter;
 
- @ISA    = qw(Exporter);
-    @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead
-    %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url
-                                &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)],
-                    ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)],
-                    html =>[qw(&output_with_http_headers &output_html_with_http_headers)]
-                );
-    push @EXPORT, qw(
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(
+        is_ajax
+        ajax_fail
         setlanguagecookie getlanguagecookie pagination_bar parametrized_url
+        output_html_with_http_headers output_ajax_with_http_headers output_with_http_headers
+        output_and_exit_if_error output_and_exit output_error
     );
-    push @EXPORT, qw(
-        &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
-        &output_and_exit_if_error &output_and_exit &output_error
-    );
-
 }
 
 =head1 NAME
index 816ede8..a16143c 100644 (file)
@@ -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;
index e76cf79..54a4264 100644 (file)
@@ -20,45 +20,38 @@ package C4::Overdues;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Date::Calc qw/Today Date_to_Days/;
-use Date::Manip qw/UnixDate/;
+use Date::Calc qw( Today );
+use Date::Manip qw( UnixDate );
 use List::MoreUtils qw( uniq );
-use POSIX qw( floor ceil );
-use Locale::Currency::Format 1.28;
-use Carp;
+use POSIX qw( ceil floor );
+use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL );
+use Carp qw( carp );
 
-use C4::Circulation;
 use C4::Context;
 use C4::Accounts;
-use C4::Log; # logaction
 use Koha::Logger;
-use Koha::DateUtils;
 use Koha::Account::Lines;
 use Koha::Account::Offsets;
 use Koha::Libraries;
 
-use vars qw(@ISA @EXPORT);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
 
     # subs to rename (and maybe merge some...)
-    push @EXPORT, qw(
-      &CalcFine
-      &Getoverdues
-      &checkoverdues
-      &UpdateFine
-      &GetFine
-      &get_chargeable_units
-      &GetOverduesForBranch
-      &GetOverdueMessageTransportTypes
-      &parse_overdues_letter
-    );
-
-    # subs to move to Circulation.pm
-    push @EXPORT, qw(
-      &GetIssuesIteminfo
+    @EXPORT_OK = qw(
+      CalcFine
+      Getoverdues
+      checkoverdues
+      UpdateFine
+      GetFine
+      GetBranchcodesWithOverdueRules
+      get_chargeable_units
+      GetOverduesForBranch
+      GetOverdueMessageTransportTypes
+      parse_overdues_letter
+      GetIssuesIteminfo
     );
 }
 
index 98fb59c..7358b29 100644 (file)
@@ -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;
index 6482198..9251147 100644 (file)
@@ -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
 
index 0c3c670..d2377ed 100644 (file)
@@ -25,20 +25,20 @@ use Modern::Perl;
 use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding
 use MARC::File::XML; # marc2marcxml, marcxml2marc, changeEncoding
 use Biblio::EndnoteStyle;
-use Unicode::Normalize; # _entity_encode
-use C4::Biblio; #marc2bibtex
+use Unicode::Normalize qw( NFC ); # _entity_encode
+use C4::Biblio qw( GetFrameworkCode GetMarcBiblio );
 use C4::Koha; #marc2csv
-use C4::XSLT ();
+use C4::XSLT;
 use YAML::XS; #marcrecords2csv
 use Encode;
 use Template;
 use Text::CSV::Encoded; #marc2csv
 use Koha::Items;
-use Koha::SimpleMARC qw(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);
 
@@ -48,16 +48,17 @@ use vars qw(@ISA @EXPORT);
 # only export API methods
 
 @EXPORT = qw(
-  &marc2endnote
-  &marc2marc
-  &marc2marcxml
-  &marcxml2marc
-  &marc2dcxml
-  &marc2modsxml
-  &marc2madsxml
-  &marc2bibtex
-  &marc2csv
-  &changeEncoding
+  marc2endnote
+  marc2marc
+  marc2marcxml
+  marcxml2marc
+  marc2dcxml
+  marc2modsxml
+  marc2madsxml
+  marc2bibtex
+  marc2csv
+  marcrecord2csv
+  changeEncoding
 );
 
 =head1 NAME
index 4d566b0..ef1f004 100644 (file)
@@ -20,13 +20,13 @@ package C4::Reports;
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 use C4::Context;
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
-    @EXPORT = qw(
+    @EXPORT_OK = qw(
         GetDelimiterChoices
     );
 }
index 113d1b5..6611393 100644 (file)
@@ -19,40 +19,42 @@ package C4::Reports::Guided;
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use Carp;
+use Carp qw( carp croak );
 use JSON qw( from_json );
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 use C4::Context;
 use C4::Templates qw/themelanguage/;
-use C4::Koha;
-use Koha::DateUtils;
+use C4::Koha qw( GetAuthorisedValues );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
 use Koha::Reports;
 use C4::Output;
-use C4::Log;
+use C4::Log qw( logaction );
 use Koha::Notice::Templates;
-use C4::Letters;
 
 use Koha::Logger;
 use Koha::AuthorisedValues;
 use Koha::Patron::Categories;
 use Koha::SharedContent;
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
-    @EXPORT = qw(
+    @EXPORT_OK = qw(
       get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
       save_report get_saved_reports execute_query
       get_column_type get_distinct_values save_dictionary get_from_dictionary
-      delete_definition delete_report format_results get_sql
+      delete_definition delete_report store_results format_results get_sql get_results
       nb_rows update_sql
+      strip_limit
+      convert_sql
       GetReservedAuthorisedValues
       GetParametersFromSQL
       IsAuthorisedValueValid
       ValidateSQLParameters
       nb_rows update_sql
+      EmailReport
     );
 }
 
index dfd0c70..54d2b00 100644 (file)
@@ -24,12 +24,11 @@ package C4::Reserves;
 use Modern::Perl;
 
 use C4::Accounts;
-use C4::Biblio;
-use C4::Circulation;
+use C4::Circulation qw( CheckIfIssuedToPatron GetAgeRestriction GetBranchItemRule );
 use C4::Context;
-use C4::Items;
+use C4::Items qw( CartToShelf get_hostitemnumbers_of );
 use C4::Letters;
-use C4::Log;
+use C4::Log qw( logaction );
 use C4::Members::Messaging;
 use C4::Members;
 use Koha::Account::Lines;
@@ -37,7 +36,7 @@ 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,11 +46,8 @@ use Koha::Old::Hold;
 use Koha::Patrons;
 use Koha::Plugins;
 
-use Carp;
-use Data::Dumper;
-use List::MoreUtils qw( firstidx any );
-
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+use Data::Dumper qw( Dumper );
+use List::MoreUtils qw( any );
 
 =head1 NAME
 
@@ -99,49 +95,57 @@ This modules provides somes functions to deal with reservations.
 
 =cut
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
-    @EXPORT = qw(
-        &AddReserve
+    @EXPORT_OK = qw(
+      AddReserve
+
+      GetReserveStatus
+
+      GetOtherReserves
+      ChargeReserveFee
+      GetReserveFee
+
+      ModReserveFill
+      ModReserveAffect
+      ModReserve
+      ModReserveStatus
+      ModReserveCancelAll
+      ModReserveMinusPriority
+      MoveReserve
 
-        &GetReserveStatus
+      CheckReserves
+      CanBookBeReserved
+      CanItemBeReserved
+      CanReserveBeCanceledFromOpac
+      CancelExpiredReserves
 
-        &GetOtherReserves
+      AutoUnsuspendReserves
 
-        &ModReserveFill
-        &ModReserveAffect
-        &ModReserve
-        &ModReserveStatus
-        &ModReserveCancelAll
-        &ModReserveMinusPriority
-        &MoveReserve
+      IsAvailableForItemLevelRequest
+      ItemsAnyAvailableAndNotRestricted
 
-        &CheckReserves
-        &CanBookBeReserved
-        &CanItemBeReserved
-        &CanReserveBeCanceledFromOpac
-        &CancelExpiredReserves
+      AlterPriority
+      ToggleLowestPriority
 
-        &AutoUnsuspendReserves
+      ReserveSlip
+      ToggleSuspend
+      SuspendAll
 
-        &IsAvailableForItemLevelRequest
-        ItemsAnyAvailableAndNotRestricted
+      GetReservesControlBranch
 
-        &AlterPriority
-        &ToggleLowestPriority
+      CalculatePriority
 
-        &ReserveSlip
-        &ToggleSuspend
-        &SuspendAll
+      IsItemOnHoldAndFound
 
-        &GetReservesControlBranch
+      GetMaxPatronHoldsForRecord
 
-        IsItemOnHoldAndFound
+      MergeHolds
 
-        GetMaxPatronHoldsForRecord
+      RevertWaitingStatus
     );
-    @EXPORT_OK = qw( MergeHolds );
 }
 
 =head2 AddReserve
index 867030c..9ab50d9 100644 (file)
--- a/C4/Ris.pm
+++ b/C4/Ris.pm
@@ -62,12 +62,12 @@ package C4::Ris;
 
 use Modern::Perl;
 
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 use YAML::XS;
 use Encode;
 use vars qw(@ISA @EXPORT);
 
-use Koha::SimpleMARC qw(read_field);
+use Koha::SimpleMARC qw( read_field );
 
 
 @ISA = qw(Exporter);
@@ -75,7 +75,7 @@ use Koha::SimpleMARC qw(read_field);
 # only export API methods
 
 @EXPORT = qw(
-  &marc2ris
+  marc2ris
 );
 
 our $marcprint = 0; # Debug flag;
index 2732a69..a1f8df7 100644 (file)
@@ -25,12 +25,10 @@ package C4::RotatingCollections;
 use Modern::Perl;
 
 use C4::Context;
-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);
 
@@ -61,6 +59,8 @@ BEGIN {
       TransferCollection
 
       GetCollectionItemBranches
+      isItemInAnyCollection
+      isItemInThisCollection
     );
 }
 
index 13509cc..3cacc3a 100644 (file)
@@ -6,7 +6,7 @@ package C4::SIP::ILS;
 
 use warnings;
 use strict;
-use C4::SIP::Sip qw(siplog);
+use C4::SIP::Sip qw( siplog );
 use Data::Dumper;
 
 use C4::SIP::ILS::Item;
index b2063a4..48df606 100644 (file)
@@ -17,11 +17,11 @@ use C4::SIP::ILS::Transaction;
 use C4::SIP::Sip qw(add_field);
 
 use C4::Biblio;
-use C4::Circulation;
+use C4::Circulation qw( barcodedecode );
 use C4::Context;
 use C4::Items;
 use C4::Members;
-use C4::Reserves;
+use C4::Reserves qw( ModReserveFill );
 use Koha::Biblios;
 use Koha::Checkouts::ReturnClaims;
 use Koha::Checkouts;
index 83b66d7..a4e0930 100644 (file)
@@ -11,9 +11,9 @@ use strict;
 
 use C4::SIP::ILS::Transaction;
 
-use C4::Circulation;
+use C4::Circulation qw( AddReturn LostItem );
 use C4::Items qw( ModItemTransfer );
-use C4::Reserves qw( ModReserveAffect );
+use C4::Reserves qw( ModReserve ModReserveAffect );
 use Koha::DateUtils qw( dt_from_string );
 use Koha::Items;
 
index b321a24..f5c8876 100644 (file)
@@ -8,14 +8,14 @@ use warnings;
 use strict;
 
 use POSIX qw(strftime);
-use C4::SIP::Sip qw(siplog);
+use C4::SIP::Sip qw( siplog );
 use Data::Dumper;
 use CGI qw ( -utf8 );
 
 use C4::SIP::ILS::Transaction;
 
 use C4::Context;
-use C4::Circulation;
+use C4::Circulation qw( AddIssue GetIssuingCharges CanBookBeIssued );
 use C4::Members;
 use C4::Reserves qw(ModReserveFill);
 use Koha::DateUtils;
index 2bc1133..82fddf1 100644 (file)
@@ -7,13 +7,13 @@ use Modern::Perl;
 
 use C4::SIP::ILS::Transaction;
 
-use C4::Reserves;      # AddReserve
+use C4::Reserves qw( CalculatePriority AddReserve ModReserve );
 use Koha::Holds;
 use Koha::Patrons;
-use parent qw(C4::SIP::ILS::Transaction);
-
 use Koha::Items;
 
+use parent qw(C4::SIP::ILS::Transaction);
+
 my %fields = (
        expiration_date => 0,
        pickup_location => undef,
index e950424..9e5579e 100644 (file)
@@ -7,7 +7,7 @@ package C4::SIP::ILS::Transaction::Renew;
 use warnings;
 use strict;
 
-use C4::Circulation;
+use C4::Circulation qw( CanBookBeRenewed GetIssuingCharges AddIssue );
 use Koha::Patrons;
 use Koha::DateUtils;
 
index 23d552b..5acd53e 100644 (file)
@@ -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;
 
index f1c1ae4..4f0a0a6 100644 (file)
@@ -21,8 +21,8 @@ use C4::SIP::Sip::MsgType qw( handle login_core );
 use C4::SIP::Logger qw(set_logger);
 
 use Koha::Caches;
-
 use Koha::Logger;
+
 use C4::SIP::Trapper;
 tie *STDERR, "C4::SIP::Trapper";
 
index 3d68f97..2842a61 100644 (file)
@@ -15,7 +15,7 @@ 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::Logger qw( get_logger );
 
 use base qw(Exporter);
 
index a1c1ae5..e2f6d85 100644 (file)
@@ -19,15 +19,14 @@ package C4::Scheduler;
 
 use Modern::Perl;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 use C4::Context;
 use Schedule::At;
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA = qw(Exporter);
-       @EXPORT =
-               qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
 }
 
 =head1 NAME
index 494b079..0fcd358 100644 (file)
@@ -21,7 +21,7 @@ package C4::Scrubber;
 
 use strict;
 use warnings;
-use Carp;
+use Carp qw( croak );
 use HTML::Scrubber;
 
 use C4::Context;
index 03f7ecf..1ca987a 100644 (file)
@@ -16,28 +16,44 @@ package C4::Search;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-require Exporter;
 use C4::Context;
-use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
-use C4::Koha;      # getFacets
+use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
+use C4::Koha qw( getFacets GetVariationsOfISBN GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN getitemtypeimagelocation );
 use Koha::DateUtils;
 use Koha::Libraries;
 use Lingua::Stem;
 use XML::Simple;
-use C4::XSLT;
-use C4::Reserves;    # GetReserveStatus
-use C4::Charset;
-use Koha::Logger;
+use C4::XSLT qw( XSLTParse4Display );
+use C4::Reserves qw( GetReserveStatus );
+use C4::Charset qw( SetUTF8Flag );
 use Koha::AuthorisedValues;
 use Koha::ItemTypes;
 use Koha::Libraries;
+use Koha::Logger;
 use Koha::Patrons;
 use Koha::RecordProcessor;
 use URI::Escape;
 use Business::ISBN;
 use MARC::Record;
 use MARC::Field;
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(
+      FindDuplicate
+      SimpleSearch
+      searchResults
+      getRecords
+      buildQuery
+      GetDistinctValues
+      enabled_staff_search_views
+      new_record_from_zebra
+      z3950_search_args
+      getIndexes
+    );
+}
 
 =head1 NAME
 
@@ -55,17 +71,6 @@ This module provides searching functions for Koha's bibliographic databases
 
 =cut
 
-@ISA    = qw(Exporter);
-@EXPORT = qw(
-  &FindDuplicate
-  &SimpleSearch
-  &searchResults
-  &getRecords
-  &buildQuery
-  &GetDistinctValues
-  &enabled_staff_search_views
-);
-
 # make all your functions, whether exported or not;
 
 =head2 FindDuplicate
index 8406f30..df36cb0 100644 (file)
@@ -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)   = @_;
index a168293..886cc86 100644 (file)
@@ -22,7 +22,7 @@ use Modern::Perl;
 use LWP::UserAgent;
 use URI;
 use URI::QueryParam;
-use XML::Simple;
+use XML::Simple qw( XMLin );
 
 =head1 NAME
 
index a2c1e24..d840bf2 100644 (file)
@@ -20,25 +20,30 @@ package C4::Serials;
 
 use Modern::Perl;
 
-use C4::Auth qw(haspermission);
+use C4::Auth qw( haspermission );
 use C4::Context;
 use DateTime;
-use Date::Calc qw(:all);
-use POSIX qw(strftime);
-use C4::Biblio;
-use C4::Log;    # logaction
-use C4::Serials::Frequency;
+use Date::Calc qw(
+    Add_Delta_Days
+    Add_Delta_YM
+    check_date
+    Delta_Days
+    N_Delta_YMD
+    Today
+);
+use POSIX qw( strftime );
+use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblio );
+use C4::Log qw( logaction );    # logaction
+use C4::Serials::Frequency qw( GetSubscriptionFrequency );
 use C4::Serials::Numberpattern;
 use Koha::AdditionalFieldValues;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Serial;
 use Koha::Subscriptions;
 use Koha::Subscription::Histories;
 use Koha::SharedContent;
 use Scalar::Util qw( looks_like_number );
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
 # Define statuses
 use constant {
     EXPECTED               => 1,
@@ -61,31 +66,39 @@ use constant MISSING_STATUSES => (
     MISSING_LOST
 );
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
-    @EXPORT = qw(
-      &NewSubscription    &ModSubscription    &DelSubscription
-      &GetSubscription    &CountSubscriptionFromBiblionumber      &GetSubscriptionsFromBiblionumber
-      &SearchSubscriptions
-      &GetFullSubscriptionsFromBiblionumber   &GetFullSubscription &ModSubscriptionHistory
-      &HasSubscriptionStrictlyExpired &HasSubscriptionExpired &GetExpirationDate &abouttoexpire
-      &GetSubscriptionHistoryFromSubscriptionId
-
-      &GetNextSeq &GetSeq &NewIssue           &GetSerials
-      &GetLatestSerials   &ModSerialStatus    &GetNextDate       &GetSerials2
-      &GetSubscriptionLength &ReNewSubscription  &GetLateOrMissingIssues
-      &GetSerialInformation                   &AddItem2Serial
-      &PrepareSerialsData &GetNextExpected    &ModNextExpected
-      &GetPreviousSerialid
-
-      &GetSuppliersWithLateIssues
-      &getroutinglist     &delroutingmember   &addroutingmember
-      &reorder_members
-      &check_routing &updateClaim
-      &CountIssues
+    @EXPORT_OK = qw(
+      NewSubscription    ModSubscription    DelSubscription
+      GetSubscription    CountSubscriptionFromBiblionumber      GetSubscriptionsFromBiblionumber
+      SearchSubscriptions
+      GetFullSubscriptionsFromBiblionumber   GetFullSubscription ModSubscriptionHistory
+      HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
+      GetFictiveIssueNumber
+      GetSubscriptionHistoryFromSubscriptionId
+
+      GetNextSeq GetSeq NewIssue           GetSerials
+      GetLatestSerials   ModSerialStatus    GetNextDate
+      CloseSubscription ReopenSubscription
+      subscriptionCurrentlyOnOrder
+      can_claim_subscription can_edit_subscription can_show_subscription
+      GetSerials2
+      GetSubscriptionLength ReNewSubscription  GetLateOrMissingIssues
+      GetSerialInformation                   AddItem2Serial
+      PrepareSerialsData GetNextExpected    ModNextExpected
+      GetSubscriptionIrregularities
+      GetPreviousSerialid
+
+      GetSuppliersWithLateIssues
+      getroutinglist     delroutingmember   addroutingmember
+      reorder_members
+      check_routing updateClaim
+      CountIssues
       HasItems
-      &subscriptionCurrentlyOnOrder
+
+      findSerialsByStatus
 
     );
 }
index 509f680..9db52c8 100644 (file)
@@ -28,13 +28,13 @@ BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
     @EXPORT = qw(
-      &GetSubscriptionFrequencies
-      &GetSubscriptionFrequency
-      &AddSubscriptionFrequency
-      &ModSubscriptionFrequency
-      &DelSubscriptionFrequency
+      GetSubscriptionFrequencies
+      GetSubscriptionFrequency
+      AddSubscriptionFrequency
+      ModSubscriptionFrequency
+      DelSubscriptionFrequency
 
-      &GetSubscriptionsWithFrequency
+      GetSubscriptionsWithFrequency
     );
 }
 
index 3c35b62..5c31bc6 100644 (file)
@@ -29,14 +29,14 @@ BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
     @EXPORT = qw(
-        &GetSubscriptionNumberpatterns
-        &GetSubscriptionNumberpattern
-        &GetSubscriptionNumberpatternByName
-        &AddSubscriptionNumberpattern
-        &ModSubscriptionNumberpattern
-        &DelSubscriptionNumberpattern
-
-        &GetSubscriptionsWithNumberpattern
+        GetSubscriptionNumberpatterns
+        GetSubscriptionNumberpattern
+        GetSubscriptionNumberpatternByName
+        AddSubscriptionNumberpattern
+        ModSubscriptionNumberpattern
+        DelSubscriptionNumberpattern
+
+        GetSubscriptionsWithNumberpattern
     );
 }
 
index 790f147..c50051d 100644 (file)
@@ -43,7 +43,7 @@ use warnings;
 
 use CGI qw ( -utf8 );
 use C4::Auth qw( check_api_auth );
-use C4::Output qw( :ajax );
+use C4::Output qw( output_with_http_headers );
 use C4::Output::JSONStream;
 use JSON;
 
index b115c93..0b1bec4 100644 (file)
@@ -20,21 +20,18 @@ package C4::ShelfBrowser;
 use strict;
 use warnings;
 
-use C4::Biblio;
+use C4::Biblio qw( GetAuthorisedValueDesc GetMarcBiblio );
 use C4::Context;
-use C4::Koha;
+use C4::Koha qw( GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN GetNormalizedEAN );
 use Koha::Biblios;
 use Koha::Libraries;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-           &GetNearbyItems
-    );
+    require Exporter;
+    @ISA       = qw(Exporter);
     @EXPORT_OK = qw(
+      GetNearbyItems
     );
 }
 
index 218cf4e..8217ccb 100644 (file)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use C4::Context;
 use Business::ISBN;
-use C4::Koha;
+use C4::Koha qw( GetNormalizedISBN );
 
 =head1 NAME
 
index ff2eae9..7d63f18 100644 (file)
@@ -20,7 +20,7 @@ package C4::Stats;
 
 use Modern::Perl;
 require Exporter;
-use Carp;
+use Carp qw( croak );
 use C4::Context;
 
 use Koha::DateUtils qw( dt_from_string );
@@ -30,10 +30,10 @@ use Koha::PseudonymizedTransactions;
 use vars qw(@ISA @EXPORT);
 
 BEGIN {
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(
-               &UpdateStats
-       );
+    @ISA    = qw(Exporter);
+    @EXPORT = qw(
+      UpdateStats
+    );
 }
 
 
index 37a482e..ba72a18 100644 (file)
@@ -25,10 +25,9 @@ use C4::Context;
 use C4::Output;
 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(
index 7e1a221..e01244f 100644 (file)
@@ -20,35 +20,36 @@ package C4::Tags;
 
 use strict;
 use warnings;
-use Carp;
+use Carp qw( carp );
 use Exporter;
 
 use C4::Context;
-use Module::Load::Conditional qw/check_install/;
+use Module::Load::Conditional qw( check_install );
 #use Data::Dumper;
 use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
 use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM   tags_all\n";
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       @ISA = qw(Exporter);
+    @ISA       = qw(Exporter);
     @EXPORT_OK = qw(
-      &get_tag &get_tags &get_tag_rows
-      &add_tags &add_tag
-      &delete_tag_row_by_id
-      &remove_tag
-      &delete_tag_rows_by_ids
-      &get_approval_rows
-      &blacklist
-      &whitelist
-      &is_approved
-      &approval_counts
-      &get_count_by_tag_status
-      &get_filters
+      get_tag get_tags get_tag_rows
+      add_tags
+      add_tag
+      add_tag_approval
+      add_tag_index
+      delete_tag_row_by_id
+      remove_tag
+      delete_tag_rows_by_ids
+      get_approval_rows
+      blacklist
+      whitelist
+      is_approved
+      approval_counts
+      get_count_by_tag_status
+      get_filters
       stratify_tags
     );
-       # %EXPORT_TAGS = ();
     my $ext_dict = C4::Context->preference('TagsExternalDictionary');
     if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) {
         warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed.";
index 644e235..f6fefaa 100644 (file)
@@ -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
 #
@@ -31,8 +31,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(getTranslatedLanguages get_bidi regex_lang_subtags language_get_description accept_language );
+use C4::Languages qw( get_bidi getTranslatedLanguages regex_lang_subtags );
 
 use C4::Context;
 
index c8a5c96..91bc40c 100644 (file)
@@ -20,8 +20,6 @@ package C4::TmplTokenType;
 use Modern::Perl;
 require Exporter;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
 ###############################################################################
 
 =head1 NAME
@@ -38,25 +36,28 @@ The predefined constants are
 ###############################################################################
 
 
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(
-    &TEXT
-    &TEXT_PARAMETRIZED
-    &CDATA
-    &TAG
-    &DECL
-    &PI
-    &DIRECTIVE
-    &COMMENT
-    &UNKNOWN
-);
-
 ###############################################################################
 
 use vars qw( $_text $_text_parametrized $_cdata
     $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
+
+    require Exporter;
+    @ISA = qw(Exporter);
+    @EXPORT_OK = qw(
+      TEXT
+      TEXT_PARAMETRIZED
+      CDATA
+      TAG
+      DECL
+      PI
+      DIRECTIVE
+      COMMENT
+      UNKNOWN
+    );
+
     my $new = sub {
        my $this = 'C4::TmplTokenType';#shift;
        my $class = ref($this) || $this;
index 3c4ec3d..be49a53 100644 (file)
@@ -19,9 +19,9 @@ package C4::UsageStats;
 
 use Modern::Perl;
 use C4::Context;
-use POSIX qw(strftime);
+use POSIX qw( strftime );
 use LWP::UserAgent;
-use JSON;
+use JSON qw( decode_json encode_json );
 
 use Koha::Libraries;
 
index a718a96..3d677b8 100644 (file)
@@ -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 ) = @_;
index 5a34932..cc52165 100644 (file)
@@ -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 {
index 65ef287..c6e03d3 100644 (file)
@@ -21,24 +21,22 @@ use Modern::Perl;
 use XML::Simple;
 #use LWP::Simple;
 use C4::Biblio;
-use C4::Koha;
-use C4::Search;
-use C4::External::Syndetics qw(get_syndetics_editions);
+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 Koha::Biblios;
 use Koha::SearchEngine;
 use Koha::SearchEngine::Search;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
+our (@ISA, @EXPORT_OK);
 BEGIN {
-       require Exporter;
-       @ISA = qw(Exporter);
-       @EXPORT_OK = qw(
-               &get_xisbns
-       );
+    require Exporter;
+    @ISA       = qw(Exporter);
+    @EXPORT_OK = qw(
+      get_xisbns
+    );
 }
 
 =head1 NAME
index b8ae90e..245d76b 100644 (file)
@@ -24,30 +24,29 @@ package C4::XSLT;
 use Modern::Perl;
 
 use C4::Context;
-use C4::Items;
-use C4::Koha;
-use C4::Biblio;
-use C4::Circulation;
-use C4::Reserves;
+use C4::Koha qw( xml_escape );
+use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure );
 use Koha::AuthorisedValues;
 use Koha::ItemTypes;
 use Koha::XSLT::Base;
 use Koha::Libraries;
 
-use Encode;
 
-use vars qw(@ISA @EXPORT);
 
 my $engine; #XSLT Handler object
 my %authval_per_framework;
     # Cache for tagfield-tagsubfield to decode per framework.
     # Should be preferably be placed in Koha-core...
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
-    @EXPORT = qw(
-        &XSLTParse4Display
+    @EXPORT_OK = qw(
+        transformMARCXML4XSLT
+        getAuthorisedValues4MARCSubfields
+        buildKohaItemsNamespace
+        XSLTParse4Display
     );
     $engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } );
 }
index bd4af13..23252c7 100644 (file)
@@ -20,9 +20,8 @@ package Koha::Account;
 use Modern::Perl;
 
 use Carp;
-use Data::Dumper;
-use List::MoreUtils qw( uniq );
-use Try::Tiny;
+use Data::Dumper qw( Dumper );
+use Try::Tiny qw( catch try );
 
 use C4::Circulation qw( ReturnLostItem CanBookBeRenewed AddRenewal );
 use C4::Letters;
@@ -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;
 
index 3596189..faf65cf 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Account::CreditType;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use List::Util qw/any/;
 
 use Koha::Database;
 use Koha::Exceptions;
index 2b058de..27b43e6 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Account::CreditTypes;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use List::Util qw/any/;
 
 use Koha::Database;
 use Koha::Account::CreditType;
index 57cf2cc..1d5f7f1 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Account::DebitType;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use List::Util qw/any/;
 
 use Koha::Database;
 use Koha::Exceptions;
index 8b3558b..3860264 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Account::DebitTypes;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use List::Util qw/any/;
 
 use Koha::Database;
 use Koha::Account::DebitType;
index bd233e3..36a420b 100644 (file)
@@ -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::Overdues qw(GetFine);
+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;
 
index d593893..ab8986d 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Account::Lines;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Account::Line;
index 0751ce8..1ff8c11 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Account::Offset;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Account::Lines;
index 0083f0d..6a40196 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Account::Offsets;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 4f10557..6717f5f 100644 (file)
@@ -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 );
 
index 61da32e..1b184fb 100644 (file)
@@ -4,7 +4,6 @@ use Modern::Perl;
 
 use base qw( Koha::Object );
 
-use Carp qw( croak );
 
 sub _type {
     return 'Aqcontact';
index 053e7a6..fa066f4 100644 (file)
@@ -2,7 +2,6 @@ package Koha::Acquisition::Bookseller::Contacts;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw( Koha::Objects );
 
index 5e730e5..42f1d2f 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Acquisition::Currencies;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 050cf6c..8404d4b 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Acquisition::Currency;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 0d0bac7..e0f1db3 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Acquisition::Invoice::Adjustment;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Acquisition::Invoices;
index 3a43904..f45f12b 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Acquisition::Invoice::Adjustments;
 use Modern::Perl;
 use Koha::Acquisition::Invoice::Adjustment;
 
-use Carp;
 
 use Koha::Database;
 
index 07dea68..090920d 100644 (file)
@@ -18,16 +18,15 @@ package Koha::Acquisition::Order;
 use Modern::Perl;
 
 use Carp qw( croak );
-use Try::Tiny;
 
-use C4::Biblio qw(DelBiblio);
+use C4::Biblio qw( DelBiblio );
 
 use Koha::Acquisition::Baskets;
 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;
index e377e4b..9022830 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Acquisition::Order::Claim;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 9e96045..3190733 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Acquisition::Order::Claims;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 2b06b81..b249626 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Acquisition::Orders;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 975f850..6627b32 100644 (file)
@@ -16,7 +16,6 @@ package Koha::AdvancedEditorMacro;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 4fdf25b..d890185 100644 (file)
@@ -16,7 +16,6 @@ package Koha::AdvancedEditorMacros;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 80d630c..d966bc5 100644 (file)
@@ -19,7 +19,6 @@ package Koha::ApiKey;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Exceptions;
index 8eb84d1..07cabd3 100644 (file)
@@ -19,7 +19,6 @@ package Koha::ApiKeys;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::ApiKey;
index 6b8809b..05b0e32 100644 (file)
@@ -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);
 
index 9b27615..2d3dce5 100644 (file)
@@ -19,7 +19,6 @@ package Koha::ArticleRequests;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 6cddd28..6d5cf63 100644 (file)
@@ -19,7 +19,6 @@ package Koha::AudioAlert;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index daca3c6..11aede0 100644 (file)
@@ -19,7 +19,6 @@ package Koha::AudioAlerts;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 3bf28ef..49d2723 100644 (file)
@@ -18,19 +18,22 @@ package Koha::AuthUtils;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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;
 
 use C4::Context;
 
-use base 'Exporter';
-
-our @EXPORT_OK   = qw(hash_password get_script_name);
 
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA = qw(Exporter);
+    @EXPORT_OK = qw(hash_password get_script_name is_password_valid);
+};
 =head1 NAME
 
 Koha::AuthUtils - utility routines for authentication
index 636ce95..8f97bb1 100644 (file)
@@ -19,7 +19,6 @@ package Koha::AuthorisedValue;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 915e7d0..21e4eee 100644 (file)
@@ -17,7 +17,6 @@ package Koha::AuthorisedValueCategories;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Exceptions;
index 73f578a..e14129f 100644 (file)
@@ -17,7 +17,6 @@ package Koha::AuthorisedValueCategory;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Exceptions;
index b23190d..b89ed9b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::AuthorisedValues;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 0145eb3..a509b75 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Authorities;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 315fe4b..481118e 100644 (file)
@@ -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);
 
index 8d9caba..7c6327e 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Authority::Type;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 85991d8..aa399b4 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Authority::Types;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 09139bd..c303fa1 100644 (file)
@@ -16,10 +16,10 @@ package Koha::BackgroundJob;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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 );
index 24f1e9a..5969a13 100644 (file)
@@ -16,9 +16,9 @@ package Koha::BackgroundJob::BatchUpdateAuthority;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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 );
index 7cb7969..9371e22 100644 (file)
@@ -16,7 +16,7 @@ package Koha::BackgroundJob::BatchUpdateBiblio;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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 );
index be9561f..26ee7ab 100644 (file)
@@ -19,13 +19,11 @@ package Koha::Biblio;
 
 use Modern::Perl;
 
-use Carp;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 use URI;
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 );
 
-use C4::Koha;
-use C4::Biblio qw();
+use C4::Koha qw( GetNormalizedISBN );
 
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string );
index 65a17be..d31b865 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Biblio::Metadatas;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index ca69f37..3036757 100644 (file)
@@ -17,7 +17,6 @@ package Koha::BiblioFramework;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 16db02b..7202d2f 100644 (file)
@@ -17,7 +17,6 @@ package Koha::BiblioFrameworks;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 9be2e61..1ece4a8 100644 (file)
@@ -32,12 +32,11 @@ the new thing that should be used.
 
 =cut
 
-use C4::Biblio; # EmbedItemsInMarcBiblio
+use C4::Biblio;
 use Koha::MetadataIterator;
 use Koha::Database;
 use Modern::Perl;
 
-use Data::Dumper; # TODO remove
 
 use base qw(Koha::MetadataRecord);
 
index f8a4e41..c75a373 100644 (file)
@@ -43,9 +43,9 @@ Returns biblionumber and marc in list context.
 
 =cut
 
-use C4::Biblio;    # :( - for EmbedItemsInMarcBiblio
+use C4::Biblio;
 
-use Carp;
+use Carp qw( confess );
 use MARC::Record;
 use MARC::File::XML;
 use Modern::Perl;
index 8f63a7c..eec0cdc 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Biblioitem;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index d35a0d4..b8d2ba8 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Biblioitems;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 9491fb3..416aa2b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Biblios;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index ec153ba..2186d82 100644 (file)
@@ -40,8 +40,8 @@ The first, traditional OO interface provides the following functions:
 
 use strict;
 use warnings;
-use Carp;
-use Module::Load::Conditional qw(can_load);
+use Carp qw( croak );
+use Module::Load::Conditional qw( can_load );
 use Sereal::Encoder;
 use Sereal::Decoder;
 
index f232541..4bdd910 100644 (file)
@@ -52,7 +52,6 @@ scalars and hashes, with arrays a potential future addition.
 
 use strict;
 use warnings;
-use Carp;
 
 use base qw(Class::Accessor);
 
index 05f9176..5ffebb4 100644 (file)
@@ -2,7 +2,7 @@ package Koha::Calendar;
 
 use Modern::Perl;
 
-use Carp;
+use Carp qw( croak );
 use DateTime;
 use DateTime::Duration;
 use C4::Context;
index 2daa52e..72288bd 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cash::Register;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Account::Lines;
 use Koha::Account::Offsets;
index ede413c..3411869 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cash::Register::Action;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index bdff33e..d470b4d 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cash::Register::Actions;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index d304703..480bbf0 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cash::Register::Cashup;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 8e82a01..58a562c 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cash::Register::Cashups;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Cash::Register::Cashup;
index e022279..9576492 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cash::Registers;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 7eff76b..a9bbf0f 100644 (file)
@@ -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 );
index 3693bee..cc00194 100644 (file)
@@ -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(MarkIssueReturned);
+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;
 
index 0f2da95..76a3b9e 100644 (file)
@@ -19,13 +19,12 @@ package Koha::Checkouts;
 
 use Modern::Perl;
 
-use Carp;
 
 use C4::Context;
-use C4::Circulation;
+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);
 
index fa601bd..c1c2b3b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Checkouts::ReturnClaims;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index df13146..d1c5648 100644 (file)
@@ -18,7 +18,7 @@ package Koha::CirculationRules;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Carp qw(croak);
+use Carp qw( croak );
 
 use Koha::Exceptions;
 use Koha::CirculationRule;
index c66c492..eabe490 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Cities;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index d646631..e95f081 100644 (file)
@@ -17,7 +17,6 @@ package Koha::City;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index f1e7788..73f181e 100644 (file)
@@ -17,7 +17,6 @@ package Koha::ClassSortRule;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 07dc543..1a59b0b 100644 (file)
@@ -17,7 +17,6 @@ package Koha::ClassSortRules;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 7347577..3b192ee 100644 (file)
@@ -17,7 +17,6 @@ package Koha::ClassSource;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 3b6f891..7a56ab8 100644 (file)
@@ -17,7 +17,6 @@ package Koha::ClassSources;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index a8b6401..28937fc 100644 (file)
@@ -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;
 
index 7e48839..d4e00da 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 143a1e9..e9e434b 100644 (file)
@@ -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);
index 0a616bb..54ffaff 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Enrollment::Field;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 29f6fa2..590c265 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Enrollment::Fields;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 3e63f55..8e7327b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Enrollments;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 764cf2a..956ee7a 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Field;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 8e72ee8..7a2837b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Fields;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 46f9f31..fbf35f4 100644 (file)
@@ -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
 
index 4368a39..b24b33f 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Hold::PatronHold;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index f7d4ad7..76fffcb 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Hold::PatronHolds;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 6ec9f41..8a8a203 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Holds;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index bdf8019..57d87f9 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Template;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index bca9123..ba1fdb0 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Template::EnrollmentField;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 27996bf..4b383f5 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Template::EnrollmentFields;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 9255fda..ab5cb80 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Template::Field;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 1fee0a1..bf9fd9b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Template::Fields;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 00940a7..b365ade 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Club::Templates;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 28fa41e..d206b90 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Clubs;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string );
index face2fc..512d4fa 100644 (file)
@@ -17,7 +17,7 @@ package Koha::Config;
 
 use Modern::Perl;
 
-use XML::LibXML ':libxml';
+use XML::LibXML qw( XML_ELEMENT_NODE XML_TEXT_NODE );
 
 # Default config file, if none is specified
 use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml";
index 1775160..dd743f8 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Config::SysPref;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 6a5ad95..8b08d71 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Config::SysPrefs;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 0ce658b..9ede81b 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 62385d0..e6c4db9 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course::Instructor;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 68211eb..f69dd48 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course::Instructors;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Course::Instructor;
 
index 948a90c..d55382c 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course::Item;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 7fc713d..9076540 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course::Items;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Course::Item;
 
index ff2e071..963a2ee 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course::Reserve;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 631ba49..e96cee6 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Course::Reserves;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Course::Reserve;
 
index f0fb3ec..df2a741 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Courses;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Course;
 
index 7edb35b..e5467be 100644 (file)
@@ -17,7 +17,6 @@ package Koha::CoverImage;
 
 use Modern::Perl;
 
-use Carp;
 use GD;
 
 use Koha::Database;
index 4dff96d..bf807b0 100644 (file)
@@ -17,7 +17,6 @@ package Koha::CoverImages;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 68fd8cf..c0d4d6a 100644 (file)
@@ -17,7 +17,6 @@ package Koha::CsvProfile;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 05dc6a3..1ea493a 100644 (file)
@@ -17,7 +17,6 @@ package Koha::CsvProfiles;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index df4d45c..fec7424 100644 (file)
@@ -33,7 +33,6 @@ Koha::Database
 =cut
 
 use Modern::Perl;
-use Carp;
 use C4::Context;
 use base qw(Class::Accessor);
 
index cd4379d..b92ec93 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Desk;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index a8b452c..20fb541 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Desks;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 5857f4e..7a09ee3 100644 (file)
@@ -21,28 +21,44 @@ 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 DateTime;
 use C4::Context;
 use Koha::Database;
-use Koha::DateUtils;
-use C4::Acquisition qw( NewBasket ModOrder);
+use Koha::DateUtils qw( dt_from_string );
+use C4::Acquisition qw( ModOrder NewBasket );
 use C4::Suggestions qw( ModSuggestion );
-use C4::Biblio qw( AddBiblio TransformKohaToMarc GetMarcBiblio GetFrameworkCode GetMarcFromKohaField );
+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;
 
 our $VERSION = 1.1;
-our @EXPORT_OK =
-  qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean );
+
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA = qw(Exporter);
+    @EXPORT_OK = qw(
+      process_quote
+      process_invoice
+      process_ordrsp
+      create_edi_order
+      get_edifact_ean
+    );
+};
 
 sub create_edi_order {
     my $parameters = shift;
index 3875627..b3b3bf4 100644 (file)
@@ -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;
 
index 8d14ba5..172e4fb 100644 (file)
@@ -23,7 +23,7 @@ use utf8;
 
 use MARC::Record;
 use MARC::Field;
-use Carp;
+use Carp qw( carp );
 
 sub new {
     my ( $class, $data_array_ref ) = @_;
index f1648c6..772eb03 100644 (file)
@@ -21,12 +21,11 @@ use utf8;
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-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;
index e52b6ef..833c44e 100644 (file)
@@ -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 {
index 9c077a6..5083af8 100644 (file)
@@ -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;
 
index eaebe57..05cfe3e 100644 (file)
@@ -5,11 +5,11 @@ use MARC::File::XML;
 use MARC::File::USMARC;
 
 use C4::AuthoritiesMarc;
-use C4::Biblio;
+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)           = @_;
index 578e035..be5174d 100644 (file)
@@ -18,7 +18,7 @@
 package Koha::ExternalContent;
 
 use Modern::Perl;
-use Carp;
+use Carp qw( croak );
 use base qw(Class::Accessor);
 
 use Koha;
index ad36c18..6247dfe 100644 (file)
@@ -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;
index 2e8c33b..10e5b6b 100644 (file)
@@ -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;
index ac4eaee..2e8a6c0 100644 (file)
@@ -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);
index 9ed7b45..b00a9a2 100644 (file)
@@ -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';
index dc5a016..d504fe4 100644 (file)
@@ -33,7 +33,6 @@ RecordProcessor.
 
 use strict;
 use warnings;
-use Carp;
 
 use base qw(Koha::RecordProcessor::Base);
 our $NAME = 'Null';
index 1b7ef74..0523b1b 100644 (file)
@@ -39,8 +39,7 @@ menu.
 =cut
 
 use Modern::Perl;
-use Carp;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcStructure );
 
 use base qw(Koha::RecordProcessor::Base);
 our $NAME    = 'MARC_ViewPolicy';
@@ -86,7 +85,7 @@ sub filter {
         my $result        = $current_record;
         my $hide          = _should_hide_on_interface();
 
-        my $marcsubfieldstructure = GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } );
+        my $marcsubfieldstructure = C4::Biblio::GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } );
 
         #if ($marcsubfieldstructure->{'000'}->{'@'}->{hidden}>0) {
         # LDR field is excluded from $current_record->fields().
index bd5458f..0aa9eab 100644 (file)
@@ -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;
-use C4::Log;
+use C4::Letters qw( GetPreparedLetter EnqueueLetter );
+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;
index 296f99c..fdc492b 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Holds;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index ca0ceae..64fab1d 100644 (file)
@@ -19,14 +19,21 @@ package Koha::I18N;
 
 use Modern::Perl;
 
-use CGI;
 use C4::Languages;
 use C4::Context;
 
 use Encode;
 use List::Util qw( first );
-use Locale::Messages qw(:locale_h LC_MESSAGES);
-use POSIX qw( setlocale );
+use Locale::Messages qw(
+    bindtextdomain
+    gettext
+    LC_MESSAGES
+    ngettext
+    npgettext
+    pgettext
+    textdomain
+);
+use POSIX;
 use Koha::Cache::Memory::Lite;
 
 use parent 'Exporter';
index 01d421f..2eaa5ac 100644 (file)
@@ -19,16 +19,13 @@ 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;
-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;
@@ -41,7 +38,7 @@ use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Libraries;
 
-use C4::Circulation qw( CanBookBeIssued AddIssue  );
+use C4::Circulation qw( CanBookBeIssued AddIssue );
 
 use base qw(Koha::Object);
 
index 9eaf623..82b7768 100644 (file)
@@ -19,7 +19,7 @@ package Koha::Illrequest::Config;
 
 use Modern::Perl;
 
-use File::Basename qw/basename/;
+use File::Basename qw( basename );
 
 use C4::Context;
 
index 971b3a8..2e7b1f0 100644 (file)
@@ -18,10 +18,9 @@ package Koha::Illrequest::Logger;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use JSON qw( to_json from_json );
-use Time::Local;
+use JSON qw( from_json to_json );
 
-use C4::Koha;
+use C4::Koha qw( GetAuthorisedValues );
 use C4::Context;
 use C4::Templates;
 use C4::Log qw( logaction );
index 47a86eb..c653dc2 100644 (file)
@@ -19,18 +19,16 @@ 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;
+use C4::Circulation qw( GetBranchItemRule );
 use C4::Reserves;
-use C4::ClassSource; # FIXME We would like to avoid that
+use C4::ClassSource qw( GetClassSort );
 use C4::Log qw( logaction );
 
 use Koha::Checkouts;
index 77e5309..6c343b6 100644 (file)
@@ -1,15 +1,19 @@
 package Koha::Item::Search::Field;
 
 use Modern::Perl;
-use base qw( Exporter );
-
-our @EXPORT_OK = qw(
-    AddItemSearchField
-    ModItemSearchField
-    DelItemSearchField
-    GetItemSearchField
-    GetItemSearchFields
-);
+
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA = qw(Exporter);
+    @EXPORT_OK = qw(
+        AddItemSearchField
+        ModItemSearchField
+        DelItemSearchField
+        GetItemSearchField
+        GetItemSearchFields
+    );
+};
 
 use C4::Context;
 
index 06588e0..286e0fd 100644 (file)
@@ -17,12 +17,11 @@ package Koha::Item::Transfer;
 
 use Modern::Perl;
 
-use Carp;
 
-use C4::Items;
+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);
index db9db50..195e54e 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Item::Transfer::Limit;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 738cc2a..be5c0e0 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Item::Transfers;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 939c977..258ce91 100644 (file)
@@ -17,9 +17,8 @@ package Koha::ItemType;
 
 use Modern::Perl;
 
-use Carp;
 
-use C4::Koha;
+use C4::Koha qw( getitemtypeimagelocation );
 use C4::Languages;
 use Koha::Database;
 use Koha::CirculationRules;
index 746bbb2..13caa64 100644 (file)
@@ -17,7 +17,6 @@ package Koha::ItemTypes;
 
 use Modern::Perl;
 
-use Carp;
 
 use C4::Languages;
 
index 1647983..2643223 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Items;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 332d047..da13ce1 100644 (file)
@@ -17,7 +17,6 @@ package Koha::KeyboardShortcut;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index de5c4a1..d75f4ce 100644 (file)
@@ -17,7 +17,6 @@ package Koha::KeyboardShortcuts;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 8a45cc2..20ceb8a 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Libraries;
 
 use Modern::Perl;
 
-use Carp;
 
 use C4::Context;
 
index af2319a..7ee84ba 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Library;
 
 use Modern::Perl;
 
-use Carp;
 
 use C4::Context;
 
index 4a4ea03..aaf6853 100644 (file)
@@ -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);
index dc17c21..f72e544 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Library::Groups;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index e234b71..0554c0b 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Library::OverDriveInfo;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index d8a028e..3a3509d 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Library::OverDriveInfos;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 4adea13..d4519e3 100644 (file)
@@ -32,7 +32,6 @@ Koha::Linktracker
 =cut
 
 use Modern::Perl;
-use Carp;
 use C4::Context;
 use base qw(Class::Accessor);
 
index c6f4384..28b1cd9 100644 (file)
@@ -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;
 
index 2751bf1..c91a3bb 100644 (file)
@@ -37,7 +37,6 @@ Koha::Logger
 use Modern::Perl;
 
 use Log::Log4perl;
-use Carp;
 
 use C4::Context;
 
index fb80dd0..e88d0da 100644 (file)
@@ -17,7 +17,6 @@ package Koha::MarcSubfieldStructure;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index e1e6bc8..03d3eba 100644 (file)
@@ -17,7 +17,6 @@ package Koha::MarcSubfieldStructures;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index acc7ccc..c728b34 100644 (file)
@@ -19,7 +19,6 @@ package Koha::MessageAttribute;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 2c314d7..5bc7057 100644 (file)
@@ -19,7 +19,6 @@ package Koha::MessageAttributes;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Objects);
 use Koha::MessageAttribute;
index 47dffe8..5a385e8 100644 (file)
@@ -22,14 +22,14 @@ use Modern::Perl;
 use base 'Class::Accessor';
 
 use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
-use C4::Search qw(); # Purely for new_record_from_zebra
+use C4::Search qw( new_record_from_zebra );
 use DBIx::Class::ResultClass::HashRefInflator;
 use IO::Select;
 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 ZOOM;
index ce792f7..3426ea5 100644 (file)
@@ -34,7 +34,7 @@ and authority) records in Koha.
 
 use Modern::Perl;
 
-use Carp;
+use Carp qw( carp );
 use C4::Biblio;
 use Koha::Util::MARC;
 
index 31e5b53..d16970a 100644 (file)
@@ -33,11 +33,10 @@ Authority data.
 
 use strict;
 use warnings;
-use Carp;
 use C4::Context;
 use MARC::Record;
 use MARC::File::XML;
-use C4::Charset;
+use C4::Charset qw( StripNonXmlChars );
 use Koha::Util::MARC;
 
 use base qw(Koha::MetadataRecord);
index 82f9918..5bb78a6 100644 (file)
@@ -19,7 +19,6 @@ package Koha::News;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Exceptions;
index cd33b51..152e777 100644 (file)
@@ -19,10 +19,9 @@ package Koha::NewsItem;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Libraries;
 use Koha::Patrons;
 
index 3cdb09d..fcf7eca 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Notice::Message;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 3ef9d94..3fedd5d 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Notice::Messages;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 95003a7..7669481 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Notice::Template;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 8105f97..27922e6 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Notice::Templates;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index a0e9221..83469b8 100644 (file)
@@ -20,7 +20,7 @@ package Koha::OAI::Server::Description;
 
 use Modern::Perl;
 use HTTP::OAI;
-use HTTP::OAI::SAXHandler qw/ :SAX /;
+use HTTP::OAI::SAXHandler qw( g_data_element );
 
 
 sub new {
index db94c51..4e4985e 100644 (file)
@@ -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");
index 03d13f7..877f7c1 100644 (file)
@@ -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 {
index 6826478..8a4be18 100644 (file)
@@ -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");
 
index ad18c2d..0c4c30b 100644 (file)
@@ -21,7 +21,7 @@ package Koha::OAI::Server::Repository;
 
 use Modern::Perl;
 use HTTP::OAI;
-use HTTP::OAI::Repository qw/:validate/;
+use HTTP::OAI::Repository qw( validate_request );
 
 use base ("HTTP::OAI::Repository");
 
@@ -35,7 +35,7 @@ use XML::SAX::Writer;
 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
index 806d42d..08602da 100644 (file)
@@ -20,14 +20,14 @@ package Koha::Object;
 
 use Modern::Perl;
 
-use Carp;
+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
index 1b7606f..557baf9 100644 (file)
@@ -21,7 +21,7 @@ use Koha::Database;
 use Koha::Exceptions;
 use Koha::Libraries;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index fab6f90..3ee0a55 100644 (file)
@@ -19,7 +19,7 @@ package Koha::Objects;
 
 use Modern::Perl;
 
-use Carp;
+use Carp qw( carp );
 use List::MoreUtils qw( none );
 use Class::Inspector;
 
index e12e144..415c4c9 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Old::Holds;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index e202fec..941dace 100644 (file)
@@ -20,21 +20,20 @@ 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 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;
index 713dcf9..892d00c 100644 (file)
@@ -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);
 
index f35f434..8ad1696 100644 (file)
@@ -2,11 +2,11 @@ package Koha::Patron::Discharge;
 
 use Modern::Perl;
 use CGI;
-use File::Temp qw( :POSIX );
-use Carp;
+use File::Temp qw( tmpnam );
+use Carp qw( carp );
 
 use C4::Templates qw ( gettemplate );
-use C4::Letters qw ( GetPreparedLetter );
+use C4::Letters qw( GetPreparedLetter );
 
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string output_pref );
index 06caa30..643ad2c 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Patron::Image;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index aec3919..02a907f 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Patron::Images;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index d56c07a..fa4473d 100644 (file)
@@ -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;
 
index 3bd98e3..7cc729a 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Patron::Messages;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 51f182a..3c92a62 100644 (file)
@@ -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);
 
index 1ca0ab1..f6665e8 100644 (file)
@@ -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);
 
index 0dafdae..5fb1402 100644 (file)
@@ -20,15 +20,14 @@ 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 vars qw(@ISA @EXPORT);
+use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
+use Koha::DateUtils qw( dt_from_string );
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
     require Exporter;
     @ISA = qw(Exporter);
-    push @EXPORT, qw(
+    @EXPORT_OK = qw(
       &ValidateBorrowernumber
       &SendPasswordRecoveryEmail
       &GetValidLinkInfo
index d8cbb1c..88ede2c 100644 (file)
@@ -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;
index 7c2a9bc..56f0fd9 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Patron::Relationships;
 
 use Modern::Perl;
 
-use Carp;
 use List::MoreUtils qw( uniq );
 
 use Koha::Database;
index 616fefa..4f2b559 100644 (file)
@@ -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);
 
index cd6f4aa..fe3fd80 100644 (file)
@@ -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;
+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
 
index 36e6090..b8f9f86 100644 (file)
@@ -19,13 +19,14 @@ 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 List::MoreUtils qw( any );
+use Module::Load::Conditional qw( can_load );
+use Module::Load;
 use Module::Pluggable search_path => ['Koha::Plugin'], except => qr/::Edifact(|::Line|::Message|::Order|::Segment|::Transport)$/;
 
+
 use C4::Context;
 use C4::Output;
 use Koha::Plugins::Methods;
index a5cb15e..e935e74 100644 (file)
@@ -19,14 +19,13 @@ 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};
 
 use C4::Context;
-use C4::Output qw(output_with_http_headers output_html_with_http_headers);
+use C4::Output qw( output_with_http_headers );
 
 =head1 NAME
 
index 6c6ae73..a32487d 100644 (file)
@@ -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;
index ce313b5..b6e2e75 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Plugins::Method;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 1e3e00d..e99b8b5 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Plugins::Methods;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 78a1190..70049a4 100644 (file)
@@ -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;
index 06ea08a..8b2e60b 100644 (file)
@@ -16,7 +16,6 @@ package Koha::PseudonymizedTransactions;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::PseudonymizedTransaction;
index 49868aa..3ce1985 100644 (file)
@@ -16,7 +16,6 @@ package Koha::Quote;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Carp;
 
 use Koha::Database;
 use Koha::Quotes;
index 746fff0..d9fc43f 100644 (file)
@@ -16,10 +16,9 @@ package Koha::Quotes;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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);
index d434ee5..cf7eea8 100644 (file)
@@ -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
 
index e6bb370..5603e60 100644 (file)
@@ -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;
 
index 1c6c035..1c22a76 100644 (file)
@@ -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
 
index ee07046..c420928 100644 (file)
@@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::Acquisition::Funds;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index e104ce5..cc12ecd 100644 (file)
@@ -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
 
index 8720a42..eb0d411 100644 (file)
@@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::Acquisition::Booksellers;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index 86a2f46..472d4ce 100644 (file)
@@ -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
 
index ea29bd6..2361aae 100644 (file)
@@ -38,10 +38,10 @@ use Koha::Exceptions;
 use Koha::Exceptions::Authentication;
 use Koha::Exceptions::Authorization;
 
-use MIME::Base64;
+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
 
index 92d3134..3ddb896 100644 (file)
@@ -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
 
index 8bb483b..12b6f30 100644 (file)
@@ -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;
 
index 8fc0718..e670987 100644 (file)
@@ -22,11 +22,11 @@ use Mojo::JSON;
 
 use C4::Auth qw( haspermission );
 use C4::Context;
-use C4::Circulation;
+use C4::Circulation qw( AddRenewal );
 use Koha::Checkouts;
 use Koha::Old::Checkouts;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index baa04b5..636985f 100644 (file)
@@ -21,7 +21,6 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::CirculationRules;
 
-use Try::Tiny;
 
 =head1 API
 
index cfa8d53..3dfc91d 100644 (file)
@@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::Cities;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 API
 
index 726f6f2..3333d75 100644 (file)
@@ -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
 
index 205f074..5949c53 100644 (file)
@@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::SMTP::Servers;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 API
 
index 08bf1a1..7541a5c 100644 (file)
@@ -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
 
index 9988d0f..ddac0ee 100644 (file)
@@ -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
 
index 21e7aa9..1887bce 100644 (file)
@@ -21,8 +21,8 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::Items;
 
-use List::MoreUtils qw(any);
-use Try::Tiny;
+use List::MoreUtils qw( any );
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index 9025adb..b6ec20e 100644 (file)
@@ -22,7 +22,7 @@ use Koha::Libraries;
 
 use Scalar::Util qw( blessed );
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index 090c789..922134d 100644 (file)
@@ -21,7 +21,7 @@ use Module::Load::Conditional;
 
 use C4::Context;
 use Koha::OAuth;
-use MIME::Base64;
+use MIME::Base64 qw( decode_base64 );
 
 use Mojo::Base 'Mojolicious::Controller';
 
index a88610b..80b64ee 100644 (file)
@@ -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
 
index 1bf64aa..1c932c0 100644 (file)
@@ -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
 
index f769765..4095a92 100644 (file)
@@ -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
 
index 82531d9..bb53ad5 100644 (file)
@@ -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
 
index 49c6e4c..53475ec 100644 (file)
@@ -21,7 +21,7 @@ use Mojo::Base 'Mojolicious::Controller';
 
 use Koha::Quotes;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 API
 
index c9fa833..850b0f7 100644 (file)
@@ -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
 
index 233fa4e..2b7f20e 100644 (file)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use Mojo::Base 'Mojolicious::Controller';
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 API
 
index 8ce8291..c7d056d 100644 (file)
@@ -25,7 +25,7 @@ use Koha::Exceptions::TransferLimit;
 
 use Scalar::Util qw( blessed );
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 =head1 NAME
 
index 9306181..35ecf0e 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Rating;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 8d3b50a..41e1197 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Ratings;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index a501c50..ec7cbea 100644 (file)
@@ -59,7 +59,7 @@ clone it I<prior> 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);
index 1e65102..176fb6e 100644 (file)
@@ -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 );
 
index 873f295..d0f952c 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Reports;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 68f6008..eae983e 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Review;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 517d936..5e9be0b 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Reviews;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index c651265..3771acf 100644 (file)
@@ -19,7 +19,6 @@ package Koha::SMS::Provider;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Patrons;
 
index 35a1aac..3cb2f90 100644 (file)
@@ -19,7 +19,6 @@ package Koha::SMS::Providers;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::SMS::Provider;
 
index f272e65..4f321b8 100644 (file)
@@ -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.
index aaa2e8b..d9e11ea 100644 (file)
@@ -35,8 +35,8 @@ This class should be used in all scripts. It sets the interface and userenv appr
 
 =cut
 
-use File::Basename;
-use Fcntl qw(:flock);
+use File::Basename qw( fileparse );
+use Fcntl qw( LOCK_EX LOCK_NB );
 
 use C4::Context;
 use Koha::Exceptions;
index 7aa1f85..7c08af9 100644 (file)
@@ -19,7 +19,7 @@ package Koha::SearchEngine;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Readonly;
+use Readonly qw( Readonly );
 
 =head1 NAME
 
index 74250f3..8950f8f 100644 (file)
@@ -28,23 +28,22 @@ use Koha::SearchFields;
 use Koha::SearchMarcMaps;
 use Koha::Caches;
 use C4::Heading;
-use C4::AuthoritiesMarc;
+use C4::AuthoritiesMarc qw( GuessAuthTypeCode );
 
-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 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 MIME::Base64 qw( encode_base64 );
+use Encode qw( encode );
 use Business::ISBN;
-use Scalar::Util qw(looks_like_number);
+use Scalar::Util qw( looks_like_number );
 
 __PACKAGE__->mk_ro_accessors(qw( index index_name ));
 __PACKAGE__->mk_accessors(qw( sort_fields ));
index 0c9b3ff..0a10832 100644 (file)
@@ -17,12 +17,11 @@ package Koha::SearchEngine::Elasticsearch::Indexer;
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-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;
index a39931a..45e8c1f 100644 (file)
@@ -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 List::MoreUtils qw( each_array );
 use Modern::Perl;
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 );
 
 use C4::Context;
 use Koha::Exceptions;
index ff56ad1..3afcf75 100644 (file)
@@ -50,9 +50,7 @@ use Koha::SearchEngine::Search;
 use Koha::Exceptions::Elasticsearch;
 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 ));
 
index 64262ff..e64fa35 100644 (file)
@@ -45,7 +45,6 @@ Creates a new C<Search> 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';
index 62a6b2c..11e6c94 100644 (file)
@@ -45,7 +45,7 @@ Creates a new C<QueryBuilder> 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");
index 0b72227..578ae89 100644 (file)
@@ -45,8 +45,8 @@ Creates a new C<Search> of whatever the relevant type is.
 
 use Modern::Perl;
 use C4::Context;
-use C4::Biblio qw//;
-use POSIX qw(ceil floor);
+use C4::Biblio;
+use POSIX qw( ceil );
 
 sub new {
     my $engine = C4::Context->preference("SearchEngine") // 'Zebra';
index 8ead358..01326d5 100644 (file)
@@ -18,7 +18,7 @@ package Koha::SearchEngine::Zebra::Indexer;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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
index 850469e..1d504d3 100644 (file)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use base qw(Class::Accessor);
 
-use C4::Search; # :(
+use C4::Search qw( getRecords ); # :(
 use C4::AuthoritiesMarc;
 use Koha::SearchEngine::Search;
 
@@ -62,7 +62,7 @@ This passes straight through to C4::Search::getRecords.
 sub search_compat {
     shift; # get rid of $self
 
-    return getRecords(@_);
+    return C4::Search::getRecords(@_);
 }
 
 =head2 simple_search_compat
index e6c80c7..32fa405 100644 (file)
@@ -17,7 +17,6 @@ package Koha::SearchField;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 29a8033..deef07a 100644 (file)
@@ -17,7 +17,6 @@ package Koha::SearchFields;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index bf86b78..6f28511 100644 (file)
@@ -17,7 +17,6 @@ package Koha::SearchMarcMap;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 338a51d..d4fb9ce 100644 (file)
@@ -17,7 +17,6 @@ package Koha::SearchMarcMaps;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 182edc7..052290e 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Serial;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 3d0b124..a68a729 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Serial::Item;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 7ddaed0..5cc563e 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Serial::Items;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 8cd8c01..ad58509 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Serials;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 7082fe0..0c5e406 100644 (file)
@@ -18,7 +18,7 @@ package Koha::SharedContent;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use JSON;
+use JSON qw( from_json to_json );
 use HTTP::Request;
 use LWP::UserAgent;
 
index 995e392..a501a94 100644 (file)
@@ -18,29 +18,23 @@ package Koha::SimpleMARC;
 
 use Modern::Perl;
 
-#use MARC::Record;
-
-require Exporter;
-
-our @ISA = qw(Exporter);
-our %EXPORT_TAGS = ( 'all' => [ qw(
-
-) ] );
-
-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
-our @EXPORT = qw(
-  read_field
-  add_field
-  update_field
-  copy_field
-  copy_and_replace_field
-  move_field
-  delete_field
-  field_exists
-  field_equals
-);
-
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    our @ISA = qw(Exporter);
+
+    @EXPORT_OK = qw(
+      read_field
+      add_field
+      update_field
+      copy_field
+      copy_and_replace_field
+      move_field
+      delete_field
+      field_exists
+      field_equals
+    );
+}
 
 =head1 NAME
 
index 63f147a..a397d62 100644 (file)
@@ -23,7 +23,7 @@ use Moo;
 use Modern::Perl;
 use XML::Writer;
 use IO::File;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 
 my $MAX = 50000;
index d6fd61f..397e440 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Statistic;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Items;
index ecbceeb..4b3a4eb 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Statistics;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 9ee92c1..58f0a6c 100644 (file)
@@ -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);
 
index 07ab168..45d1c09 100644 (file)
@@ -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);
 
index 4952625..9b60f21 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Subscription::Frequencies;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 475e744..abb47c3 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Subscription::Frequency;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 460aeda..3815cd2 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Subscription::Histories;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 4d309e2..e65e935 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Subscription::History;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index ede95b9..10cf094 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Subscription::Routinglist;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Subscriptions;
index 950d608..7678a9e 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Subscription::Routinglists;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Subscription::Routinglist;
index 86ee330..9636e9f 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Subscriptions;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index f9f8c2a..5542963 100644 (file)
@@ -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);
index ee1b2cc..f10f914 100644 (file)
@@ -53,7 +53,7 @@ B<new ()> - 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);
index cfb34da..cb53872 100644 (file)
@@ -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);
 
index cb05267..0c4656e 100644 (file)
@@ -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);
index 5356276..38d9df2 100644 (file)
@@ -18,7 +18,7 @@ package Koha::SuggestionEngine::Plugin::LibrisSpellcheck;
 
 use Modern::Perl;
 use LWP::UserAgent;
-use XML::Simple qw(XMLin);
+use XML::Simple qw( XMLin );
 use C4::Context;
 use base qw(Koha::SuggestionEngine::Base);
 
index e060350..fc7463e 100644 (file)
@@ -33,7 +33,6 @@ SuggestionEngine.
 
 use strict;
 use warnings;
-use Carp;
 
 use base qw(Koha::SuggestionEngine::Base);
 
index 39f4a52..03262bb 100644 (file)
@@ -19,7 +19,6 @@ package Koha::Suggestions;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 1597d7b..089aa4f 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Tag;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 08568e1..a9a2bba 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Tags;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Tag;
 
index bb0c4df..ee7153c 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Tags::Approval;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 43400f2..f7e72ae 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Tags::Approvals;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Tags::Approval;
 
index 66f6074..0b388ac 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Tags::Index;
 
 use Modern::Perl;
 
-use Carp;
 
 use base qw(Koha::Object);
 
index 56506a2..2ec40bc 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Tags::Indexes;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Tags::Index;
 
index 08748b4..0afe209 100644 (file)
@@ -45,7 +45,7 @@ use Modern::Perl;
 use Template::Plugin;
 use base qw( Template::Plugin );
 
-use File::Basename;
+use File::Basename qw( fileparse );
 use File::Spec;
 use C4::Context;
 use Koha;
index a8877b6..a666f20 100644 (file)
@@ -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 );
 
index 31d3748..5cb91b8 100644 (file)
@@ -21,7 +21,7 @@ use Modern::Perl;
 use Template::Plugin;
 use base qw( Template::Plugin );
 
-use C4::Koha;
+use C4::Koha qw( GetAuthorisedValues );
 use Koha::AuthorisedValues;
 
 sub GetByCode {
index 59d3588..db7b2fd 100644 (file)
@@ -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 {
index 919d3bc..43e2ef3 100644 (file)
@@ -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
 
index 042268f..783833f 100644 (file)
@@ -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;
 
index b75d36c..d313f73 100644 (file)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use base qw( Template::Plugin );
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use Koha::Plugins;
 
index 67902e6..dccd8e6 100644 (file)
@@ -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 {
index a3f226d..3f016be 100644 (file)
@@ -49,11 +49,11 @@ Koha::Token - Tokenizer
 =cut
 
 use Modern::Perl;
-use Bytes::Random::Secure ();
-use String::Random ();
-use WWW::CSRF ();
-use Digest::MD5 qw(md5_base64);
-use Encode qw( encode );
+use Bytes::Random::Secure;
+use String::Random;
+use WWW::CSRF;
+use Digest::MD5 qw( md5_base64 );
+use Encode;
 use Koha::Exceptions::Token;
 use base qw(Class::Accessor);
 use constant HMAC_SHA1_LENGTH => 20;
index 2f44e97..c453c6f 100644 (file)
@@ -19,9 +19,9 @@ package Koha::UploadedFiles;
 
 use Modern::Perl;
 
-use C4::Koha;
+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);
index 4cd6aaf..081bc3f 100644 (file)
@@ -69,7 +69,6 @@ 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;
 
index 9b29287..d3fcbb9 100644 (file)
@@ -22,11 +22,10 @@ package Koha::Util::FrameworkPlugin;
 
 use Modern::Perl;
 
-our ( @ISA, @EXPORT, @EXPORT_OK );
+our ( @ISA, @EXPORT_OK );
 BEGIN {
     require Exporter;
     @ISA = qw( Exporter );
-    @EXPORT = qw( );
     @EXPORT_OK = qw( wrapper date_entered );
 }
 
index 56f0a98..3648888 100644 (file)
@@ -18,7 +18,6 @@ package Koha::Util::MARC;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use MARC::Record;
 
 =head1 NAME
 
index 937c9bc..f86c444 100644 (file)
@@ -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 );
 
index c27c695..afecb2b 100644 (file)
@@ -17,9 +17,8 @@ package Koha::Virtualshelf;
 
 use Modern::Perl;
 
-use Carp;
 
-use C4::Auth;
+use C4::Auth qw( haspermission );
 
 use Koha::Patrons;
 use Koha::Database;
index f1fd87f..0a7eb5b 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Virtualshelfcontent;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 use Koha::Exceptions;
index 8da9bce..23776f3 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Virtualshelfcontents;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index a2e919b..5f61e27 100644 (file)
@@ -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);
index 4c5eda9..de709ff 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Virtualshelfshares;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 3dde3c3..25a3b01 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Virtualshelves;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index eb56273..09b5b58 100644 (file)
@@ -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;
 
index 006bfaf..6f663b5 100644 (file)
@@ -22,7 +22,7 @@ use Modern::Perl;
 use C4::Circulation qw( GetTransfers );
 use C4::Context;
 use C4::Reserves qw( GetReserveStatus );
-use C4::Search qw();
+use C4::Search qw( new_record_from_zebra );
 
 use Koha::Items;
 use Koha::Logger;
index a4228ca..21dc022 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Z3950Server;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 1aea08e..96bf352 100644 (file)
@@ -17,7 +17,6 @@ package Koha::Z3950Servers;
 
 use Modern::Perl;
 
-use Carp;
 
 use Koha::Database;
 
index 28f35a0..b0d4aff 100644 (file)
@@ -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 {
index d7d6912..8d51905 100644 (file)
@@ -21,20 +21,18 @@ package Koha::pdfformat::layout2pagesde;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 #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;
 
+our (@ISA, @EXPORT_OK);
 BEGIN {
-         use Exporter   ();
-         our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-       @ISA    = qw(Exporter);
-       @EXPORT = qw(printpdf);
+    require Exporter;
+    @ISA    = qw(Exporter);
+    @EXPORT_OK = qw(printpdf);
 }
 
 
index 9c2456b..fb0d557 100644 (file)
@@ -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 C4::Acquisition qw( get_rounded_price );
 use Koha::Number::Price;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Libraries;
 
 BEGIN {
index eb3d88e..1003583 100644 (file)
@@ -23,7 +23,7 @@ package Koha::pdfformat::layout3pagesfr;
 
 use vars qw(@ISA @EXPORT);
 use MIME::Base64;
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 use Modern::Perl;
 use utf8;
 
index 3320b36..be253d2 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -24,25 +24,22 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use DateTime::TimeZone;
-use File::Spec;
-use File::Slurp;
-use List::MoreUtils qw/ any /;
-use LWP::Simple;
-use Module::Load::Conditional qw(can_load);
-use XML::Simple;
-use Config;
+use File::Slurp qw( read_file );
+use List::MoreUtils qw( any );
+use Module::Load::Conditional qw( can_load );
+use Config qw( %Config );
 use Search::Elasticsearch;
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 use YAML::XS;
 use Encode;
 
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user get_user_subpermissions );
 use C4::Context;
 use C4::Installer::PerlModules;
 
 use Koha;
-use Koha::DateUtils qw(dt_from_string output_pref);
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Acquisition::Currencies;
 use Koha::BackgroundJob;
 use Koha::BiblioFrameworks;
index 6e46a86..3010c6a 100755 (executable)
@@ -29,10 +29,9 @@ this script is the main page for acqui
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
-use C4::Budgets;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
 use C4::Members;
 use Koha::Acquisition::Currencies;
 use Koha::Patrons;
index ea7b2ae..1246b01 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 
-use Koha::Patron::Categories;
+use Koha::Patron::Categories ;
 
 my $input = CGI->new;
 
index 7a77cfb..c0e68da 100755 (executable)
@@ -119,16 +119,21 @@ if it is an order from an existing suggestion : the id of this suggestion.
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use JSON qw ( to_json );
-use C4::Auth;           # get_template_and_user
-use C4::Acquisition;    # ModOrder
-use C4::Suggestions;    # ModStatus
-use C4::Biblio;         # AddBiblio TransformKohaToMarc
-use C4::Budgets;
-use C4::Items;
-use C4::Output;
-use C4::Log qw(logaction);
-use Koha::Acquisition::Currencies;
+use JSON qw( to_json );
+use C4::Auth qw( get_template_and_user );
+use C4::Acquisition qw( FillWithDefaultValues populate_order_with_prices ModOrder ModOrderUsers );
+use C4::Suggestions qw( ModSuggestion );
+use C4::Biblio qw(
+    AddBiblio
+    GetMarcFromKohaField
+    TransformHtmlToXml
+    TransformKohaToMarc
+);
+use C4::Budgets qw( GetBudget GetBudgetSpent GetBudgetOrdered );
+use C4::Items qw( AddItemFromMarc );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Log qw( logaction );
+use Koha::Acquisition::Currencies qw( get_active );
 use Koha::Acquisition::Orders;
 use Koha::Acquisition::Baskets;
 use C4::Barcodes;
index c445fb8..43abac8 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use Carp;
 use YAML::XS;
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils;
 use Encode;
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::ImportBatch;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches sub SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction );
 use C4::Matcher;
-use C4::Search qw/FindDuplicate/;
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Items;
-use C4::Koha;
-use C4::Budgets;
-use C4::Acquisition;
+use C4::Search qw( FindDuplicate );
+use C4::Acquisition qw( populate_order_with_prices );
+use C4::Biblio qw(
+    AddBiblio
+    GetMarcFromKohaField
+    GetMarcPrice
+    GetMarcQuantity
+    TransformHtmlToXml
+);
+use C4::Items qw( PrepareItemrecordDisplay sub AddItemFromMarc );
+use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget GetBudgetByCode );
+use C4::Acquisition qw( populate_order_with_prices );
 use C4::Suggestions;    # GetSuggestion
 use C4::Members;
 
index 41c0a8d..6d7034b 100755 (executable)
@@ -48,8 +48,8 @@ Default value for the dropbox.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Charset;
-use C4::Auth qw/check_api_auth/;
+use C4::Charset qw( NormalizeString );
+use C4::Auth qw( check_api_auth );
 use Koha::AuthorisedValues;
 
 my $query = CGI->new();
index 09545ee..fbf730c 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( get_template_and_user haspermission );
+use C4::Output qw( output_html_with_http_headers output_and_exit );
 use CGI qw ( -utf8 );
-use C4::Acquisition;
-use C4::Budgets;
-use C4::Contract;
-use C4::Biblio;
-use C4::Items;
-use C4::Suggestions;
+use C4::Acquisition qw( GetBasket CanUserManageBasket GetBasketAsCSV NewBasket NewBasketgroup ModBasket ReopenBasket ModBasketUsers GetBasketgroup GetBasketgroups GetBasketUsers GetOrders GetOrder get_rounded_price );
+use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
+use C4::Contract qw( GetContract );
+use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
 use Koha::Biblios;
 use Koha::Acquisition::Baskets;
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Orders;
 use Koha::Libraries;
-use C4::Letters qw/SendAlerts/;
-use Date::Calc qw/Add_Delta_Days/;
+use C4::Letters qw( SendAlerts );
+use Date::Calc qw( Add_Delta_Days );
 use Koha::Database;
-use Koha::EDI qw( create_edi_order get_edifact_ean );
+use Koha::EDI qw( create_edi_order );
 use Koha::CsvProfiles;
 use Koha::Patrons;
 
index 24a7fc8..2d4241e 100755 (executable)
@@ -44,15 +44,15 @@ The bookseller who we want to display the baskets (and basketgroups) of.
 =cut
 
 use Modern::Perl;
-use Carp;
+use Carp qw( croak );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
 use File::Spec;
 
-use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV get_rounded_price/;
-use Koha::EDI qw/create_edi_order get_edifact_ean/;
+use C4::Acquisition qw( GetOrders GetOrder get_rounded_price GetBasket GetBasketgroup GetBasketsByBasketgroup GetBasketgroups GetBasketsByBookseller ModBasket CloseBasketgroup GetBasketGroupAsCSV DelBasketgroup ReOpenBasketgroup ModBasketgroup NewBasket NewBasketgroup );
+use Koha::EDI qw( get_edifact_ean create_edi_order );
 
 use Koha::Biblioitems;
 use Koha::Acquisition::Booksellers;
index 6e76177..a7cd098 100755 (executable)
@@ -48,10 +48,10 @@ If it exists, C<$basketno> is the basket we edit
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition qw/GetBasket NewBasket ModBasketHeader/;
-use C4::Contract qw/GetContracts/;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Acquisition qw( GetBasket ModBasket ModBasketHeader NewBasket );
+use C4::Contract qw( GetContracts GetContract );
 
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Baskets;
index 8528a00..d3d09dd 100755 (executable)
@@ -52,13 +52,12 @@ The id of the supplier whose baskets we will display
 =cut
 
 use Modern::Perl;
-use C4::Auth;
-use C4::Biblio;
-use C4::Budgets;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
 
-use C4::Acquisition qw/ GetBasketsInfosByBookseller CanUserManageBasket /;
+use C4::Acquisition qw( GetBasket GetBasketsInfosByBookseller CanUserManageBasket GetBasketgroup );
 use C4::Context;
 
 use Koha::Acquisition::Booksellers;
index cfa9ec9..48e5b41 100755 (executable)
@@ -32,9 +32,8 @@ and add possibility to indicate a reason for cancellation
 use Modern::Perl;
 
 use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Acquisition::Baskets;
 
 my $input = CGI->new;
index be4e553..46379fa 100755 (executable)
@@ -20,9 +20,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Budgets;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Budgets qw( GetBudget );
 
 =head1 DESCRIPTION
 
index 37c4a22..b665b34 100755 (executable)
@@ -32,9 +32,9 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use JSON;
-use C4::Output;
-use C4::Items;
+use JSON qw( to_json );
+use C4::Output qw( output_with_http_headers );
+use C4::Items qw( SearchItems );
 
 my $input = CGI->new;
 my @field = $input->multi_param('field[]');
index 7bbefea..1964b41 100755 (executable)
@@ -21,14 +21,14 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition qw(GetHistory);
-use C4::Budgets qw(GetBudgetPeriods GetBudgetHierarchy CanUserUseBudget);
+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( GetBudgetHierarchy GetBudget CanUserUseBudget GetBudgetPeriods GetBudgetPeriod );
 use Koha::Acquisition::Baskets;
 use Koha::Acquisition::Currencies;
 use Koha::Acquisition::Orders;
-use Koha::DateUtils qw(dt_from_string output_pref);
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input    = CGI->new;
 my $basketno = $input->param('basketno');
index 1e05655..e95dbdf 100755 (executable)
@@ -23,9 +23,8 @@
 #
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
 use CGI;
 my $schema = Koha::Database->new()->schema();
index 8e603bb..179b234 100755 (executable)
@@ -20,11 +20,10 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
-use Koha::EDI qw(process_invoice);
+use Koha::EDI qw( process_invoice );
 
 my $q = CGI->new;
 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
index 46206ea..8ac9b80 100755 (executable)
 use Modern::Perl;
 
 use CGI;
-use Koha::Database;
+use Koha::Databas;
 use C4::Koha;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $q = CGI->new;
 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
index 961e3d5..95759c7 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use C4::Output;
 use C4::Context;
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Items;
+use C4::Acquisition qw( GetInvoice GetOrder populate_order_with_prices ModReceiveOrder );
+use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField TransformHtmlToXml );
+use C4::Items qw( GetMarcItem ModItemFromMarc AddItemFromMarc );
 use C4::Search;
 
 use Koha::Number::Price;
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Orders;
 
-use List::MoreUtils qw/any/;
 
 my $input=CGI->new;
 my $flagsrequired = {acquisition => 'order_receive'};
index e652fb9..cbb371d 100755 (executable)
@@ -51,12 +51,11 @@ to filter on ended date.
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;    # get_template_and_user
-use C4::Output;
-use C4::Acquisition;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Acquisition qw( GetHistory );
 use Koha::AdditionalFields;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input = CGI->new;
 my $do_search               = $input->param('do_search') || 0;
index a470c9f..d4e43cf 100755 (executable)
@@ -30,9 +30,9 @@ Manage files associated with invoice
 use Modern::Perl;
 
 use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Acquisition qw( GetInvoice GetInvoiceDetails );
 use Koha::Misc::Files;
 
 my $input = CGI->new;
index dfc4ab4..eaf804d 100755 (executable)
@@ -29,14 +29,14 @@ Invoice details
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
-use C4::Budgets;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
+use C4::Acquisition qw( CloseInvoice ReopenInvoice ModInvoice MergeInvoices DelInvoice GetInvoice GetInvoiceDetails get_rounded_price );
+use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
 
 use Koha::Acquisition::Booksellers;
-use Koha::Acquisition::Currencies;
-use Koha::DateUtils;
+use Koha::Acquisition::Currencies qw( get_active );
+use Koha::DateUtils qw( output_pref );
 use Koha::Misc::Files;
 use Koha::Acquisition::Invoice::Adjustments;
 
index 42e6328..b0e1db2 100755 (executable)
@@ -29,12 +29,12 @@ Search for invoices
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+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 Koha::DateUtils;
+use C4::Acquisition qw( GetInvoices GetInvoice );
+use C4::Budgets qw( GetBudget GetBudgets CanUserUseBudget );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Acquisition::Booksellers;
 
 my $input = CGI->new;
index 57a080d..a871777 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use Encode;
 
-use C4::Auth;
-use C4::Acquisition;
+use C4::Auth qw( get_template_and_user );
+use C4::Acquisition qw( GetOrder );
 use C4::Output;
 use C4::Context;
 
index 67354b2..5999ab0 100755 (executable)
@@ -45,14 +45,12 @@ To know on which branch this script have to display late order.
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+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;
-use Koha::DateUtils;
-use Koha::Acquisition::Orders;
+use C4::Letters qw( SendAlerts GetLetters );
+use Koha::DateUtils qw( dt_from_string output_pref );
+use Koha::Acquisition::Orders qw( filter_by_lates );
 use Koha::CsvProfiles;
 
 my $input = CGI->new;
index f529d4b..258fb63 100755 (executable)
@@ -29,9 +29,9 @@ Modify just notes when basket is closed.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Acquisition qw( GetOrder GetBasket ModOrder );
 
 use Koha::Acquisition::Booksellers;
 
index 0949fe0..22c7c3c 100755 (executable)
@@ -68,24 +68,30 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
 
-use C4::Auth;
-use C4::Budgets;
-
-use C4::Acquisition;
-use C4::Contract;
-use C4::Suggestions;   # GetSuggestion
-use C4::Biblio;                        # GetBiblioData GetMarcPrice
-use C4::Items; #PrepareItemRecord
-use C4::Output;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Budgets qw( GetBudget GetBudgetHierarchy CanUserUseBudget );
+
+use C4::Acquisition qw( GetOrder GetBasket FillWithDefaultValues GetOrderUsers );
+use C4::Contract qw( GetContract );
+use C4::Suggestions qw( GetSuggestion GetSuggestionInfo );
+use C4::Biblio qw(
+    AddBiblio
+    GetBiblioData
+    GetMarcBiblio
+    GetMarcFromKohaField
+    GetMarcPrice
+    GetMarcStructure
+    IsMarcStructureInternal
+);
+use C4::Output qw( output_and_exit output_html_with_http_headers );
 use C4::Members;
-use C4::Search qw/FindDuplicate/;
+use C4::Search qw( FindDuplicate );
 
 #needed for z3950 import:
-use C4::ImportBatch qw/GetImportRecordMarc SetImportRecordStatus SetMatchedBiblionumber/;
+use C4::ImportBatch qw( SetImportRecordStatus SetMatchedBiblionumber GetImportRecordMarc );
 
 use Koha::Acquisition::Booksellers;
-use Koha::Acquisition::Currencies;
+use Koha::Acquisition::Currencies qw( get_active );
 use Koha::BiblioFrameworks;
 use Koha::DateUtils qw( dt_from_string );
 use Koha::MarcSubfieldStructures;
index 7d3e8ba..e8d7765 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Acquisition;
-use C4::Auth;
+use C4::Acquisition qw( GetBasket );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Serials;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials qw( SearchSubscriptions subscriptionCurrentlyOnOrder check_routing );
 
 use Koha::Acquisition::Booksellers;
 
index f43e201..0ee1036 100755 (executable)
@@ -91,10 +91,9 @@ can be equal to
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;    # get_template_and_user
-use C4::Output;
-use C4::Suggestions;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Suggestions qw( ConnectSuggestionAndBiblio SearchSuggestion );
 use C4::Budgets;
 
 use Koha::Acquisition::Booksellers;
index 0f4e8c6..84b4955 100755 (executable)
@@ -30,10 +30,10 @@ this script is to show orders ordered but not yet received
 use C4::Context;
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+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;
index 177b170..f684a8e 100755 (executable)
@@ -62,18 +62,16 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Acquisition;
-use C4::Auth;
-use C4::Output;
-use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /;
+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 GetBudgetPeriods GetBudgetPeriod GetBudgetHierarchy CanUserUseBudget );
 use C4::Members;
-use C4::Items;
-use C4::Biblio;
-use C4::Suggestions;
-use C4::Koha;
+use C4::Biblio qw( GetMarcStructure );
+use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
 
 use Koha::Acquisition::Booksellers;
-use Koha::Acquisition::Currencies;
+use Koha::Acquisition::Currencies qw( get_active );
 use Koha::Acquisition::Orders;
 use Koha::DateUtils qw( dt_from_string );
 use Koha::ItemTypes;
index 90ccbe0..d00d9bd 100755 (executable)
@@ -56,23 +56,18 @@ To filter the results list on this given date.
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Acquisition;
-use C4::Budgets;
-use C4::Biblio;
-use C4::Items;
+use C4::Auth qw( get_template_and_user );
+use C4::Acquisition qw( CancelReceipt GetInvoice GetInvoiceDetails get_rounded_price );
+use C4::Budgets qw( _round GetBudget GetBudgetByOrderNumber GetBudgetName );
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Suggestions;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
 
 use Koha::Acquisition::Baskets;
 use Koha::Acquisition::Bookseller;
 use Koha::Acquisition::Orders;
 use Koha::Biblios;
-use Koha::DateUtils;
-use Koha::Biblios;
 
-use JSON;
 
 my $input = CGI->new;
 
index e5d4330..cd6e256 100755 (executable)
@@ -68,11 +68,11 @@ To know how many results have to be display / page.
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+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( GetInvoices GetInvoice AddInvoice );
+use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
 
 use Koha::Acquisition::Booksellers;
 use Koha::DateUtils qw( output_pref dt_from_string );
index 89255c9..da7cce5 100755 (executable)
@@ -18,8 +18,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Acquisition::Orders;
 use Koha::Patrons;
index b865648..b8269d0 100755 (executable)
@@ -30,11 +30,11 @@ this script is designed to show the spent amount in budgets
 =cut
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+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;
index 63d0b33..6766a1a 100755 (executable)
@@ -41,10 +41,9 @@ To know the bookseller this script has to display details.
 =cut
 
 use Modern::Perl;
-use C4::Auth;
-use C4::Contract;
-use C4::Biblio;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Contract qw( GetContracts GetContract );
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
 
 use C4::Budgets;
index 433821b..72f9087 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+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( GetOrder GetBasket TransferOrder GetBasketsByBookseller SearchOrders );
 use Koha::Acquisition::Booksellers;
 
 my $input = CGI->new;
index 2ee68af..770f8fc 100755 (executable)
@@ -45,12 +45,11 @@ The bookseller who we want to display the orders of.
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+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::Biblio qw/GetBiblioData/;
+use C4::Acquisition qw( SearchOrders GetOrder ModOrder );
 
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Baskets;
index 60c65e4..b195c88 100755 (executable)
@@ -47,11 +47,9 @@ contact_serialsprimary.
 =cut
 
 use Modern::Perl;
-use List::Util;
 use C4::Context;
-use C4::Auth;
+use C4::Auth qw( checkauth );
 
-use C4::Biblio;
 use C4::Output;
 
 use Koha::Acquisition::Bookseller::Contacts;
index 10399d5..d596cbf 100755 (executable)
 use Modern::Perl;
 use CGI qw/-utf8/;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Breeding;
-use C4::Koha;
+use C4::Breeding qw( Z3950Search );
 
 use Koha::Acquisition::Booksellers;
 use Koha::BiblioFrameworks;
index 027eb15..032301a 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 
 use Koha::Patron::Categories;
index 082854a..78dd1a8 100755 (executable)
@@ -18,9 +18,8 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::AdditionalFields;
 
 my $input = CGI->new;
index 9a076b0..73f2cc8 100755 (executable)
@@ -18,8 +18,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Plugins;
 
 my $query = CGI->new;
index 4b78a86..0fbe51c 100755 (executable)
@@ -34,13 +34,11 @@ This script allows the user to redefine the keyboard shortcuts for the advacned
 =cut
 
 use Modern::Perl;
-use Encode;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Koha;
 use Koha::KeyboardShortcuts;
 
 my $input            = CGI->new;
index 2d4e7c4..b593272 100755 (executable)
@@ -47,15 +47,14 @@ script to administer the budget periods table
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use List::Util qw/min/;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Database;
 use C4::Koha;
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+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( GetBudgetPeriod GetBudgetPeriods ModBudgetPeriod AddBudgetPeriod GetBudgets DelBudgetPeriod CloneBudgetPeriod MoveOrders );
 use Koha::Acquisition::Currencies;
 
 my $dbh = C4::Context->dbh;
@@ -176,7 +175,7 @@ elsif ( $op eq 'duplicate_budget' ){
     my $mark_original_budget_as_inactive = $input->param('mark_original_budget_as_inactive');
     my $reset_all_budgets = $input->param('reset_all_budgets');
 
-    my $new_budget_period_id = C4::Budgets::CloneBudgetPeriod(
+    my $new_budget_period_id = CloneBudgetPeriod(
         {
             budget_period_id        => $budget_period_id,
             budget_period_startdate => $budget_period_startdate,
@@ -198,7 +197,7 @@ elsif ( $op eq 'close_form' ) {
     my $budget_period = GetBudgetPeriod($budget_period_id);
 
     my $active_budget_periods =
-      C4::Budgets::GetBudgetPeriods( { budget_period_active => 1 } );
+      GetBudgetPeriods( { budget_period_active => 1 } );
 
     # Remove the budget period from the list
     $active_budget_periods =
@@ -235,7 +234,7 @@ elsif ( $op eq 'close_form' ) {
 elsif ( $op eq 'close_confirmed' ) {
     my $to_budget_period_id    = $input->param('to_budget_period_id');
     my $move_remaining_unspent = $input->param('move_remaining_unspent');
-    my $report                 = C4::Budgets::MoveOrders(
+    my $report                 = MoveOrders(
         {
             from_budget_period_id  => $budget_period_id,
             to_budget_period_id    => $to_budget_period_id,
index 0cf6527..4ed48d4 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use List::Util qw/min/;
 
 use Koha::Database;
-use C4::Auth qw/get_user_subpermissions/;
-use C4::Auth;
-use C4::Acquisition;
-use C4::Budgets;
+use C4::Auth qw( get_template_and_user );
+use C4::Budgets qw(
+    AddBudget
+    BudgetHasChildren
+    CanUserModifyBudget
+    CanUserUseBudget
+    DelBudget
+    GetBudget
+    GetBudgetAuthCats
+    GetBudgetHierarchy
+    GetBudgetPeriod
+    GetBudgetPeriods
+    GetBudgetUsers
+    ModBudget
+    ModBudgetUsers
+);
 use C4::Context;
-use C4::Output;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers output_and_exit );
 use Koha::Acquisition::Currencies;
 use Koha::Patrons;
 
index 8916087..83e99d7 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Contract;
-use Koha::DateUtils;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Contract qw(
+    AddContract
+    DelContract
+    GetContract
+    GetContracts
+    ModContract
+);
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 use Koha::Acquisition::Booksellers;
 
index a539b20..64b6cd0 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use List::Util qw/min/;
-use Date::Calc qw/Delta_YMD Easter_Sunday Today Decode_Date_EU/;
-use Date::Manip qw/ ParseDate UnixDate DateCalc/;
+use Date::Calc qw( Delta_YMD );
+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;
-use C4::Koha;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use Koha::Acquisition::Currencies;
 
 our $input = CGI->new;
index 4f8de64..ed3a9a5 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::AudioAlert;
 use Koha::AudioAlerts;
 
index fcb419e..2fbe31e 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Koha;
 
 use Koha::Authority::Types;
 use Koha::AuthorisedValues;
index 8a9ab47..1c952d5 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 use Koha::Authority::Types;
index cb59880..f772a84 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Output;
+use C4::Koha qw( getitemtypeimagelocation );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::AuthorisedValues;
 use Koha::AuthorisedValueCategories;
index 3b2f864..3fea873 100755 (executable)
@@ -22,8 +22,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Authorities;
 use Koha::Authority::Types;
index 413bb2e..9a47485 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use JSON qw( decode_json );
-use Try::Tiny;
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::BackgroundJobs;
 use Koha::Virtualshelves;
index 0d8a6a4..32f2ac1 100755 (executable)
@@ -21,8 +21,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Biblios;
 use Koha::BiblioFramework;
 use Koha::BiblioFrameworks;
index 455c04a..5a2a688 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
+use C4::Output qw( output_html_with_http_headers );
+use C4::Circulation qw( DeleteBranchTransferLimits CreateBranchTransferLimit IsBranchTransferAllowed );
 
 my $input = CGI->new;
 
index 282c547..b821f20 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Koha;
 
 use Koha::Database;
index ae39c11..db55b2a 100755 (executable)
@@ -21,13 +21,13 @@ use strict;
 use warnings;
 
 use CGI;
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use Koha::Libraries;
 use C4::Koha;
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Cash::Registers;
 
 my $cgi = CGI->new();
index d8d8513..368960f 100755 (executable)
@@ -22,12 +22,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Form::MessagingPreferences;
 use Koha::Patrons;
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patron::Categories;
 use Koha::Libraries;
 
index 1c98bd2..2274679 100755 (executable)
@@ -20,9 +20,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Budgets;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Budgets qw( CheckBudgetParent GetBudget );
 
 =head1 DESCRIPTION
 
index fbd79b2..649f0d6 100755 (executable)
@@ -20,9 +20,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Budgets;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Budgets qw( GetBudget GetBudgetPeriod );
 
 =head1 DESCRIPTION
 
index 126e90f..3dcda21 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Biblio;
 
 
 my $input = CGI->new;
index c7b03b0..f16c9d7 100755 (executable)
@@ -21,8 +21,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Cities;
 
index cbaf449..d8b9733 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::ClassSortRoutine;
-use C4::ClassSplitRoutine;
+use C4::Output qw( output_html_with_http_headers );
+use C4::ClassSortRoutine qw( GetSortRoutineNames );
+use C4::ClassSplitRoutine qw( GetSplitRoutineNames );
 use Koha::ClassSources;
 use Koha::ClassSortRules;
 use Koha::ClassSplitRules;
index d6acf89..9dc78d8 100755 (executable)
@@ -28,9 +28,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use Koha::CirculationRules;
 
 my $input = CGI->new;
index 3d9d68e..55d312d 100755 (executable)
@@ -2,9 +2,9 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Utils::DataTables::TablesSettings qw( get_modules );
 my $input = CGI->new;
 
index afbe72a..27f6edf 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Account::CreditType;
 use Koha::Account::CreditTypes;
index d3dfab5..28dc2d2 100755 (executable)
@@ -21,9 +21,9 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Currencies;
index 887e1e8..4021047 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Account::DebitType;
 use Koha::Account::DebitTypes;
index e401902..bc087a3 100755 (executable)
@@ -21,8 +21,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Desks;
 
index 9cafc13..b584c5b 100755 (executable)
@@ -3,11 +3,11 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::SuggestionEngine;
-use Module::Load::Conditional qw(can_load);
-use JSON;
+use Module::Load::Conditional qw( can_load );
+use JSON qw( from_json );
 
 my $input = CGI->new;
 
index 288fec5..293f7ef 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
 use Koha::Plugins;
 
index a7edcf2..87ebe45 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
 
 my $input = CGI->new();
index bd5ee83..735915d 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use CGI::Cookie;
 use C4::Context;
-use C4::Auth qw/check_cookie_auth/;
-use C4::ImportExportFramework;
+use C4::Auth qw( check_cookie_auth );
+use C4::ImportExportFramework qw( createODS ExportFramework ImportFramework );
 
 my %cookies = CGI::Cookie->fetch();
 my $authenticated = 0;
index ae6692d..67b71a3 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use File::Basename;
-use Encode;
-use JSON;
+use JSON qw( encode_json );
 #use Data::Dump 'pp';
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::ItemCirculationAlertPreference;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::ItemTypes;
 use Koha::Patron::Categories;
index ab48bab..569dce6 100755 (executable)
@@ -19,8 +19,8 @@
 use Modern::Perl;
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Item::Search::Field qw(GetItemSearchField ModItemSearchField);
 
index ac25486..0e62eb6 100755 (executable)
@@ -19,8 +19,8 @@
 use Modern::Perl;
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Item::Search::Field qw(AddItemSearchField GetItemSearchFields DelItemSearchField);
 
index 2370de9..8652c3d 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use File::Spec;
 
-use C4::Koha;
+use C4::Koha qw( getImageSets GetAuthorisedValues );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::ItemTypes;
 use Koha::ItemType;
 use Koha::Localizations;
index 842364d..e731cbe 100755 (executable)
@@ -22,9 +22,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use Koha::Database;
-use C4::Auth;
-use C4::Biblio;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::BiblioFrameworks;
 use Koha::Caches;
 use Koha::MarcSubfieldStructures;
index cf561c8..5284a88 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Libraries;
 use Koha::Library::Group;
index 3c296c6..58205d8 100755 (executable)
@@ -18,8 +18,8 @@
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Localization;
 use Koha::Localizations;
index 7ee7e26..636c3ad 100755 (executable)
@@ -18,8 +18,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
index 573abbc..7ce19f9 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 use Koha::Caches;
index 5241b2b..3cdbbb7 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Matcher qw/valid_normalization_routines/;
 
 my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
index e8b8b7e..0210396 100755 (executable)
@@ -33,11 +33,10 @@ the OR operator will be applied.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::OAI::Sets;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::OAI::Sets qw( GetOAISet GetOAISetMappings ModOAISetMappings );
 
-use Data::Dumper;
 
 my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
index 2d5aa50..015d713 100755 (executable)
@@ -29,11 +29,10 @@ Admin page to describe OAI SETs
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::OAI::Sets;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::OAI::Sets qw( AddOAISet DelOAISet GetOAISet GetOAISets ModOAISet );
 
-use Data::Dumper;
 
 my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
index ef12d60..3bff6da 100755 (executable)
@@ -19,9 +19,9 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Libraries;
 use Koha::Library::OverDriveInfos;
index f0c1654..2cf2bf6 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Patron::Attribute::Types;
 
 use Koha::AuthorisedValues;
index f3879d7..49d06ad 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Languages qw(getTranslatedLanguages);
-use C4::ClassSource;
-use C4::Log;
-use C4::Output;
+use C4::Koha qw( getallthemes );
+use C4::Languages qw( getTranslatedLanguages );
+use C4::ClassSource qw( GetClassSources GetClassSource );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Templates;
 use Koha::Acquisition::Currencies;
-use File::Spec;
 use IO::File;
 use YAML::XS;
 use Encode;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 # use Smart::Comments;
 #
index 4f71920..1058e94 100755 (executable)
@@ -17,9 +17,8 @@
 
 use Modern::Perl;
 use CGI;
-use Scalar::Util qw(looks_like_number);
+use Scalar::Util qw( looks_like_number );
 use List::Util qw( first );
-use C4::Koha;
 use C4::Output;
 use C4::Auth;
 use C4::Log;
@@ -30,8 +29,8 @@ use Koha::SearchMarcMaps;
 use Koha::SearchFields;
 use Koha::Caches;
 
-use Try::Tiny;
-use Module::Load::Conditional qw(can_load);
+use Try::Tiny qw( catch try );
+use Module::Load::Conditional qw( can_load );
 
 
 my $input = CGI->new;
index b4c7e0b..89dd4e0 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use JSON;
+use JSON qw( to_json );
 use HTTP::Request;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::SharedContent;
 
index 5c7cc22..7da7497 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Database;
 use Koha::Logger;
 use Koha::Libraries;
index ea02f15..a259b86 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use CGI;
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::SMS::Provider;
 use Koha::SMS::Providers;
index 19458a2..8c53bfc 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Scalar::Util qw(blessed);
-use Try::Tiny;
+use Scalar::Util qw( blessed );
+use Try::Tiny qw( catch try );
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Libraries;
 use Koha::SMTP::Servers;
index 298a4f5..6702377 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 # Initialize CGI, template
 
index e2e690c..1eb5455 100755 (executable)
@@ -43,13 +43,13 @@ ALSO :
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use MIME::Base64;
-use C4::Auth;
+use MIME::Base64 qw( encode_base64 );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Languages qw(getTranslatedLanguages);
-use C4::ClassSource;
-use C4::Output;
+use C4::Koha qw( getallthemes );
+use C4::Languages qw( getTranslatedLanguages );
+use C4::ClassSource qw( GetClassSources GetClassSource );
+use C4::Output qw( output_html_with_http_headers );
 use YAML::XS;
 
 my %tabsysprefs; #we do no longer need to keep track of a tab per pref (yaml)
index 8c67bda..dfa7f63 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation
-  qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $input = CGI->new;
 
index 935be87..29452ca 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
-use C4::HoldsQueue qw(TransportCostMatrix UpdateTransportCostMatrix);
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::HoldsQueue qw( TransportCostMatrix UpdateTransportCostMatrix );
 
 use Koha::Libraries;
 
-use Data::Dumper;
 
 my $input = CGI->new;
 
index 635704f..582e92a 100755 (executable)
@@ -18,9 +18,9 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use Koha::DateUtils qw( dt_from_string output_pref );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use Koha::DateUtils qw( output_pref );
 use Koha::Libraries;
 
 my $query = CGI->new;
index 54b85d9..d7dd416 100755 (executable)
@@ -27,8 +27,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
 use Koha::Z3950Servers;
 
index 93f57f2..f841c60 100755 (executable)
@@ -17,5 +17,5 @@
 
 use Modern::Perl;
 
-require Mojolicious::Commands;
+use Mojolicious::Commands;
 Mojolicious::Commands->start_app('Koha::REST::V1');
index ed6774f..6927765 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Acquisition;
-use C4::Koha;
 use Koha::SearchEngine::Search;
 use Koha::SearchEngine::QueryBuilder;
 
index 6915282..d46f68d 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 );
 use POSIX qw( ceil );
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::AuthoritiesMarc;
-use C4::Acquisition;
-use C4::Koha;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit pagination_bar output_html_with_http_headers );
+use C4::AuthoritiesMarc qw( DelAuthority );
 use C4::Search::History;
 
 use Koha::Authority::Types;
index 4e0ecb5..33c37aa 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::AuthoritiesMarc;
-use C4::ImportBatch; #GetImportRecordMarc
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::AuthoritiesMarc qw( GetAuthority );
+use C4::ImportBatch qw( GetImportRecordMarc );
 use C4::Context;
-use C4::Koha;
-use Date::Calc qw(Today);
+use Date::Calc qw( Today );
 use MARC::File::USMARC;
 use MARC::File::XML;
-use C4::Biblio;
+use C4::Biblio qw( TransformHtmlToMarc );
 use Koha::Authority::Types;
 use Koha::ItemTypes;
 use vars qw( $tagslib);
index 478a1bf..1dae908 100755 (executable)
@@ -38,13 +38,11 @@ parameters tables.
 
 use Modern::Perl;
 
-use C4::AuthoritiesMarc;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
+use C4::AuthoritiesMarc qw( GetAuthority );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use MARC::Record;
-use C4::Koha;
 
 use Koha::Authorities;
 use Koha::Authority::Types;
index 66bf8ce..0eb510a 100755 (executable)
@@ -38,13 +38,11 @@ parameters tables.
 
 use Modern::Perl;
 
-use C4::AuthoritiesMarc;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
+use C4::AuthoritiesMarc qw( GetAuthority );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use MARC::Record;
-use C4::Koha;
 # use C4::Biblio;
 # use C4::Catalogue;
 
index be86a81..1fefaa9 100755 (executable)
@@ -38,12 +38,11 @@ parameters tables.
 
 use Modern::Perl;
 
-use C4::AuthoritiesMarc;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
+use C4::AuthoritiesMarc qw( GetAuthority GenerateHierarchy );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use MARC::Record;
 use C4::Koha;
 use Koha::Authorities;
 
index b55ee7d..0703da8 100755 (executable)
@@ -2,9 +2,9 @@
 use Modern::Perl;
 
 use C4::Record;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
-use C4::AuthoritiesMarc;
+use C4::AuthoritiesMarc qw( GetAuthority );
 use CGI qw ( -utf8 );
 
 my $query = CGI->new;
index 3b5f6c0..9b29f06 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth;
-use C4::AuthoritiesMarc;
-use C4::Koha;
-use C4::Biblio;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::AuthoritiesMarc qw( GetAuthority ModAuthority DelAuthority );
+use C4::Biblio qw( TransformHtmlToMarc );
 
 use Koha::Authority::MergeRequests;
 use Koha::Authority::Types;
index 6ed4278..2bd17d0 100755 (executable)
@@ -4,11 +4,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use CGI::Cookie; # need to check cookies before CGI parses the POST request
-use JSON;
+use JSON qw( encode_json );
 
 use C4::Context;
-use C4::Auth qw/check_cookie_auth/;
-use C4::AuthoritiesMarc;
+use C4::Auth qw( check_cookie_auth );
+use C4::AuthoritiesMarc qw( GetTagsLabels );
 
 my %cookies = CGI::Cookie->fetch;
 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
index 92de7b1..fc3d51f 100755 (executable)
@@ -29,12 +29,12 @@ This script allows ajax call for dynamic authorities search
 
 use CGI qw ( -utf8 );
 use Modern::Perl;
-use JSON;
+use JSON qw( to_json );
 
 use C4::Context;
-use C4::Charset;
-use C4::Auth qw/check_cookie_auth/;
-use C4::Output;
+use C4::Charset qw( nsb_clean );
+use C4::Auth qw( check_cookie_auth );
+use C4::Output qw( output_with_http_headers );
 use Koha::SearchEngine::Search;
 use Koha::SearchEngine::QueryBuilder;
 
index 44727d2..30f73b8 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Koha;
-use C4::Biblio;
-use C4::Items;
-use C4::Auth;
-use C4::Output;
+use C4::Biblio qw(
+    GetBiblioData
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcSeries
+    GetMarcSubjects
+    GetMarcUrls
+);
+use C4::Items qw( GetItemsInfo );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::AuthorisedValues;
 use Koha::Biblios;
index f847877..c1e80bf 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw(encode);
+use Encode qw( encode );
 
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcBiblio );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Record;
-use C4::Ris;
+use C4::Ris qw( marc2ris );
 
 use Koha::CsvProfiles;
 
index 9e273b1..1ea56fc 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw(encode);
-use Carp;
-use Try::Tiny;
-
-use C4::Biblio;
-use C4::Items;
-use C4::Auth;
-use C4::Output;
-use C4::Templates ();
+use Encode;
+use Carp qw( carp );
+use Try::Tiny qw( catch try );
+
+use C4::Biblio qw(
+    GetBiblioData
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcSubjects
+);
+use C4::Items qw( GetItemsInfo );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
+use C4::Templates;
 use Koha::Email;
 use Koha::Token;
 
index d26780a..969aca1 100755 (executable)
@@ -36,15 +36,13 @@ This script needs a biblionumber as parameter
 use Modern::Perl;
 
 use HTML::Entities;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Koha;
-use C4::Biblio;
-use C4::Items;
-use C4::Serials;    # CountSubscriptionFromBiblionumber
-use C4::Search;                # enabled_staff_search_views
+use C4::Biblio qw( GetBiblioData GetFrameworkCode GetISBDView GetMarcBiblio );
+use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
+use C4::Search qw( z3950_search_args enabled_staff_search_views );
 
 use Koha::Biblios;
 use Koha::Patrons;
index e275077..7ddbbd4 100755 (executable)
@@ -47,21 +47,25 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use HTML::Entities;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Koha;
-use MARC::Record;
-use C4::Biblio;
-use C4::Items;
-use C4::Acquisition;
-use C4::Serials;    #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber
-use C4::Search;                # enabled_staff_search_views
+use C4::Biblio qw(
+    GetAuthorisedValueDesc
+    GetBiblioData
+    GetFrameworkCode
+    GetMarcBiblio
+    GetMarcFromKohaField
+    GetMarcStructure
+);
+use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
+use C4::Search qw( z3950_search_args enabled_staff_search_views );
 
 use Koha::Biblios;
 use Koha::BiblioFrameworks;
 use Koha::Patrons;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 use Koha::Virtualshelves;
 
 use List::MoreUtils qw( uniq );
index d4ab19e..b06c90a 100755 (executable)
@@ -20,26 +20,31 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use HTML::Entities;
-use Try::Tiny;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Serials;    #uses getsubscriptionfrom biblionumber
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::Circulation;
+use C4::Koha qw(
+    GetAuthorisedValues
+    getitemtypeimagelocation
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
+use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
+use C4::Items qw( GetAnalyticsCount GetHostItemsInfo GetItemsInfo );
+use C4::Circulation qw( GetTransfers );
 use C4::Reserves;
-use C4::Serials;
-use C4::XISBN qw(get_xisbns);
-use C4::External::Amazon;
-use C4::Search;        # enabled_staff_search_views
-use C4::Tags qw(get_tags);
-use C4::XSLT;
-use Koha::DateUtils;
+use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
+use C4::XISBN qw( get_xisbns );
+use C4::External::Amazon qw( get_amazon_tld );
+use C4::Search qw( z3950_search_args enabled_staff_search_views );
+use C4::Tags qw( get_tags );
+use C4::XSLT qw( XSLTParse4Display );
+use Koha::DateUtils qw( format_sqldatetime );
 use C4::HTML5Media;
-use C4::CourseReserves qw(GetItemCourseReservesInfo);
-use C4::Acquisition qw(GetOrdersByBiblionumber);
+use C4::CourseReserves qw( GetItemCourseReservesInfo );
 use Koha::AuthorisedValues;
 use Koha::Biblios;
 use Koha::CoverImages;
index cb6f2d8..3785116 100755 (executable)
@@ -2,11 +2,11 @@
 use Modern::Perl;
 
 use C4::Record;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio GetMarcControlnumber );
 use CGI qw ( -utf8 );
-use C4::Ris;
+use C4::Ris qw( marc2ris );
 
 
 
index 6180874..9dad680 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use JSON;
+use JSON qw( to_json );
 
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( check_api_auth );
+use C4::Biblio qw( GetMarcStructure );
+use C4::Output qw( output_with_http_headers );
 use Koha::Libraries;
 
 use Koha::AuthorisedValues;
index 9cc96c1..e9c43a3 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
-use C4::Search;
+use C4::Auth qw( get_template_and_user );
+use C4::Items qw( GetItemsInfo );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Search qw( enabled_staff_search_views );
 
 use Koha::Biblios;
 use Koha::Items;
index e81ec56..8d17dc9 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::Biblio;    # GetBiblio
-use C4::Search;                # enabled_staff_search_views
-use C4::Serials;
+use C4::Search qw( enabled_staff_search_views );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
 use Koha::Checkouts;
 use Koha::Old::Checkouts;
 
index fbc69bf..0867376 100755 (executable)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
 
 my $cgi = CGI->new;
index 0329f4b..9de6fc6 100755 (executable)
 use Modern::Perl;
 use CGI;
 
-use JSON;
+use JSON qw( to_json );
 
-use C4::Auth;
-use C4::Output;
-use C4::Items;
-use C4::Biblio;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers output_html_with_http_headers );
+use C4::Items qw( SearchItems );
+use C4::Koha qw( GetAuthorisedValues );
 
 use Koha::AuthorisedValues;
 use Koha::Biblios;
index 643d091..a8f33a6 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 ); 
 use HTML::Entities;
-use MARC::Record;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::Search;                # enabled_staff_search_views
-use C4::Serials;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Biblio qw(
+    GetBiblioData
+    GetFrameworkCode
+    GetMarcBiblio
+    GetMarcStructure
+);
+use C4::Search qw( z3950_search_args enabled_staff_search_views );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
 
 use Koha::Biblios;
 use Koha::BiblioFrameworks;
index 94a7eab..38eab6a 100755 (executable)
 
 
 use Modern::Perl;
-use C4::Koha;
+use C4::Koha qw( GetAuthorisedValues );
 use CGI qw ( -utf8 );
 use HTML::Entities;
-use C4::Biblio;
-use C4::Items;
-use C4::Acquisition;
-use C4::Output;
-use C4::Auth;
-use C4::Serials;
-use C4::Search;                # enabled_staff_search_views
+use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
+use C4::Items qw( GetHostItemsInfo GetItemsInfo );
+use C4::Acquisition qw( GetOrderFromItemnumber GetBasket GetInvoice );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
+use C4::Search qw( enabled_staff_search_views z3950_search_args );
 
 use Koha::Acquisition::Booksellers;
 use Koha::AuthorisedValues;
 use Koha::Biblios;
-use Koha::DateUtils;
 use Koha::Items;
 use Koha::Patrons;
 
index 092be2e..42bef7c 100755 (executable)
@@ -21,9 +21,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Search::History;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 
index 8bd70fc..632d9d2 100755 (executable)
@@ -140,14 +140,14 @@ use Modern::Perl;
 
 ## load Koha modules
 use C4::Context;
-use C4::Output;
-use C4::Auth qw(:DEFAULT get_session);
-use C4::Search;
-use C4::Languages qw(getLanguages);
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers pagination_bar );
+use C4::Auth qw( get_template_and_user );
+use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
+use C4::Languages qw( getlanguage getLanguages );
+use C4::Koha qw( getitemtypeimagelocation GetAuthorisedValues );
 use URI::Escape;
 use POSIX qw(ceil floor);
-use C4::Search::History;
+use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
 
 use Koha::ItemTypes;
 use Koha::Library::Groups;
index 7633b5f..8292bfe 100755 (executable)
@@ -24,16 +24,15 @@ use Modern::Perl;
 
 # standard or CPAN modules used
 use CGI qw(:standard -utf8);
-use DBI;
 use Encode;
 
 # Koha modules used
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
-use C4::ImportBatch;
-use C4::XSLT ();
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcBiblio GetXmlBiblio );
+use C4::ImportBatch qw( GetRecordFromImportBiblio );
+use C4::XSLT;
 
 my $input= CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 015b123..27813c0 100755 (executable)
 use Modern::Perl;
 use CGI;
 
-use C4::Auth;
-use C4::Output;
-use C4::Search;
-use C4::Serials;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Search qw( enabled_staff_search_views );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
 
 use Koha::Biblio;
 use Koha::Item;
 use Koha::StockRotationRotas;
 use Koha::StockRotationStages;
-use Koha::Util::StockRotation qw(:ALL);
+use Koha::Util::StockRotation qw( get_stages get_branches toggle_indemand remove_from_stage move_to_next_stage );
 
 my $input = CGI->new;
 
index 9ff9f9b..6d9022f 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use C4::Context;
-use C4::Biblio;
-use C4::Items;
 use C4::Output;
-use C4::Circulation;
+use C4::Circulation qw( LostItem );
 use C4::Reserves;
 
 my $cgi= CGI->new;
index 7eba09f..138fcea 100755 (executable)
 
 use Modern::Perl;
 
-use CGI q(-utf8);
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
-use C4::Search;
-use C4::AuthoritiesMarc;
+use CGI;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user haspermission );
+use C4::Biblio qw(
+    AddBiblio
+    DelBiblio
+    GetFrameworkCode
+    GetMarcBiblio
+    GetMarcFromKohaField
+    GetMarcStructure
+    GetUsedMarcStructure
+    ModBiblio
+    prepare_host_field
+    PrepHostMarcField
+    TransformHtmlToMarc
+);
+use C4::Search qw( FindDuplicate enabled_staff_search_views );
+use C4::Auth qw( get_template_and_user haspermission );
 use C4::Context;
 use MARC::Record;
-use C4::Log;
-use C4::Koha;
-use C4::ClassSource;
-use C4::ImportBatch;
-use C4::Charset;
+use C4::ClassSource qw( GetClassSources );
+use C4::ImportBatch qw( GetImportRecordMarc );
+use C4::Charset qw( SetMarcUnicodeFlag );
 use Koha::BiblioFrameworks;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 use Koha::ItemTypes;
 use Koha::Libraries;
 
 use Koha::BiblioFrameworks;
 
-use Date::Calc qw(Today);
 use MARC::File::USMARC;
 use MARC::File::XML;
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 );
 
 if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
     MARC::File::XML->default_record_format('UNIMARC');
index 53313bb..b9f3d6e 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use URI::Escape;
-use C4::Auth;
-use C4::Biblio;
-use C4::Breeding;
-use C4::Output;
-use C4::Koha;
-use C4::Languages qw(getlanguage);
-use C4::Search;
+use C4::Auth qw( get_template_and_user );
+use C4::Breeding qw( BreedingSearch );
+use C4::Output qw( output_html_with_http_headers pagination_bar );
+use C4::Koha qw( getnbpages );
+use C4::Languages;
+use C4::Search qw( searchResults z3950_search_args );
 
 use Koha::BiblioFrameworks;
 use Koha::SearchEngine::Search;
index b1e0357..faa5ab7 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
+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::Biblio qw(
+    GetAuthorisedValueDesc
+    GetFrameworkCode
+    GetMarcBiblio
+    GetMarcFromKohaField
+    GetMarcStructure
+    IsMarcStructureInternal
+    ModBiblio
+    TransformHtmlToXml
+    TransformMarcToKoha
+);
+use C4::Items qw( AddItemFromMarc ModItemFromMarc );
 use C4::Context;
-use C4::Circulation;
-use C4::Koha;
-use C4::ClassSource;
-use Koha::DateUtils;
+use C4::Circulation qw( LostItem );
+use C4::Koha qw( GetAuthorisedValues );
+use C4::ClassSource qw( GetClassSources GetClassSource );
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Libraries;
 use Koha::Patrons;
 use Koha::SearchEngine::Indexer;
-use List::MoreUtils qw/any/;
-use C4::Search;
-use Storable qw(thaw freeze);
-use URI::Escape;
+use List::MoreUtils qw( any );
+use C4::Search qw( enabled_staff_search_views );
+use Storable qw( freeze thaw );
+use URI::Escape qw( uri_escape_utf8 );
 use C4::Members;
 
 use MARC::File::XML;
-use URI::Escape;
-use MIME::Base64 qw(decode_base64url encode_base64url);
+use URI::Escape qw( uri_escape_utf8 );
+use MIME::Base64 qw( decode_base64url encode_base64url );
 
 our $dbh = C4::Context->dbh;
 
index cfef404..c2864a3 100755 (executable)
 use Modern::Perl;
 
 use CGI;
-use MARC::Record;
 
-use C4::Auth;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use DBIx::Class::ResultClass::HashRefInflator;
 use Koha::Database;
 use Koha::MarcSubfieldStructures;
index aaa4f1d..e6f8976 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Biblio qw( GetMarcBiblio ModBiblio PrepHostMarcField );
 use C4::Context;
-use C4::Koha;
 
 
 my $query = CGI->new;
index 7b1f816..7ed6ca1 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Output;
-use C4::Auth;
-use C4::Items;
-use C4::Biblio;
-use C4::Serials;
-use C4::Koha;
-use C4::Reserves qw/MergeHolds/;
-use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Items qw( MoveItemFromBiblio );
+use C4::Biblio qw(
+    DelBiblio
+    GetBiblioData
+    GetFrameworkCode
+    GetMarcBiblio
+    GetMarcFromKohaField
+    GetMarcStructure
+    ModBiblio
+    TransformHtmlToMarc
+);
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
+use C4::Reserves qw( MergeHolds );
+use C4::Acquisition qw( ModOrder GetOrdersByBiblionumber );
 
 use Koha::BiblioFrameworks;
 use Koha::Items;
index aef7dcb..6a76a45 100755 (executable)
@@ -4,11 +4,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use CGI::Cookie; # need to check cookies before CGI parses the POST request
-use JSON;
+use JSON qw( encode_json );
 
 use C4::Context;
-use C4::Biblio;
-use C4::Auth qw/check_cookie_auth/;
+use C4::Biblio qw( GetMarcStructure );
+use C4::Auth qw( check_cookie_auth );
 
 my %cookies = CGI::Cookie->fetch;
 my ( $auth_status, $sessionID ) = check_cookie_auth(
index c0d4641..39e1dad 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
+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::Koha;
 use C4::ClassSource;
 use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
 
 use Koha::Biblios;
 
-use Date::Calc qw(Today);
 
 use MARC::File::XML;
 
index 2e13d6a..691e69f 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 # Example of framework plugin new style.
 # It should define and return at least one and normally two anynomous
index 6a7b622..da1ec86 100755 (executable)
@@ -24,10 +24,10 @@ use Modern::Perl;
 
 use C4::Context;
 use C4::Barcodes::ValueBuilder;
-use C4::Biblio qw/GetMarcFromKohaField/;
-use Koha::DateUtils;
+use C4::Biblio qw( GetMarcFromKohaField );
+use Koha::DateUtils qw( dt_from_string output_pref );
 
-use Algorithm::CheckDigits;
+use Algorithm::CheckDigits qw( CheckDigits );
 
 my $builder = sub {
     my ( $params ) = @_;
index 907ce3d..a3840bd 100755 (executable)
@@ -24,8 +24,8 @@ use Modern::Perl;
 
 use C4::Context;
 use C4::Barcodes::ValueBuilder;
-use C4::Biblio qw/GetMarcFromKohaField/;
-use Koha::DateUtils;
+use C4::Biblio qw( GetMarcFromKohaField );
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $builder = sub {
     my ( $params ) = @_;
index 09f733f..37b7e16 100755 (executable)
@@ -22,9 +22,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 =head1 DESCRIPTION
 
index fd3b068..629f1c4 100755 (executable)
@@ -22,9 +22,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 =head1 DESCRIPTION
 
index 2acdcc7..b4e54ed 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use CGI;
 
-use C4::Auth;
-use C4::ClassSource;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::ClassSource qw( GetClassSort );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::ClassSources;
 
index c88f65c..1ce91e5 100755 (executable)
@@ -21,7 +21,7 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $builder = sub {
     my ( $params ) = @_;
index ea769fa..8579dc0 100755 (executable)
@@ -23,8 +23,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use C4::Context;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 
 my $builder = sub {
     my ( $params ) = @_;
index 4ff1c9a..b4f2852 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use XML::LibXML;
 
index ee7a91a..093653d 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $builder = sub {
     my ( $params ) = @_;
index 78961f4..9f87ae3 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use XML::LibXML;
 use Koha::Util::FrameworkPlugin qw|date_entered|;
index 414d9ff..e7a7f16 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Util::FrameworkPlugin qw|date_entered|;
 
 use constant FIXLEN_DATA_ELTS => '|| aca||aabn           | a|a     d';
index 9a19584..c5979f8 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Util::FrameworkPlugin qw|date_entered|;
 
 use constant FIXLEN_DATA_ELTS => 'baaaaaaa';
index 659bb9a..85f7346 100755 (executable)
@@ -22,9 +22,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $builder = sub {
     my ( $params ) = @_;
index 5bd0348..04a55ea 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $builder = sub {
     my ( $params ) = @_;
index adc520e..5bff564 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Search;
-use C4::Auth;
-use C4::Output;
+use C4::Search qw( new_record_from_zebra );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::Biblio;
-use C4::Koha;
-use MARC::Record;
+use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
 
 use Koha::ItemTypes;
 
index e2e5bc6..f01b45f 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index de487bd..fc1a941 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 # find today's date
 my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
index 8314d63..15ae94a 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 850fbe8..793cf10 100755 (executable)
@@ -22,8 +22,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::AuthorisedValues;
 
 =head1 DESCRIPTION
index be36fe2..e1f54ad 100755 (executable)
@@ -22,9 +22,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 =head1 DESCRIPTION
 
index 73b7ff7..56a5c5c 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 
 sub plugin_javascript {
index e5d746a..ef2e08b 100755 (executable)
 
 use Modern::Perl;
 
-use Date::Calc qw( Today );
+use Date::Calc;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 
 sub plugin_javascript {
index 4a0e588..ff7aa57 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 
 sub plugin_javascript {
index 9e80cd0..e239de6 100755 (executable)
@@ -22,12 +22,12 @@ use strict;
 #use warnings; FIXME - Bug 2505
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index de4fb67..488b6ba 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 4e7287c..79b173a 100755 (executable)
@@ -22,12 +22,12 @@ use strict;
 #use warnings; FIXME - Bug 2505
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index e052a1b..c741a8f 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
index de5e684..55adaf2 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
index ef6e503..858ab48 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
index 3e5c01f..4d4223c 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 0c8157a..1450a5e 100755 (executable)
@@ -22,12 +22,12 @@ use strict;
 #use warnings; FIXME - Bug 2505
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 39a6b84..0da0894 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 7c3b684..bc5bf1e 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index d98b488..0b326c4 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index f55b44e..cf74e41 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index c73698f..9fb25ff 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index c73698f..9fb25ff 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 5e95c6b..660d601 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index c73698f..9fb25ff 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 3ad3e93..51d6477 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index e8379e8..7ca7f07 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 7ec1b47..cfcb8d7 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 1b4ac5a..9d14d7a 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 51424f1..e004bdd 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index b9df679..19f8a13 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 35cbcbe..a100375 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 76e0e83..7322611 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 732b825..8a0836a 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 1262cdf..3f40b1e 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 958c660..4eb86d9 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 =head1 DESCRIPTION
 
index 9c64735..947050f 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 8c19929..d556949 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 7ec1b47..cfcb8d7 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 38c8827..f5ed0f7 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index b9c8709..1c261bc 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 329db61..9845a54 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index f1d3098..4b6ad8e 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index c237733..1c860bf 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 5a876ce..56ce4a1 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index a0cb7ec..19db6d6 100755 (executable)
@@ -22,12 +22,12 @@ use strict;
 #use warnings; FIXME - Bug 2505
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 3a95a5f..050f8ec 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 492ce14..467ecb4 100755 (executable)
@@ -22,12 +22,12 @@ use strict;
 #use warnings; FIXME - Bug 2505
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 4564392..907f3e3 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index 7bda1f3..4ffc85f 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::AuthoritiesMarc;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( pagination_bar output_html_with_http_headers );
 use CGI qw ( -utf8 );
 use C4::Search;
-use MARC::Record;
-use C4::Koha;
+use C4::Koha qw( getnbpages );
 
 ###TODO To rewrite in order to use SearchAuthorities
 
index dcfefc4..5204ddd 100755 (executable)
@@ -40,12 +40,12 @@ It need :
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
-use C4::AuthoritiesMarc;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
index 8a3a989..761302c 100755 (executable)
@@ -41,12 +41,13 @@ It need :
 
 use strict;
 #use warnings; FIXME - Bug 2505
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
-use C4::AuthoritiesMarc;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::AuthoritiesMarc qw( SearchAuthorities GetAuthority );
 
 =head1 DESCRIPTION
 
index 15990d0..5bfedad 100755 (executable)
@@ -24,11 +24,11 @@ biblioitems.collectiontitle
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw( -utf8 );
 use C4::Context;
 
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
index 9c2f024..8323059 100755 (executable)
@@ -22,15 +22,13 @@ use strict;
 #use warnings; FIXME - Bug 2505
 
 use CGI qw ( -utf8 );
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Search;
-use C4::Auth;
-use C4::Output;
+use C4::Search qw( new_record_from_zebra );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::Biblio;
-use C4::Koha;
-use MARC::Record;
+use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
 
 use Koha::ItemTypes;
 
index 778d0a9..38a1e48 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index c6388ec..895db7a 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
 my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
index cae62d0..44d8c93 100755 (executable)
 use Modern::Perl;
 
 use Koha::Util::FrameworkPlugin qw(wrapper);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
 
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 sub plugin_javascript {
     my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
index 1683da4..87a9aaa 100755 (executable)
@@ -27,9 +27,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Charset;
-use C4::Auth qw/check_cookie_auth/;
-use JSON qw/ to_json /;
+use C4::Charset qw( nsb_clean );
+use C4::Auth qw( check_cookie_auth );
+use JSON qw( to_json );
 
 my $input = CGI->new;
 my $query = $input->param('term');
index e97c47d..da93dac 100755 (executable)
@@ -20,11 +20,10 @@ use Modern::Perl;
 
 use CGI qw / -utf8 /;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Breeding;
-use C4::Koha;
+use C4::Breeding qw( Z3950Search Z3950SearchAuth );
 
 my $input        = CGI->new;
 my $dbh          = C4::Context->dbh;
index f5f0424..8acc92c 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Breeding;
-use C4::Koha;
+use C4::Breeding qw( Z3950Search );
 
 my $input        = CGI->new;
 my $error         = $input->param('error');
index 1c9630a..ee90af3 100755 (executable)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
 use Koha::Patron::Message;
 
index 2175561..18d03bb 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use CGI qw( -utf8 );
 
 use C4::Context;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Letters;
 use Koha::ArticleRequests;
 use Koha::Patrons;
index 3e856bc..3e918dd 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::ArticleRequests;
 
 my $query = CGI->new;
index 9a6af81..eaca8c4 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Circulation;
-use C4::Output;
-use C4::Koha;
-use C4::Auth;
+use C4::Output qw( output_and_exit output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use Koha::Biblios;
-use Koha::DateUtils;
 use Koha::Libraries;
 
 my $input        = CGI->new;
index 422b32c..0bea167 100755 (executable)
 use Modern::Perl;
 use C4::Context;
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth;
-use C4::Overdues;
-use C4::Biblio;
-use C4::Koha;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Overdues qw( GetOverduesForBranch );
+use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure );
+use C4::Koha qw( GetAuthorisedValues );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::BiblioFrameworks;
-use Data::Dumper;
 
 =head1 branchoverdues.pl
 
index 9a65275..4e23ae6 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Circulation;
-use C4::Output;
-use C4::Reserves;
-use C4::Biblio;
-use C4::Items;
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Koha;
+use C4::Circulation qw( transferbook );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reserves qw( ModReserve ModReserveAffect );
+use C4::Auth qw( get_session get_template_and_user );
 use C4::Members;
 use Koha::BiblioFrameworks;
 use Koha::AuthorisedValues;
index 61ce7cc..e94bea0 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use Koha::Checkouts;
 
 my $query = CGI->new;
index f68535d..239051d 100755 (executable)
@@ -18,8 +18,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 use Koha::BiblioFrameworks;
 use Koha::Checkouts;
index 4fd7261..7988782 100755 (executable)
@@ -29,15 +29,14 @@ use CGI qw ( -utf8 );
 use DateTime;
 use DateTime::Duration;
 use Scalar::Util qw( looks_like_number );
-use C4::Output;
-use C4::Auth qw/:DEFAULT get_session haspermission/;
+use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
+use C4::Auth qw( get_session get_template_and_user );
 use C4::Koha;
-use C4::Circulation;
+use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue );
 use C4::Utils::DataTables::Members;
 use C4::Members;
-use C4::Biblio;
-use C4::Search;
-use MARC::Record;
+use C4::Biblio qw( TransformMarcToKoha );
+use C4::Search qw( new_record_from_zebra );
 use C4::Reserves;
 use Koha::Holds;
 use C4::Context;
@@ -45,8 +44,8 @@ use CGI::Session;
 use Koha::AuthorisedValues;
 use Koha::CsvProfiles;
 use Koha::Patrons;
-use Koha::Patron::Debarments qw(GetDebarments);
-use Koha::DateUtils;
+use Koha::Patron::Debarments qw( GetDebarments );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Database;
 use Koha::BiblioFrameworks;
 use Koha::Items;
@@ -55,12 +54,7 @@ use Koha::SearchEngine;
 use Koha::SearchEngine::Search;
 use Koha::Patron::Modifications;
 
-use Date::Calc qw(
-  Today
-  Add_Delta_Days
-  Date_to_Days
-);
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 
 #
 # PARAMETERS READING
index 2ce3464..778c458 100755 (executable)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
 use Koha::Patron::Messages;
 
index 5d21f3d..61aef56 100755 (executable)
 
 use Modern::Perl;
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Reserves;
+use C4::Auth qw( get_session get_template_and_user );
+use C4::Reserves qw( ReserveSlip );
 
 my $input = CGI->new;
 my $sessionID = $input->cookie("CGISESSID");
index 01b1d7c..19eb644 100755 (executable)
@@ -18,7 +18,7 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 
 my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
index d1500d6..3843cb7 100755 (executable)
@@ -18,8 +18,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 my $query = CGI->new;
index c581e8e..41e9a87 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Circulation qw( GetPendingOnSiteCheckouts );
-use C4::Output;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::BiblioFrameworks;
 
 my $cgi = CGI->new;
index c402588..b8ed200 100755 (executable)
 
 use Modern::Perl;
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw(-oldstyle_urls -utf8);
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use Text::CSV_XS;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use DateTime;
 use DateTime::Format::MySQL;
 
index 9310f26..0b2fea2 100755 (executable)
@@ -25,13 +25,13 @@ use YAML::XS;
 use Encode;
 
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Items qw( ModItemTransfer );
+use C4::Auth qw( get_template_and_user );
+use C4::Items;
 use C4::Reserves qw( ModReserveCancelAll );
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Holds;
 use DateTime::Duration;
 
index acce777..3831554 100755 (executable)
@@ -21,11 +21,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
-use C4::Circulation;
-use C4::Koha;
-use Koha::DateUtils;
+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 Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Database;
 use Koha::BiblioFrameworks;
 
index fdbd74a..678c4c9 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Output;
-use C4::Auth;
+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;
-use C4::Serials;
+use C4::Search qw( enabled_staff_search_views );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
 use Koha::Biblios;
 use Koha::Patrons;
 use Koha::ArticleRequests;
index 812f9e4..7311d1e 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Date::Calc qw/Today Add_Delta_YM/;
 use POSIX qw( ceil );
 
 use C4::Context;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Acquisition qw/GetOrdersByBiblionumber/;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Acquisition::Baskets;
 
 my $input = CGI->new;
index e456e53..914d5de 100755 (executable)
@@ -34,25 +34,23 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use DateTime;
 
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
-use C4::Circulation;
-use C4::Reserves;
-use C4::Biblio;
-use C4::Circulation;
+use C4::Auth qw( get_template_and_user get_session haspermission );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Circulation qw( barcodedecode GetBranchItemRule AddReturn updateWrongTransfer LostItem );
+use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves );
+use C4::Circulation qw( barcodedecode GetBranchItemRule AddReturn updateWrongTransfer LostItem );
 use C4::Context;
-use C4::Items;
-use C4::Koha;   # FIXME : is it still useful ?
+use C4::Items qw( ModItemTransfer );
 use C4::Members::Messaging;
 use C4::Members;
-use C4::Output;
-use C4::Reserves;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves );
 use C4::RotatingCollections;
 use Koha::AuthorisedValues;
 use Koha::BiblioFrameworks;
 use Koha::Calendar;
 use Koha::Checkouts;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Holds;
 use Koha::Items;
 use Koha::Item::Transfers;
index b10ccc0..b03759b 100755 (executable)
@@ -21,9 +21,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use C4::Context;
-use C4::Output;
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user get_session );
 use Koha::BiblioFrameworks;
 use Koha::Cash::Registers;
 use Koha::Libraries;
index b0b6ba4..1bd013d 100755 (executable)
 use Modern::Perl;
 
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Circulation;
+use C4::Auth qw( get_session get_template_and_user );
+use C4::Circulation qw( TransferSlip );
 
 my $input = CGI->new;
 my $sessionID = $input->cookie("CGISESSID");
index 07679dd..fad59fd 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 my $input      = CGI->new;
 my $itemnumber = $input->param('itemnumber');
index ffa89b2..d0545b2 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
-use C4::Circulation;
+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 Date::Calc qw(
-  Today
-  Add_Delta_Days
-  Date_to_Days
-);
+use Date::Calc qw( Add_Delta_Days Date_to_Days Today );
 
-use C4::Koha;
 use C4::Reserves;
 use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Libraries;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::BiblioFrameworks;
 use Koha::Patrons;
 
index be63875..81b900b 100755 (executable)
@@ -24,11 +24,9 @@ This script displays items in the tmp_holdsqueue table
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::HoldsQueue qw(GetHoldsQueueItems);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::HoldsQueue qw( GetHoldsQueueItems );
 use Koha::BiblioFrameworks;
 use Koha::ItemTypes;
 
index 4f654a1..c9d4e84 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Circulation;
-use C4::Members;
-use C4::Biblio;
-use C4::Items;
-use Date::Calc qw(
-  Today
-  Add_Delta_Days
-  Date_to_Days
-);
-use C4::Reserves;
-use C4::Koha;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Items qw( ModItemTransfer );
+use Date::Calc qw( Date_to_Days Today );
+use C4::Reserves qw( ModReserve ModReserveCancelAll );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::BiblioFrameworks;
 use Koha::Items;
 use Koha::ItemTypes;
index a525686..75f6f1d 100755 (executable)
@@ -27,9 +27,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth qw/check_cookie_auth/;
+use C4::Auth qw( check_cookie_auth );
 use Koha::Patrons;
-use Koha::DateUtils qw/format_sqldatetime/;
+use Koha::DateUtils qw( format_sqldatetime );
 
 use JSON qw( to_json );
 
index 6163c70..3eac228 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Clubs;
 
 my $cgi = CGI->new;
index 058d822..4a41f5c 100755 (executable)
@@ -21,10 +21,10 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
-use Koha::DateUtils qw(dt_from_string);
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Clubs;
 use Koha::Club::Fields;
 
index d2d5a96..bb4dee6 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Clubs;
 use Koha::Club::Templates;
index 1fc47b4..1a12083 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Patrons;
 use Koha::Club::Enrollments;
index 3642996..367b3c0 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Clubs;
 
 my $cgi = CGI->new;
index 7e22af1..f32a6d1 100755 (executable)
@@ -21,10 +21,10 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use Koha::DateUtils qw(dt_from_string);
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Club::Templates;
 use Koha::Club::Template::Fields;
 use Koha::Club::Template::EnrollmentFields;
index 02999c2..10b74a4 100755 (executable)
@@ -22,13 +22,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Koha;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Koha qw( GetAuthorisedValues );
 use Koha::Items;
 
-use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve);
+use C4::CourseReserves qw( GetCourse GetCourseReserve ModCourse ModCourseItem ModCourseReserve );
 
 use Koha::Items;
 use Koha::ItemTypes;
index 8343da2..1f66ee8 100755 (executable)
@@ -23,9 +23,9 @@ use Modern::Perl;
 use CGI qw( -utf8 );
 use List::MoreUtils qw( uniq );
 
-use C4::Auth;
-use C4::Output;
-use C4::CourseReserves qw(ModCourseItem ModCourseReserve GetCourse);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::CourseReserves qw( GetCourse ModCourse ModCourseItem ModCourseReserve );
 
 use Koha::Items;
 
index bd78bc4..de0a49d 100755 (executable)
@@ -22,9 +22,9 @@ use Modern::Perl;
 use CGI qw( -utf8 );
 use List::MoreUtils qw( uniq );
 
-use C4::Auth;
-use C4::Output;
-use C4::CourseReserves qw(GetItemCourseReservesInfo DelCourseReserve GetCourseItem);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::CourseReserves qw( GetCourse GetCourseItem GetItemCourseReservesInfo DelCourse DelCourseReserve );
 
 use Koha::Items;
 
index 35b2bc7..e5c7efe 100755 (executable)
@@ -22,11 +22,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::CourseReserves qw(DelCourseReserve GetCourse GetCourseReserves);
+use C4::CourseReserves qw( DelCourse DelCourseReserve GetCourse GetCourseReserve GetCourseReserves );
 
 my $cgi = CGI->new;
 
index 1ecda7a..6dafac9 100755 (executable)
@@ -22,10 +22,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::CourseReserves qw(GetCourses);
+use C4::CourseReserves qw( GetCourse GetCourses );
 
 my $cgi = CGI->new;
 
index c5fb37b..8d66bdc 100755 (executable)
@@ -22,11 +22,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Koha qw( GetAuthorisedValues );
 
-use C4::CourseReserves qw(GetCourse);
+use C4::CourseReserves qw( GetCourse );
 
 my $cgi = CGI->new;
 
index 060b2a1..3abcb97 100755 (executable)
@@ -23,9 +23,9 @@ use CGI qw ( -utf8 );
 
 use C4::Output;
 use C4::Reserves;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 
-use C4::CourseReserves qw(DelCourse ModCourse ModCourseInstructors);
+use C4::CourseReserves qw( DelCourse ModCourse ModCourseInstructors );
 
 my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 9c62147..75df85f 100755 (executable)
@@ -28,7 +28,7 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use Authen::CAS::Client;
-use Storable qw(nstore_fd);
+use Storable qw( nstore_fd );
 
 my $casServerUrl = 'https://localhost:8443/cas/';
 my $cas = Authen::CAS::Client->new($casServerUrl);
index 6346b5e..ed2e357 100755 (executable)
@@ -33,9 +33,8 @@ This PGTIOU will allow us to retrive the matching PGTID
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use Authen::CAS::Client;
-use Storable qw(fd_retrieve);
-use LWP::Simple;
-use URI::Escape;
+use Storable qw( fd_retrieve );
+use LWP::Simple qw( get );
 
 my $casServerUrl = 'https://localhost:8443/cas/';
 my $cas = Authen::CAS::Client->new($casServerUrl);
index f2bf9d5..e3cfc5e 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index e16ca38..5cc3ac4 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index a6d40ff..0ffe905 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index d3187a6..1a45904 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index e2f0079..a784979 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index 4f80a50..df8940a 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
diff --git a/help.pl b/help.pl
index 4dd3ac3..9216253 100755 (executable)
--- a/help.pl
+++ b/help.pl
@@ -20,7 +20,7 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use Koha::Manual;
 
index dfc27ef..fef5e55 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Notice::Templates;
 use Koha::AuthorisedValues;
 use Koha::Illcomment;
@@ -31,9 +31,9 @@ use Koha::Illrequest::Availability;
 use Koha::Libraries;
 use Koha::Token;
 
-use Try::Tiny;
-use URI::Escape;
-use JSON;
+use Try::Tiny qw( catch try );
+use URI::Escape qw( uri_escape_utf8 );
+use JSON qw( encode_json );
 
 our $cgi = CGI->new;
 my $illRequests = Koha::Illrequests->new;
index e289e57..8c573cb 100755 (executable)
@@ -6,13 +6,9 @@
 use Modern::Perl;
 
 # CPAN modules
-use DBI;
-use Getopt::Long;
 
 # Koha modules
 use C4::Context;
-use C4::Items;
-use Data::Dumper;
 
 my $dbh = C4::Context->dbh;
 
index b3e4b06..b1fbdf6 100755 (executable)
@@ -22,11 +22,11 @@ use Modern::Perl;
 
 use C4::Context;
 use C4::Overdues qw/CalcFine/;
-use C4::Log qw/logaction/;
+use C4::Log qw( logaction );
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 my ($help, $verbose, $confirm, $log, $stdout_log);
 
index 6a8a1ec..c5a183d 100755 (executable)
 use strict;
 
 # CPAN modules
-use DBI;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 # Koha modules
 use C4::Context;
 
-use MARC::Record;
 use MARC::File::XML ( BinaryEncoding => 'utf8' );
  
 # FIXME - The user might be installing a new database, so can't rely
index 2b9084b..c1ad8a4 100755 (executable)
@@ -1,12 +1,10 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use Carp;
-use Data::Dumper;
+use Carp qw( croak );
 
-use Getopt::Long;
-use File::Basename;
-use File::Copy;
+use Getopt::Long qw( GetOptions );
+use File::Copy qw( copy );
 
 my $help_msg = <<EOH;
 This script does a first-cut conversion of koha HTML::Template template files (.tmpl).
index e5fc2e5..c87492b 100755 (executable)
 use Modern::Perl;
 use diagnostics;
 
-use C4::InstallAuth;
+use C4::InstallAuth qw( get_template_and_user );
 use CGI qw ( -utf8 );
-use POSIX qw(strftime);
+use POSIX;
 
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Templates;
-use C4::Languages qw(getAllLanguages getTranslatedLanguages);
+use C4::Languages qw( getAllLanguages getTranslatedLanguages );
 use C4::Installer;
 use C4::Installer::PerlModules;
 
index 9ec1a41..727bc93 100755 (executable)
 
 use Modern::Perl;
 use C4::Context;
-use C4::InstallAuth;
+use C4::InstallAuth qw( checkauth get_template_and_user );
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Members qw(checkcardnumber);
+use C4::Output qw( output_html_with_http_headers );
+use C4::Members qw( checkcardnumber );
 use Koha::Patrons;
 use Koha::Libraries;
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
 use Koha::Patron::Categories;
 use Koha::ItemTypes;
index 393a271..4157282 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/perl
 
-use Getopt::Long;
-use Pod::Usage;
-use Term::ANSIColor;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
+use Term::ANSIColor qw( color );
 use FindBin; # we need to enforce which C4::Installer is used in case more than one is installed
 
 use lib $FindBin::Bin;
index e8d738f..8c06a41 100755 (executable)
@@ -22,9 +22,7 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use Text::CSV_XS;
-use Data::Dumper;
 
-use C4::Creators;
 use C4::Labels;
 
 my $cgi = CGI->new;
index b76a013..f1cd471 100755 (executable)
@@ -21,7 +21,7 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Creators;
 use C4::Labels;
 
index 0df5875..3962cfb 100755 (executable)
@@ -22,9 +22,7 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use XML::Simple;
-use Data::Dumper;
 
-use C4::Creators;
 use C4::Labels;
 
 my $cgi = CGI->new;
index c263bc4..ac2da63 100755 (executable)
@@ -22,9 +22,9 @@ 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::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( get_label_summary html_table );
 use C4::Labels;
 
 use Koha::Items;
index 8c4e571..c9ca26c 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use POSIX;
+use POSIX qw( exit sprintf );
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw(
+    get_barcode_types
+    get_font_types
+    get_label_types
+    get_text_justification_types
+);
 use C4::Labels;
 
 my $cgi = CGI->new;
index 9e3fbe0..257bf43 100755 (executable)
@@ -22,9 +22,9 @@ 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::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( get_all_templates get_unit_values );
 use C4::Labels;
 
 my $cgi = CGI->new;
index 509250f..09adba3 100755 (executable)
@@ -21,8 +21,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::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 17186c7..9e6a019 100755 (executable)
@@ -22,9 +22,9 @@ 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::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( get_all_profiles get_unit_values );
 use C4::Labels;
 
 my $cgi = CGI->new;
index 4b3381c..3690c50 100755 (executable)
@@ -22,8 +22,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::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 0dc0ea5..161fca4 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use List::Util qw( max min );
-use POSIX qw(ceil);
+use POSIX qw( ceil );
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Search qw(SimpleSearch);
-use C4::Biblio qw(TransformMarcToKoha);
-use C4::Creators::Lib qw(html_table);
+use C4::Search qw( new_record_from_zebra );
+use C4::Biblio qw( TransformMarcToKoha );
+use C4::Creators::Lib qw( html_table );
 
 use Koha::Logger;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Items;
 use Koha::ItemTypes;
 use Koha::SearchEngine::Search;
index 05d57c9..01a7d5b 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Data::Dumper;
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw(
+    get_all_layouts
+    get_all_profiles
+    get_all_templates
+    get_batch_summary
+    html_table
+);
 use C4::Labels;
 
 my $cgi = CGI->new;
index 0d1e0bb..f3dd120 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Data::Dumper;
 
 use C4::Context;
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators::Lib qw(get_all_templates get_all_layouts get_output_formats);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators::Lib qw(
+    get_all_layouts
+    get_all_templates
+    get_output_formats
+);
 use C4::Labels::Batch;
 
 my $cgi = CGI->new;
index 3648670..b149f31 100755 (executable)
@@ -17,8 +17,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 # use Smart::Comments;
index ee9a820..76a6fc5 100755 (executable)
@@ -17,8 +17,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $scheme = C4::Context->preference('SpineLabelFormat');
 my $query  = CGI->new;
index 77d2a8d..88d25e7 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use CGI::Session::ErrorHandler;
-use YAML::XS ();
+use YAML::XS;
 
 $CGI::Session::Serialize::yamlxs::VERSION = '0.1';
 @CGI::Session::Serialize::yamlxs::ISA     = ( "CGI::Session::ErrorHandler" );
index 4000324..0999f58 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Koha;
-use C4::Tags qw/get_count_by_tag_status/;
+use C4::Tags qw( get_count_by_tag_status );
 use Koha::News;
 use Koha::Patron::Modifications;
 use Koha::Patron::Discharge;
index a5c3707..699993d 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 use Koha::Patrons;
 use Koha::Account::Lines;
index fb9051d..f6fde36 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
 
 use Koha::ApiKeys;
 use Koha::Patrons;
index 0cafc5f..b28e665 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use URI::Escape;
+use URI::Escape qw( uri_unescape );
 
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 use C4::Members;
 use C4::Accounts;
index 4c655fa..2f5ff42 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use Koha::Token;
 
 my $cgi = CGI->new;
index 78fd7f1..02e3714 100755 (executable)
@@ -25,13 +25,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Members;
-use C4::Suggestions qw( SearchSuggestion );
+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 );
+use C4::Suggestions;
 use Koha::Patrons;
 use Koha::Token;
 use Koha::Patron::Categories;
index 7e055c6..e0f4b2d 100755 (executable)
@@ -28,18 +28,17 @@ Allows librarian to edit and/or manage borrowers' discharges
 =cut
 
 use Modern::Perl;
-use Carp;
+use Carp qw( carp );
 
 use CGI qw( -utf8 );
-use C4::Auth;
-use C4::Output;
+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::Members;
 use C4::Reserves;
 use C4::Letters;
 use Koha::Patron::Discharge;
 use Koha::Patrons;
 
-use Koha::DateUtils;
 
 my $input = CGI->new;
 
index de19751..574f3d9 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI;
-use C4::Auth;
-use C4::Output;
+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::Context;
 use Koha::Patron::Discharge;
 
index 1cb9d61..2abfbc7 100755 (executable)
@@ -21,11 +21,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+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::Members;
 
-use Koha::DateUtils;
 use Koha::Patrons;
 use Koha::Patron::Files;
 use Koha::Patron::Categories;
index b5d31ed..40142eb 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 
 use Koha::Patron::Categories;
index c05bf43..8564c09 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Patrons;
 
index e3c0622..c86fad8 100755 (executable)
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
 use DateTime;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Libraries;
 use Koha::Patrons;
 use Koha::Patron::Categories;
index 771d1e7..f2b2384 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+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 Koha::Patrons;
 
 my $input = CGI->new;
index c691bc0..943230b 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 
 use C4::Members;
 use C4::Accounts;
-use C4::Items;
 
 use Koha::Items;
 use Koha::Patrons;
index 3cf02ca..ce1826a 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Try::Tiny;
-use URI::Escape;
+use Try::Tiny qw( catch try );
+use URI::Escape qw( uri_escape_utf8 );
 
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 use C4::Members;
 use C4::Accounts;
-use C4::Items;
 use Koha::Token;
 
 use Koha::Patrons;
index e343840..900a176 100755 (executable)
@@ -7,16 +7,14 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth qw(:DEFAULT :EditPermissions);
+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 get_all_subpermissions get_user_subpermissions );
 use C4::Context;
-use C4::Members;
-#use C4::Acquisitions;
 
 use Koha::Patron::Categories;
 use Koha::Patrons;
 
-use C4::Output;
+use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
 use Koha::Token;
 
 my $input = CGI->new;
index 879909a..d44f29d 100755 (executable)
@@ -6,20 +6,16 @@
 
 use Modern::Perl;
 
-use C4::Auth;
-use Koha::AuthUtils;
-use C4::Output;
+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::Context;
-use C4::Members;
-use C4::Circulation;
 use CGI qw ( -utf8 );
-use Koha::AuthUtils;
 use Koha::Token;
 
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 my $input = CGI->new;
 
index 970015b..4b4578c 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw( -utf8 );
-use Koha::DateUtils;
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 use Koha::Patrons;
 
 my $input = CGI->new;
index cb5bbf9..5844b9c 100755 (executable)
@@ -23,22 +23,20 @@ use Modern::Perl;
 
 # external modules
 use CGI qw ( -utf8 );
-use List::MoreUtils qw/uniq/;
 
 # internal modules
-use C4::Auth;
+use C4::Auth qw( get_template_and_user haspermission );
 use C4::Context;
-use C4::Output;
-use C4::Members;
-use C4::Koha;
-use C4::Log;
-use C4::Letters;
+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 );
 use C4::Form::MessagingPreferences;
 use Koha::AuthUtils;
 use Koha::AuthorisedValues;
-use Koha::Patron::Debarments;
+use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
 use Koha::Cities;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Libraries;
 use Koha::Patrons;
 use Koha::Patron::Attribute::Types;
index 470f0b5..55b3f3e 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 use C4::Members;
 use Koha::Patron::Modifications;
 use Koha::Libraries;
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 use Koha::Patron::Categories;
 
 my $query = CGI->new;
index f89f0e2..88d021a 100755 (executable)
@@ -19,7 +19,7 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
 use C4::Context;
 use Koha::Patrons;
index 6be1924..9965d49 100755 (executable)
@@ -20,8 +20,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 use C4::Members;
 use Koha::Patron::Attribute::Types;
index ca03168..5318ff6 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 use Koha::Patrons;
 
index 1b7d4a4..977cb2f 100755 (executable)
@@ -21,9 +21,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use Koha::DateUtils;
-use Koha::Patron::Debarments;
+use C4::Auth qw( checkauth );
+use Koha::DateUtils qw( dt_from_string );
+use Koha::Patron::Debarments qw( AddDebarment DelDebarment );
 
 my $cgi = CGI->new;
 
index 8586dc9..af3d324 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+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::Form::MessagingPreferences;
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 use Scalar::Util qw( looks_like_number );
 use Koha::Patron::Attribute::Types;
-use Koha::Patron::Debarments qw(GetDebarments);
+use Koha::Patron::Debarments qw( GetDebarments );
 use Koha::Patron::Messages;
-use Koha::DateUtils;
 use Koha::CsvProfiles;
 use Koha::Holds;
 use Koha::Patrons;
index a43a39e..c729d3f 100755 (executable)
@@ -20,8 +20,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 use C4::Members;
 use C4::Letters;
index fa7c74a..2718116 100755 (executable)
 
 use Modern::Perl;
 
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 uri_unescape );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 use C4::Members;
 use C4::Accounts;
@@ -42,7 +42,7 @@ use Koha::Patrons;
 use Koha::Items;
 
 use Koha::Patron::Categories;
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 uri_unescape );
 
 our $input = CGI->new;
 
index c30d896..d5cbd60 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use URI::Escape;
+use URI::Escape qw( uri_escape uri_unescape );
 use CGI qw ( -utf8 );
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Members;
+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::Accounts;
 use C4::Koha;
 
@@ -34,7 +33,7 @@ use Koha::Patron::Categories;
 use Koha::AuthorisedValues;
 use Koha::Account;
 use Koha::Token;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 
 my $input = CGI->new();
 
index dda9017..ead651b 100755 (executable)
@@ -22,9 +22,9 @@ use Modern::Perl;
 use CGI;
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Overdues qw(parse_overdues_letter);
+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::Overdues qw( parse_overdues_letter );
 
 use Koha::Patrons;
 
index 2e3dff7..d366cc8 100755 (executable)
@@ -20,8 +20,8 @@
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 use C4::Letters;
 use Koha::Account::Lines;
index 97b7f58..1f8480e 100755 (executable)
@@ -20,8 +20,8 @@
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+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 CGI qw ( -utf8 );
 use C4::Letters;
 use Koha::Account::Lines;
index 3fcaf21..1bb11f6 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
-use C4::Members;
-use C4::Koha;
-use Koha::DateUtils;
+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::Members qw( IssueSlip );
 
 my $input = CGI->new;
 my $sessionID = $input->cookie("CGISESSID");
index ea42f3c..6a97251 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
 use C4::Members;
-use C4::Suggestions;
+use C4::Suggestions qw( SearchSuggestion );
 use Koha::Patrons;
 
 my $input = CGI->new;
index e87a6a0..b0e2a5b 100755 (executable)
@@ -24,11 +24,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Members;
-use List::MoreUtils qw/any uniq/;
-use Koha::DateUtils;
+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::Members qw( GetAllIssues );
+use List::MoreUtils qw( uniq );
+use Koha::DateUtils qw( dt_from_string );
 
 use Koha::Patrons;
 use Koha::Patron::Categories;
index dee5845..81ad798 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth qw/:DEFAULT/;
+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 );
 use C4::Members;
 use C4::Context;
 use C4::Serials;
index 66ae8b5..83ef159 100755 (executable)
@@ -26,9 +26,9 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
+use C4::Auth qw( checkauth );
 use C4::Context;
 use C4::Members;
-use C4::Auth;
 use Koha::Patrons;
 
 
index ee3f787..e407eaf 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::Members;
-use C4::Members::Statistics;
-use C4::Output;
+use C4::Members::Statistics qw(
+    GetPrecedentStateByBorrower
+    GetTotalIssuesReturnedTodayByBorrower
+    GetTotalIssuesTodayByBorrower
+);
+use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
 use Koha::Patrons;
 use Koha::Patron::Categories;
 
index ab052ca..6c6ed92 100755 (executable)
@@ -19,13 +19,12 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+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::Members;
 use C4::Circulation qw( GetIssuingCharges );
 use C4::Reserves;
-use C4::Items;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Holds;
 use Koha::ItemTypes;
 use Koha::Patrons;
index d2f9c49..f6f3e0c 100755 (executable)
@@ -29,8 +29,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+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 Koha::Patrons;
 use Koha::Patron::Categories;
 use Koha::Patrons;
index b7ab77c..f619f52 100755 (executable)
 use Modern::Perl;
 
 BEGIN {
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use MARC::Field;
 
 use C4::Biblio;
index 0915143..2c91c96 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use Bytes::Random::Secure;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use String::Random;
 
 use Koha::Patrons;
index 5d409cd..7987289 100755 (executable)
@@ -16,8 +16,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use JSON qw( encode_json decode_json );
-use Try::Tiny;
+use JSON qw( decode_json );
+use Try::Tiny qw( catch try );
 
 use Koha::BackgroundJobs;
 
index af8a667..ca5c861 100755 (executable)
@@ -7,7 +7,7 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
@@ -15,10 +15,9 @@ BEGIN {
 use Koha::Script;
 use C4::Context;
 use MARC::File::USMARC;
-use MARC::Record;
 use MARC::Batch;
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use IO::File;
 
 my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
index a80d4fd..1cfaf3c 100755 (executable)
@@ -6,18 +6,17 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 # Koha modules used
 use Koha::Script;
-use MARC::Record;
 use C4::Context;
-use C4::Biblio;
-use Time::HiRes qw(gettimeofday);
+use C4::Biblio qw( GetMarcStructure );
+use Time::HiRes qw( gettimeofday );
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 my ( $input_marc_file, $number) = ('',0);
 my ($version, $confirm,$test_parameter);
 GetOptions(
index f8a12b5..b96e012 100755 (executable)
@@ -6,7 +6,7 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
@@ -14,13 +14,12 @@ BEGIN {
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use MARC::Record;
+use C4::Biblio qw( GetMarcFromKohaField );
 use MARC::File::USMARC;
 use MARC::File::XML;
 use MARC::Batch;
-use Time::HiRes qw(gettimeofday);
-use Getopt::Long;
+use Time::HiRes qw( gettimeofday );
+use Getopt::Long qw( GetOptions );
 use IO::File;
 
 my  $input_marc_file = '';
index edc7c16..ce4782f 100755 (executable)
@@ -8,7 +8,7 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
@@ -17,10 +17,13 @@ use Koha::Script;
 use MARC::Record;
 use C4::Charset;
 use C4::Context;
-use C4::Biblio;
-use Time::HiRes qw(gettimeofday);
+use C4::Biblio qw(
+    GetXmlBiblio
+    TransformMarcToKoha
+);
+use Time::HiRes qw( gettimeofday );
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 my ($version, $confirm);
 GetOptions(
index 58630cb..13f0c41 100755 (executable)
@@ -2,16 +2,16 @@
 
 use Modern::Perl;
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use MARC::Field;
 use MARC::Record;
-use Pod::Usage;
-use Time::HiRes qw(gettimeofday);
+use Pod::Usage qw( pod2usage );
+use Time::HiRes qw( gettimeofday );
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use C4::Items;
+use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField );
+use C4::Items qw( ModItemFromMarc );
 
 =head1 NAME
 
index 69e15a6..32e9913 100755 (executable)
@@ -7,14 +7,14 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 # Koha modules used
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio ModBiblioMarc );
 
 
 my $dbh = C4::Context->dbh;
index 3ae5cd9..0abe2b4 100755 (executable)
@@ -1,12 +1,11 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
-use IO::File;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
-use C4::Biblio;
+use C4::Biblio qw( DelBiblio );
 
 my $help;
 GetOptions(
index 9d430ff..722e2bf 100755 (executable)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 my ($help, $config, $daemon);
 
@@ -86,17 +86,17 @@ exit;
 {
 package ImportProxyServer;
 
-use Carp;
-use IO::Socket::INET;
+use Carp qw( croak );
+use IO::Socket::INET qw( SOCK_STREAM );
 # use IO::Socket::IP;
 use IO::Select;
-use POSIX;
-use HTTP::Status qw(:constants);
+use POSIX qw( close exit fork localtime open printf sprintf );
+use HTTP::Status qw( HTTP_FORBIDDEN HTTP_UNAUTHORIZED );
 use strict;
 use warnings;
 
 use LWP::UserAgent;
-use XML::Simple;
+use XML::Simple qw( XMLin );
 use MARC::Record;
 use MARC::File::XML;
 
index 942d8f2..aed792c 100755 (executable)
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 
-use File::Find;
+use File::Find qw( find );
 
 use Koha::Script;
 use C4::Context;
index 639f7df..2a24343 100755 (executable)
@@ -5,14 +5,14 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use C4::ImportBatch;
-use Getopt::Long;
+use C4::ImportBatch qw( GetImportBatch BatchCommitRecords BatchRevertRecords );
+use Getopt::Long qw( GetOptions );
 
 $| = 1;
 
index f1df975..c1d6ac6 100755 (executable)
@@ -38,24 +38,20 @@ the OPAC.
 
 use strict;
 use warnings;
-use Getopt::Long;
-use Pod::Usage;
-use Data::Dumper;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 use Koha::Script -cron;
-use C4::Biblio;
 use C4::Context;
 use C4::Letters;
 use C4::Members;
 use C4::Members::Messaging;
-use C4::Overdues;
-use Koha::DateUtils;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use Koha::Items;
 use Koha::Libraries;
 use Koha::Patrons;
index bd16600..a7c3e88 100755 (executable)
@@ -2,14 +2,14 @@
 
 use Modern::Perl;
 
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
 
 use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Suggestions;
-use C4::Koha;
+use C4::Koha qw( GetAuthorisedValues );
 
 my ( $help, $verbose, $confirm, $age, $age_date_field, @statuses );
 GetOptions(
index 4eff2d5..2960b4a 100755 (executable)
@@ -20,7 +20,7 @@
 use Modern::Perl;
 use Koha::Checkouts;
 use Koha::Script -cron;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 cronlogaction();
 
index e944ac8..a4e5538 100755 (executable)
@@ -2,14 +2,14 @@
 
 use Modern::Perl;
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use JSON;
 
 use Koha::Script -cron;
 use C4::Context;
 use C4::Items;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 # Getting options
 my ( $verbose, $help, $confirm );
index 7b4158b..cb45e68 100755 (executable)
@@ -75,13 +75,13 @@ chosen 'Digests only' on the advance messages.
 =cut
 
 use Modern::Perl;
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
-use C4::Circulation;
+use C4::Circulation qw( CanBookBeRenewed AddRenewal );
 use C4::Context;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use C4::Letters;
 use Koha::Checkouts;
 use Koha::Libraries;
index ea63dfa..6e05d36 100755 (executable)
 
 use strict;
 use warnings;
-use Carp;
 
 BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
 use C4::Context;
 use Koha::Patrons;
-use Date::Calc qw(
-  Today
-  Add_Delta_Days
-);
-use Getopt::Long;
-use C4::Log;
+use Date::Calc qw( Add_Delta_Days Today );
+use Getopt::Long qw( GetOptions );
+use C4::Log qw( cronlogaction );
 
 sub usage {
     print STDERR <<USAGE;
index d6df1be..46551ca 100755 (executable)
@@ -13,7 +13,7 @@ BEGIN {
 use Koha::Script -cron;
 use C4::Koha;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio );
 use Date::Calc;
 use Time::HiRes qw(gettimeofday);
 use ZOOM;
index 414f6e3..264e933 100755 (executable)
@@ -29,18 +29,18 @@ use strict;
 use warnings;
 
 use Koha::Script -cron;
-use C4::Items qw/ CartToShelf /;
-use C4::Log;
+use C4::Items qw( CartToShelf );
+use C4::Log qw( cronlogaction );
 
 BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 use C4::Context;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 my $hours = 0;
 
index 93fcd97..b9108a6 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio );
 use AnyEvent;
-use AnyEvent::HTTP;
-use Encode;
+use AnyEvent::HTTP qw( http_request );
+use Encode qw( encode_utf8 );
 
 my ( $verbose, $help, $html ) = ( 0, 0, 0 );
 my ( $host,    $host_intranet ) = ( '', '' );
index 1897111..94a6301 100755 (executable)
@@ -31,7 +31,7 @@ use constant DEFAULT_DEBARMENTS_PURGEDAYS         => 30;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
@@ -39,9 +39,9 @@ use Koha::Script -cron;
 use C4::Context;
 use C4::Search;
 use C4::Search::History;
-use Getopt::Long;
-use C4::Log;
-use C4::Accounts;
+use Getopt::Long qw( GetOptions );
+use C4::Log qw( cronlogaction );
+use C4::Accounts qw( purge_zero_balance_fees );
 use Koha::UploadedFiles;
 use Koha::Old::Biblios;
 use Koha::Old::Items;
index 3dadf99..d6e64be 100755 (executable)
 use strict;
 use warnings;
 use diagnostics;
-use Carp;
+use Carp qw( carp croak );
 use YAML::XS;
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 my $verbose     = 0;
 my $help        = 0;
@@ -97,7 +97,7 @@ package ZebraIndex;
 use strict;
 use warnings;
 use diagnostics;
-use Carp;
+use Carp qw( carp croak );
 
 sub new {
     my $self = {};
index 3d92fe5..a9704d7 100755 (executable)
@@ -92,8 +92,8 @@ use warnings;
 $|++;
 
 use DBI;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script -cron;
 use C4::Context;
index df5d23a..93a00c6 100755 (executable)
@@ -1,13 +1,11 @@
 #! /usr/bin/perl
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Items;
-use C4::Circulation;
 use Modern::Perl;
-use Pod::Usage;
+use Pod::Usage qw( pod2usage );
 
 my $dbh = C4::Context->dbh();
 
index d0847c8..37a1529 100755 (executable)
@@ -2,14 +2,14 @@
 
 use Modern::Perl;
 
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
-use C4::Members;
-use Koha::DateUtils;
+use C4::Members qw( GetBorrowersToExpunge );
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Patrons;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 my ( $help, $verbose, $not_borrowed_since, $expired_before, $last_seen,
     @category_code, $branchcode, $file, $confirm );
index 0287e43..8456f42 100755 (executable)
@@ -27,15 +27,14 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use Koha::Script -cron;
-use C4::Biblio;
-use C4::Items;
+use C4::Biblio qw( DelBiblio );
 use Koha::Database;
 use Koha::Biblios;
 use Koha::Biblio::Metadatas;
index ff6ef95..90f9fed 100755 (executable)
@@ -33,10 +33,10 @@ use Koha::Script -cron;
 use C4::Context;
 use Log::Log4perl qw(:easy);
 use Koha::Database;
-use Koha::EDI qw( process_quote process_invoice process_ordrsp);
+use Koha::EDI qw( process_quote process_invoice process_ordrsp );
 use Koha::Edifact::Transport;
 use Koha::Plugins::Handler;
-use Fcntl qw( :DEFAULT :flock :seek );
+use Fcntl qw( LOCK_EX O_CREAT O_RDWR SEEK_SET );
 
 my $logdir = C4::Context->config('logdir');
 
index afc6b4d..3edf6ed 100755 (executable)
@@ -32,16 +32,16 @@ use 5.010;
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Overdues;
-use Getopt::Long;
-use Carp;
+use C4::Overdues qw( Getoverdues CalcFine UpdateFine );
+use Getopt::Long qw( GetOptions );
+use Carp qw( carp croak );
 use File::Spec;
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use Koha::Calendar;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 my $help;
 my $verbose;
index 8c369e8..a777acb 100755 (executable)
@@ -5,22 +5,22 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use CGI qw( utf8 ); # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
+use CGI; # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
 use Koha::Script -cron;
 use C4::Context;
-use C4::Letters;
+use C4::Letters qw( GetPrintMessages );
 use C4::Templates;
 use File::Spec;
-use Pod::Usage;
-use Getopt::Long;
-use C4::Log;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
+use C4::Log qw( cronlogaction );
 
-use Koha::DateUtils;
-use Koha::Util::OpenDocument;
+use Koha::DateUtils qw( dt_from_string output_pref );
+use Koha::Util::OpenDocument qw( generate_ods );
 use MIME::Lite;
 
 my (
index eb4fd87..fdaa350 100755 (executable)
@@ -23,7 +23,7 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
@@ -31,7 +31,7 @@ BEGIN {
 
 use Koha::Script -cron;
 use C4::Reserves;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 cronlogaction();
 
index ab138f9..6e1437d 100755 (executable)
@@ -11,13 +11,13 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
 use C4::HoldsQueue qw(CreateQueue);
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 cronlogaction();
 
index 4932bbf..0af0255 100755 (executable)
@@ -39,19 +39,19 @@ This script calls C4::Reserves::CancelExpiredReserves which will find and cancel
 =cut
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
 use C4::Reserves;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 =head1 OPTIONS
 
index ba6a400..1095269 100755 (executable)
@@ -21,19 +21,18 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script -cron;
 use C4::Reserves;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use Koha::Holds;
 use Koha::Calendar;
-use Koha::DateUtils;
 use Koha::Libraries;
 
 cronlogaction();
index 356e3ba..a255d8d 100755 (executable)
@@ -21,20 +21,19 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
-use Text::CSV_XS;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use DateTime;
 use DateTime::Duration;
 
 use C4::Context;
 use C4::Letters;
-use C4::Log;
-use Koha::DateUtils;
+use C4::Log qw( cronlogaction );
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Calendar;
 use Koha::Libraries;
 use Koha::Notice::Templates;
index aa18edc..5925be2 100755 (executable)
@@ -25,14 +25,13 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
 use Koha::Script -cron;
-use C4::ImportBatch;
+use C4::ImportBatch qw( BatchCommitRecords );
 
 my ($help, $framework);
 
index c12a95d..dd12b6c 100755 (executable)
@@ -30,17 +30,16 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
-use C4::Circulation qw/LostItem MarkIssueReturned/;
+use C4::Circulation qw( LostItem MarkIssueReturned );
 use C4::Context;
-use C4::Items;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use Koha::ItemTypes;
 use Koha::Patron::Categories;
 use Koha::Patrons;
index c140820..7a043f8 100755 (executable)
@@ -116,20 +116,19 @@ any field from the branches table
 =cut
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
-use Data::Dumper;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
 use C4::Context;
 use C4::Letters;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 use Koha::Patrons;
 
index 727d7d5..1645cfd 100755 (executable)
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
-use Time::HiRes qw(gettimeofday);
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
+use Time::HiRes qw( gettimeofday );
 
 use Koha::Script -cron;
 use C4::AuthoritiesMarc;
index d2870b2..6567c35 100755 (executable)
@@ -2,12 +2,12 @@
 
 use Modern::Perl;
 
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
-use C4::Budgets qw( GetBudget );
-use C4::Suggestions qw( GetUnprocessedSuggestions );
+use C4::Budgets;
+use C4::Suggestions;
 use Koha::Libraries;
 use Koha::Patrons;
 
index c18997d..a1c2211 100755 (executable)
@@ -24,12 +24,12 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use Text::CSV_XS;
 use DateTime;
 use DateTime::Duration;
@@ -37,10 +37,10 @@ use DateTime::Duration;
 use Koha::Script -cron;
 use C4::Context;
 use C4::Letters;
-use C4::Overdues qw(GetFine GetOverdueMessageTransportTypes parse_overdues_letter);
-use C4::Log;
-use Koha::Patron::Debarments qw(AddUniqueDebarment);
-use Koha::DateUtils;
+use C4::Overdues qw( GetOverdueMessageTransportTypes parse_overdues_letter );
+use C4::Log qw( cronlogaction );
+use Koha::Patron::Debarments qw( AddUniqueDebarment );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Calendar;
 use Koha::Libraries;
 use Koha::Acquisition::Currencies;
index 67a33de..a265b76 100755 (executable)
@@ -21,16 +21,16 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
-use C4::Log;
-use C4::Reports::Guided;
+use C4::Log qw( cronlogaction );
+use C4::Reports::Guided qw( EmailReport );
 
 cronlogaction();
 
index f748637..a90423e 100755 (executable)
@@ -2,10 +2,10 @@
 
 use Modern::Perl;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use C4::Context;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use Koha::Logger;
 use Koha::Plugins;
 use Koha::Script -cron;
index a903f1e..5ad1b2f 100755 (executable)
@@ -22,15 +22,15 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
-use C4::Letters;
-use C4::Log;
-use Getopt::Long;
-use Try::Tiny;
+use C4::Letters qw( SendQueuedMessages );
+use C4::Log qw( cronlogaction );
+use Getopt::Long qw( GetOptions );
+use Try::Tiny qw( catch try );
 
 my $username = undef;
 my $password = undef;
index 9fdc26d..881ad7d 100755 (executable)
@@ -22,16 +22,15 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
 use C4::Suggestions;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use C4::Context;
 
 my ( $help, $days, $confirm );
index 0202de9..4c55836 100755 (executable)
@@ -51,19 +51,19 @@ Makes the process print information about the taken actions.
 
 use Modern::Perl;
 
-use Getopt::Long;
-use Pod::Usage;
-use Try::Tiny;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
+use Try::Tiny qw( catch try );
 
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 
 use Koha::Account::Lines;
 use Koha::Patrons;
index e703d07..d107411 100755 (executable)
@@ -31,8 +31,7 @@ use Template;
 
 use Koha::Script -cron;
 use C4::Context;
-use Time::Local;
-use POSIX;
+use POSIX qw( close localtime open strftime );
 
 my $dbh     = C4::Context->dbh;
 my $file    = $ARGV[0];
index 3e81e08..710de44 100755 (executable)
 use Modern::Perl;
 
 use Koha::Script -cron;
-use C4::Reports::Guided; # 0.12
+use C4::Reports::Guided qw( store_results execute_query );
 use Koha::Reports;
 use C4::Context;
-use C4::Log;
+use C4::Log qw( cronlogaction );
 use Koha::Email;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::SMTP::Servers;
 
-use Getopt::Long qw(:config auto_help auto_version);
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use Text::CSV::Encoded;
 use CGI qw ( -utf8 );
-use Carp;
-use Encode;
+use Carp qw( carp );
+use Encode qw( decode );
 use JSON qw( to_json );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
index 03843b9..53d6007 100755 (executable)
@@ -24,20 +24,20 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Serials;
-use C4::Log;
-use Koha::DateUtils;
+use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
 use C4::Serials::Frequency;
+use C4::Log qw( cronlogaction );
+use Koha::DateUtils qw( dt_from_string output_pref );
 
-use Date::Calc qw/Date_to_Days check_date/;
-use Getopt::Long;
-use Pod::Usage;
+use Date::Calc qw( check_date Date_to_Days );
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 =head1 NAME
 
index a427ca0..fa6d598 100755 (executable)
@@ -2,14 +2,14 @@
 
 use Modern::Perl;
 
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
 use C4::Context;
 use C4::UsageStats;
-use C4::Log;
-use POSIX qw(strftime);
+use C4::Log qw( cronlogaction );
+use POSIX qw( strftime );
 
 my ( $help, $verbose, $force, $quiet );
 GetOptions(
index fb738e0..93abb02 100755 (executable)
@@ -21,11 +21,10 @@ package Main;
 
 use Modern::Perl;
 use utf8;
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
-use C4::Biblio;
 use Koha::Sitemapper;
 
 
index 0966cb6..6d7cf73 100755 (executable)
@@ -31,22 +31,20 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
-use Date::Calc qw/Date_to_Days/;
+use Date::Calc qw( Date_to_Days );
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Circulation;
-use C4::Overdues;
+use C4::Overdues qw( CalcFine checkoverdues GetFine Getoverdues );
 use C4::Calendar qw();    # don't need any exports from Calendar
-use C4::Biblio;
-use C4::Log;
-use Getopt::Long;
-use List::MoreUtils qw/none/;
-use Koha::DateUtils;
+use C4::Log qw( cronlogaction );
+use Getopt::Long qw( GetOptions );
+use List::MoreUtils qw( none );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
 
 my $help    = 0;
index 3a30d58..1298921 100755 (executable)
@@ -108,7 +108,7 @@ database updates have been performed.").
 =cut
 
 use Modern::Perl;
-use Getopt::Long qw/HelpMessage :config gnu_getopt/;
+use Getopt::Long qw( GetOptions HelpMessage );
 
 use Koha::Script -cron;
 use C4::Context;
index f00d9d6..6be0226 100755 (executable)
@@ -24,12 +24,12 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script -cron;
 use C4::Context;
index 83b8a1a..fedc3cf 100755 (executable)
@@ -24,20 +24,19 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script -cron;
 use C4::Context;
-use C4::Items;
 use C4::Letters;
 use C4::Overdues;
 use Koha::Calendar;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
 use Koha::Libraries;
 
index fd4bc4a..542cc30 100755 (executable)
@@ -20,17 +20,17 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use C4::Context;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use Koha::Logger;
 use Koha::Patrons;
 use Koha::Patron::Categories;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Script -cron;
 
 =head1 NAME
index f1b621b..b3a6c2f 100755 (executable)
@@ -24,22 +24,22 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script -cron;
-use Koha::DateUtils qw/ dt_from_string /;
+use Koha::DateUtils qw( dt_from_string );
 use C4::Context;
-use C4::Biblio;
-use C4::Log;
+use C4::Biblio qw( UpdateTotalIssues );
+use C4::Log qw( cronlogaction );
 use DateTime;
 use DateTime::Format::MySQL;
-use Time::HiRes qw/time/;
-use POSIX qw/strftime ceil/;
+use Time::HiRes qw( time );
+use POSIX qw( ceil strftime );
 
 sub usage {
     pod2usage( -verbose => 2 );
index ae2ee9c..9b207a5 100755 (executable)
@@ -3,11 +3,11 @@
 use Modern::Perl;
 use feature 'say';
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Account::Lines;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 use Koha::Script -cron;
 
index cc1b877..51e7c1d 100755 (executable)
@@ -2,9 +2,9 @@
 
 use Modern::Perl;
 
-use File::Slurp;
-use Pod::Usage;
-use Getopt::Long;
+use File::Slurp qw( read_file write_file );
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use t::lib::QA::TemplateFilters;
 
index 3dabae7..a4d0934 100755 (executable)
@@ -48,9 +48,9 @@ prints this help text
 use Modern::Perl;
 
 use C4::Context;
-use Cwd;
-use Getopt::Long;
-use Pod::Usage;
+use Cwd qw( getcwd );
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 my $help;
 
index 28c67b6..c0ab6fe 100755 (executable)
@@ -18,8 +18,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use Koha::Patrons;
index 45f5544..5ef852c 100755 (executable)
@@ -69,11 +69,11 @@ documentation of GetPreparedLetter for more informations.
 
 use Modern::Perl;
 
-use Getopt::Long;
-use JSON;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use JSON qw( decode_json );
+use Pod::Usage qw( pod2usage );
 
-use C4::Letters;
+use C4::Letters qw( GetPreparedLetter );
 
 my $help;
 my ( $module, $letter_code, $branchcode, $message_transport_type, $lang,
index 0177d73..8e2cee9 100755 (executable)
@@ -18,8 +18,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 
index 7e00b8f..747c000 100755 (executable)
@@ -21,8 +21,8 @@
 use Modern::Perl;
 use DBIx::Class::Schema::Loader qw/ make_schema_at /;
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 my %db_defaults = (
     driver => 'mysql',
index 2729218..1a2dd7f 100755 (executable)
@@ -21,7 +21,7 @@
 
 use Modern::Perl;
 use Text::CSV;
-use Getopt::Long qw(:config no_ignore_case);
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script;
 use C4::Context;
index 2a05e79..32658cb 100755 (executable)
@@ -18,9 +18,9 @@
 
 use Modern::Perl;
 use MARC::File::XML;
-use List::MoreUtils qw(uniq);
-use Getopt::Long;
-use Pod::Usage;
+use List::MoreUtils qw( uniq );
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use C4::Auth;
index c036b17..d2ccebf 100755 (executable)
@@ -8,13 +8,12 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
 use C4::Auth;
 my $outfile = $ARGV[0];
 open(my $fh, '>', $outfile) or die $!;
index ee0d8a9..85f7983 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use Koha::Patrons::Import;
index e7df4d5..21e4cc3 100755 (executable)
@@ -7,19 +7,23 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use Getopt::Long;
-use Pod::Usage;
-use Data::Dumper;
-use Time::HiRes qw/time/;
-use POSIX qw/strftime ceil/;
-use Module::Load::Conditional qw(can_load);
+use C4::Biblio qw(
+    GetFrameworkCode
+    GetMarcBiblio
+    LinkBibHeadingsToAuthorities
+    ModBiblio
+);
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
+use Time::HiRes qw( time );
+use POSIX qw( ceil strftime );
+use Module::Load::Conditional qw( can_load );
 
 sub usage {
     pod2usage( -verbose => 2 );
index 36ab418..83ddea5 100755 (executable)
@@ -7,13 +7,12 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 use HTTPD::Bench::ApacheBench;
 use LWP::UserAgent;
-use Data::Dumper;
 use HTTP::Cookies;
 use C4::Context;
 
index b259688..f42c4d5 100755 (executable)
@@ -7,17 +7,16 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use HTTPD::Bench::ApacheBench;
 use LWP::UserAgent;
-use Data::Dumper;
 use HTTP::Cookies;
 use C4::Context;
-use URI::Escape;
+use URI::Escape qw( uri_escape_utf8 );
 use Koha::Patrons;
 
 my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
index e79067d..2ccd15b 100755 (executable)
@@ -16,8 +16,7 @@ use warnings;
 #
 # Requires LWP::UserAgent, File::Slurp.
 use LWP::UserAgent;
-use File::Slurp qw(slurp);
-use Carp;
+use File::Slurp qw( slurp );
 my $ua = LWP::UserAgent->new();
 $ua->cookie_jar({ file =>"cookies.txt" });
 my $baseurl = shift;
index 362a251..873e69e 100755 (executable)
@@ -20,7 +20,7 @@
 use Modern::Perl;
 
 use Koha::Script;
-use Getopt::Long qw(:config no_ignore_case);
+use Getopt::Long qw( GetOptions );
 use C4::Context;
 use C4::Installer;
 
index 4a97c18..d28163a 100755 (executable)
@@ -8,12 +8,11 @@ use strict;
 use warnings;
 
 BEGIN {
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
-use C4::Biblio;
 
 sub process {
 
index 23ac37e..1a4b864 100755 (executable)
@@ -8,13 +8,13 @@ use strict;
 use warnings;
 
 BEGIN {
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
-use C4::Biblio;
-use Getopt::Long;
+use C4::Biblio qw( GetMarcBiblio ModBiblio );
+use Getopt::Long qw( GetOptions );
 
 sub _read_marc_code {
     my $input = shift;
index 91006d1..fdab635 100755 (executable)
@@ -22,8 +22,8 @@
 # which hidden fields in the framework still contain data.
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use Koha::Authorities;
index 0e30596..9a0b1c0 100755 (executable)
@@ -22,15 +22,15 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
 use C4::Members::Messaging;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 
 sub usage {
index a25b977..9328988 100755 (executable)
@@ -16,8 +16,8 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 use Encode qw( encode_utf8 );
 
 use Koha::Script;
index 90b21a7..1a7afdf 100755 (executable)
@@ -27,8 +27,8 @@
 use Modern::Perl;
 use open OUT => ':encoding(UTF-8)', ':std';
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use C4::Context;
index 0c7a92e..fb9ceac 100755 (executable)
@@ -22,15 +22,14 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use Getopt::Long;
-use Pod::Usage;
-use Koha::DateUtils;
+use Getopt::Long qw( GetOptions );
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 =head1 NAME
 
index 4a72e1a..fd9d047 100755 (executable)
@@ -23,15 +23,14 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use C4::Installer;
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use Data::Dumper;
 
 sub print_usage {
index e2920e8..b1784a0 100755 (executable)
@@ -21,14 +21,14 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     my $lib = "$FindBin::Bin/../kohalib.pl";
     eval { require $lib };
 }
 
-use Getopt::Long;
-use Pod::Usage;
-use Try::Tiny;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
+use Try::Tiny qw( catch try );
 use Koha::Script;
 use C4::Context;
 
index a1f8085..ff7e3d7 100755 (executable)
@@ -28,8 +28,8 @@ use Koha::Tags;
 use Koha::Tags::Approvals;
 use Koha::Tags::Indexes;
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 =head1 NAME
 
index be27b6e..8a70a4f 100755 (executable)
 #
 
 use Modern::Perl;
-use XML::Simple;
-use Pod::Usage;
-use Getopt::Long;
-use Carp;
+use XML::Simple qw( XMLin );
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
+use Carp qw( croak );
 
 use open ':std', ':encoding(UTF-8)';
 
index a9d92d3..8259e31 100755 (executable)
@@ -9,8 +9,7 @@ use warnings;
 
 use Koha::Script;
 use Koha::RecordProcessor;
-use Data::Dumper;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio );
 
 my $record = GetMarcBiblio({ biblionumber => $ARGV[0] });
 
index d78ad69..029e1e9 100755 (executable)
@@ -24,8 +24,8 @@ $|=1;
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use Getopt::Long;
+use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio );
+use Getopt::Long qw( GetOptions );
 
 my ($wherestring, $run, $silent, $want_help);
 my $result = GetOptions(
index f9084e8..2aa9f02 100755 (executable)
 use Modern::Perl;
 
 use Koha::Script;
-use C4::Charset qw( SanitizeRecord );
+use C4::Charset;
 use C4::Context;
-use DBI;
 use C4::Biblio;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 my ( $help, $verbose, $confirm, $biblionumbers, $reindex, $filename,
     $auto_search, $fix_ampersand );
index 433f668..a23e7ab 100755 (executable)
@@ -25,7 +25,7 @@ use Koha::BiblioFrameworks;
 use Koha::Biblioitems;
 use Koha::Items;
 use Koha::ItemTypes;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcFromKohaField );
 
 {
     my $items = Koha::Items->search({ -or => { homebranch => undef, holdingbranch => undef }});
index 8d65f21..be349cf 100755 (executable)
@@ -22,17 +22,17 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 # possible modules to use
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use Pod::Usage;
+use C4::Biblio qw( GetMarcBiblio ModBiblio );
+use Pod::Usage qw( pod2usage );
 
 
 sub usage {
index dbf1609..0879144 100755 (executable)
@@ -22,18 +22,17 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 # possible modules to use
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script;
 use C4::Context;
-use C4::Items;
 use Koha::Items;
-use Pod::Usage;
+use Pod::Usage qw( pod2usage );
 
 
 sub usage {
index 6750ab1..e4bf74d 100755 (executable)
@@ -19,9 +19,9 @@
 
 use Modern::Perl;
 
-use Getopt::Long;
-use List::MoreUtils qw/uniq/;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use List::MoreUtils qw( uniq );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
 use C4::AuthoritiesMarc qw/AddAuthority DelAuthority GetAuthority merge/;
index fbbff89..d854b0c 100755 (executable)
@@ -9,7 +9,7 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 
index 479981c..d4531a3 100755 (executable)
@@ -3,15 +3,14 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 use C4::Context;
 #use MARC::File::XML(BinaryEncoding=>"utf8");
 #use MARC::File::USMARC;
-use MARC::Record;
 use C4::AuthoritiesMarc;
-use POSIX;
+use POSIX qw( close localtime sprintf time );
 #MARC::File::XML::default_record_format("UNIMARCAUTH");
 my $dbh = C4::Context->dbh;
 my $rq= $dbh->prepare(qq|
index 6c91708..4145fc3 100755 (executable)
@@ -3,14 +3,13 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 use C4::Context;
 use MARC::File::XML(BinaryEncoding=>"utf8");
-use MARC::Record;
 use C4::AuthoritiesMarc;
-use POSIX;
+use POSIX qw( close localtime open sprintf time );
 MARC::File::XML::default_record_format("UNIMARCAUTH");
 my $dbh = C4::Context->dbh;
 my $rq= $dbh->prepare(qq|
index b54bf92..80861b1 100755 (executable)
@@ -7,15 +7,14 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 
 # Koha modules used
 
 use C4::Context;
-use C4::Biblio;
-use MARC::Record;
+use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblioMarc );
 use MARC::File::USMARC;
 
 $|=1;
index f5e4b43..8a5ffa9 100755 (executable)
@@ -7,7 +7,7 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 use C4::Context;
index 386831e..e4429a7 100755 (executable)
@@ -5,11 +5,10 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 use C4::Context;
-use C4::Biblio;
 use MARC::Record;
 use MARC::File::XML ( BinaryEncoding => 'utf8' );
 
index 2d402c5..885ba45 100755 (executable)
@@ -7,15 +7,14 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 
 # Koha modules used
 
 use C4::Context;
-use C4::Biblio;
-use MARC::Record;
+use C4::Biblio qw( ModBiblioMarc );
 use MARC::File::USMARC;
 
 
index 0988e56..c9eddb5 100755 (executable)
@@ -7,15 +7,14 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../../kohalib.pl" };
 }
 
 # Koha modules used
 
 use C4::Context;
-use C4::Biblio;
-use MARC::Record;
+use C4::Biblio qw( GetMarcBiblio ModBiblioMarc );
 use MARC::File::USMARC;
 
 
index af0bf21..9329ac0 100755 (executable)
@@ -8,11 +8,10 @@ use strict;
 # Koha modules used
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
 use C4::AuthoritiesMarc;
-use Time::HiRes qw(gettimeofday);
+use Time::HiRes qw( gettimeofday );
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 my ( $fields, $number,$language) = ('',0);
 my ($version, $verbose, $test_parameter, $delete);
 GetOptions(
index bb11d45..a6f1d8b 100755 (executable)
@@ -10,11 +10,11 @@ use MARC::Record;
 use MARC::Batch;
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio );
 use C4::AuthoritiesMarc;
-use Time::HiRes qw(gettimeofday);
+use Time::HiRes qw( gettimeofday );
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 my ( $input_marc_file, $number) = ('',0);
 my ($version, $verbose, $test_parameter, $confirm,$delete);
 GetOptions(
index b1174ab..bdef6dd 100755 (executable)
@@ -8,11 +8,10 @@ use strict;
 # Koha modules used
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
 use C4::AuthoritiesMarc;
-use Time::HiRes qw(gettimeofday);
+use Time::HiRes qw( gettimeofday );
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 my ( $fields, $number,$language) = ('',0);
 my ($version, $verbose, $test_parameter, $delete);
 GetOptions(
index c7b73a2..00f92c8 100755 (executable)
@@ -39,14 +39,22 @@ oai_sets_mappings, and then fill table oai_sets_biblios with builded infos.
 use Modern::Perl;
 use MARC::Record;
 use MARC::File::XML;
-use List::MoreUtils qw/uniq/;
-use Getopt::Std;
+use List::MoreUtils qw( uniq );
+use Getopt::Std qw( getopts );
 
 use Koha::Script;
 use C4::Context;
-use C4::Charset qw/StripNonXmlChars/;
+use C4::Charset qw( StripNonXmlChars );
 use C4::Biblio;
-use C4::OAI::Sets;
+use C4::OAI::Sets qw(
+    AddOAISetsBiblios
+    CalcOAISetsBiblio
+    GetOAISet
+    GetOAISetBySpec
+    GetOAISets
+    GetOAISetsMappings
+    ModOAISetsBiblios
+);
 
 my %opts;
 $Getopt::Std::STANDARD_HELP_VERSION = 1;
index 48e2e9d..b5ed5f0 100755 (executable)
@@ -6,32 +6,37 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 # Koha modules used
 use MARC::File::USMARC;
 use MARC::File::XML;
-use MARC::Record;
 use MARC::Batch;
-use MARC::Charset;
 use Encode;
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw(
+    AddBiblio
+    GetMarcFromKohaField
+    ModBiblio
+    ModBiblioMarc
+);
 use C4::Koha;
-use C4::Charset;
-use C4::Items;
-use C4::MarcModificationTemplates;
+use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
+use C4::Items qw( AddItemBatchFromMarc );
+use C4::MarcModificationTemplates qw(
+    GetModificationTemplates
+    ModifyRecordWithTemplate
+);
 
 use YAML::XS;
-use Unicode::Normalize;
-use Time::HiRes qw(gettimeofday);
-use Getopt::Long;
+use Time::HiRes qw( gettimeofday );
+use Getopt::Long qw( GetOptions );
 use IO::File;
-use Pod::Usage;
+use Pod::Usage qw( pod2usage );
 
 use Koha::Logger;
 use Koha::Biblios;
index d03acbf..25b58ea 100755 (executable)
@@ -27,15 +27,14 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 # Koha modules used
-use MARC::Record;
 use Koha::Script;
 use C4::Context;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 use Koha::SearchEngine::Search;
 
index 2de9c23..dfdd10e 100755 (executable)
@@ -5,16 +5,15 @@ use strict;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
-use C4::Items;
+use C4::Biblio qw( GetMarcBiblio ModBiblio );
 use Koha::Items;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 $| = 1;
 
index a4e2d8d..25e5ec0 100755 (executable)
 
 use Modern::Perl;
 
-use Date::Format;
-use File::Basename;
-use FindBin qw($Bin);
-use Getopt::Long;
+use Date::Format qw( time2str );
+use File::Basename qw( basename );
+use FindBin qw( $Bin );
+use Getopt::Long qw( GetOptions );
 use Locale::PO;
 use YAML::XS;
 use utf8;
index 7234787..265b07a 100755 (executable)
@@ -28,12 +28,12 @@ use utf8;
 
 use Modern::Perl;
 
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use Text::CSV;
 
 use Koha::Script;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio ModBiblio );
 use C4::Koha qw( GetVariationsOfISBN );
 
 use Koha::Biblios;
@@ -45,7 +45,7 @@ BEGIN {
 
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
index 24326c1..36e275d 100755 (executable)
@@ -21,7 +21,7 @@ use warnings;
 use strict;
 
 use LWP::UserAgent;
-use File::Slurp;
+use File::Slurp qw( read_file write_file );
 
 if ( $#ARGV >= 3 && ! caller ) { # process command-line params only if not called as module!
     my ( $url, $user, $password, $biblionumber, $file ) = @ARGV;
index 18da802..dd7d94d 100755 (executable)
@@ -19,13 +19,13 @@ use Modern::Perl;
 
 use Koha::Script;
 use C4::Context;
-use Getopt::Long;
-use Fcntl qw(:flock);
-use File::Temp qw/ tempdir /;
-use File::Path;
-use C4::Biblio;
+use Getopt::Long qw( GetOptions );
+use Fcntl qw( LOCK_EX LOCK_NB LOCK_UN );
+use File::Temp qw( tempdir );
+use File::Path qw( mkpath rmtree );
+use C4::Biblio qw( GetXmlBiblio );
 use C4::AuthoritiesMarc;
-use C4::Items;
+use C4::Items qw( GetItemsInfo Item2Marc );
 use Koha::RecordProcessor;
 use Koha::Caches;
 use XML::LibXML;
index 63670b6..da57f88 100755 (executable)
@@ -25,7 +25,7 @@ use Modern::Perl;
 use Koha::Script;
 use C4::Context;
 use C4::AuthoritiesMarc;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 use Koha::SearchEngine::Search;
 
index 9d43d47..f3962e5 100755 (executable)
@@ -25,14 +25,14 @@ use warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/../kohalib.pl" };
 }
 
 use Koha::Script;
-use C4::Biblio;
+use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblioMarc );
 use C4::Context;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 
 my $commit;
 my $add_links;
index cc63cd4..7ba79ae 100755 (executable)
@@ -5,8 +5,8 @@ use strict;
 
 use Koha::Script;
 use C4::Context;
-use C4::Items;
-use C4::Biblio;
+use C4::Items qw( ModItemFromMarc );
+use C4::Biblio qw( GetMarcBiblio );
 
 my $dbh=C4::Context->dbh;
 
index 240aad4..ab1aa7b 100755 (executable)
 
 use Modern::Perl;
 
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Script;
-use C4::Biblio;
+use C4::Biblio qw( ModZebra );
 
 my @biblios;
 my @authorities;
index 8ff314e..859cf02 100755 (executable)
@@ -25,9 +25,7 @@ use warnings;
 
 use Koha::Script;
 use C4::Context;
-use C4::Items;
-use Data::Dumper;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use Koha::Items;
 
 my $dbh = C4::Context->dbh;
index fb56de1..e18cacd 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use XML::SAX;
-use Encode;
+use Encode qw( encode_utf8 );
 
 my $parser = XML::SAX::ParserFactory->parser(
 Handler => MySAXHandler->new
index 6e2b158..b8ad1de 100755 (executable)
@@ -61,8 +61,8 @@ use Koha::SearchMarcMaps;
 use Koha::SearchEngine::Elasticsearch;
 
 use YAML::XS;
-use Getopt::Long;
-use Pod::Usage;
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 my $type = '';
 my $man;
index 3b25709..337ac19 100755 (executable)
@@ -112,7 +112,7 @@ Full documentation.
 =cut
 
 use autodie;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use Koha::Script;
 use C4::Context;
 use Koha::MetadataRecord::Authority;
@@ -120,10 +120,9 @@ use Koha::BiblioUtils;
 use Koha::SearchEngine::Elasticsearch;
 use Koha::SearchEngine::Elasticsearch::Indexer;
 use MARC::Field;
-use MARC::Record;
 use Modern::Perl;
-use Pod::Usage;
-use Try::Tiny;
+use Pod::Usage qw( pod2usage );
+use Try::Tiny qw( catch try );
 
 my $verbose = 0;
 my $commit = 5000;
index 16a74d0..f05be7a 100755 (executable)
@@ -23,16 +23,16 @@ use Modern::Perl;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
-    use FindBin;
+    use FindBin ();
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
 use Koha::Script;
 use C4::Context;
-use C4::ImportBatch;
+use C4::ImportBatch qw( RecordsFromISO2709File RecordsFromMARCXMLFile BatchStageMarcRecords SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates );
 use C4::Matcher;
-use C4::MarcModificationTemplates;
-use Getopt::Long;
+use C4::MarcModificationTemplates qw( GetModificationTemplates );
+use Getopt::Long qw( GetOptions );
 
 $| = 1;
 
index 9636758..772c876 100644 (file)
@@ -19,14 +19,13 @@ package LangInstaller;
 
 use Modern::Perl;
 
-use C4::Context;
+use C4::Context qw( config preference new interface );
 # WARNING: Any other tested YAML library fails to work properly in this
 # script content
 # FIXME Really?
 use YAML::XS;
 use Locale::PO;
 use FindBin qw( $Bin );
-use File::Basename;
 use File::Path qw( make_path );
 use File::Copy;
 
index 0598bc2..05cc54e 100644 (file)
@@ -7,8 +7,6 @@ use C4::TTParser;
 use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic );
 require Exporter;
 
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
 ###############################################################################
 
 =head1 NAME
@@ -24,9 +22,6 @@ A wrapper for the functionality found in TTParser to allow an easier transition
 ###############################################################################
 
 
-@ISA = qw(Exporter);
-@EXPORT_OK = qw();
-
 use vars qw( $pedantic_attribute_error_in_nonpedantic_mode_p );
 use vars qw( $pedantic_tmpl_var_use_in_nonpedantic_mode_p );
 use vars qw( $pedantic_error_markup_in_pcdata_p );
index 65281ff..5225f74 100644 (file)
@@ -1,9 +1,6 @@
 package VerboseWarnings;
 
 use Modern::Perl;
-require Exporter;
-
-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 ###############################################################################
 
@@ -20,20 +17,19 @@ verbose warnings.
 
 ###############################################################################
 
-
-@ISA = qw(Exporter);
-@EXPORT_OK = qw(
-    &pedantic_p
-    &warn_additional
-    &warn_normal
-    &warn_pedantic
-    &error_additional
-    &error_normal
-);
-%EXPORT_TAGS = (
-    'warn' => [ 'warn_additional',  'warn_normal',  'warn_pedantic' ],
-    'die'  => [ 'error_additional', 'error_normal' ],
-);
+our (@ISA, @EXPORT_OK);
+BEGIN {
+    require Exporter;
+    @ISA = qw(Exporter);
+    @EXPORT_OK = qw(
+        &pedantic_p
+        &warn_additional
+        &warn_normal
+        &warn_pedantic
+        &error_additional
+        &error_normal
+    );
+}
 
 ###############################################################################
 
index 3c04618..2a9643d 100755 (executable)
@@ -16,10 +16,9 @@ using gettext-compatible translation files
 
 use strict;
 #use warnings; FIXME - Bug 2505
-use File::Basename;
-use Getopt::Long;
+use File::Basename qw( fileparse );
+use Getopt::Long qw( GetOptions );
 use Locale::PO;
-use File::Temp qw( :POSIX );
 use TmplTokenizer;
 use VerboseWarnings qw( :warn :die );
 
index e04c529..fcfe1bd 100755 (executable)
@@ -26,8 +26,8 @@ use lib $FindBin::Bin;
 
 use strict;
 use warnings;
-use Getopt::Long;
-use POSIX;
+use Getopt::Long qw( GetOptions );
+use POSIX qw( close exit localtime open printf time );
 use Locale::PO;
 use TmplTokenizer;
 use VerboseWarnings;
index 48609dd..de61cd1 100755 (executable)
 
 use Modern::Perl;
 
-use Carp;
-use File::Basename;
-use Getopt::Long qw(:config no_ignore_case);
-use Pod::Usage;
+use File::Basename qw( fileparse );
+use Getopt::Long qw( GetOptions );
+use Pod::Usage qw( pod2usage );
 
 use Koha::Config;
 use Koha::Z3950Responder;
index 838e63e..87388bf 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use JSON;
-use C4::Auth;
+use JSON qw( to_json );
+use C4::Auth qw( checkauth );
 use C4::Output;
 use C4::Context;
 use C4::Koha;
index a6e3b08..1162d70 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Biblio;
 use C4::Accounts;
-use C4::Circulation;
-use C4::Items;
+use C4::Circulation qw( AddOfflineOperation );
 use C4::Members;
 use C4::Stats;
 use Koha::Checkouts;
 use Koha::UploadedFiles;
 use Koha::Items;
 
-use Date::Calc qw( Add_Delta_Days Date_to_Days );
 
 # this is the file version number that we're coded against.
 my $FILE_VERSION = '1.0';
index f514644..252dc85 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Circulation;
+use C4::Circulation qw( GetOfflineOperations GetOfflineOperation );
 use C4::Members;
-use C4::Biblio;
 use Koha::Patrons;
 
 use Koha::Items;
index 39963e6..09520a1 100755 (executable)
@@ -21,8 +21,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Circulation;
+use C4::Auth qw( get_template_and_user );
+use C4::Circulation qw( GetOfflineOperation ProcessOfflineOperation DeleteOfflineOperation );
 
 my $query = CGI->new;
 
index ba61c77..7eaa73b 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Carp;
 
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Biblio;
 use C4::Accounts;
-use C4::Circulation;
-use C4::Items;
+use C4::Circulation qw( barcodedecode GetOpenIssue AddRenewal AddIssue MarkIssueReturned );
+use C4::Items qw( ModDateLastSeen );
 use C4::Members;
 use C4::Stats;
 use C4::BackgroundJob;
@@ -39,7 +36,7 @@ use Koha::Account;
 use Koha::Checkouts;
 use Koha::Patrons;
 
-use Date::Calc qw( Add_Delta_Days Date_to_Days );
+use Date::Calc qw( Date_to_Days );
 
 use constant DEBUG => 0;
 
index bbae44b..00ae314 100755 (executable)
@@ -21,9 +21,9 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Circulation;
-use Koha::DateUtils;
+use C4::Auth qw( check_api_auth check_cookie_auth );
+use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation );
+use Koha::DateUtils qw( dt_from_string );
 use DateTime::TimeZone;
 
 my $cgi = CGI->new;
index 312f9b1..a3243d4 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Patrons;
 
 my $cgi = CGI->new;
index f486c7d..a719901 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Clubs;
 
 my $cgi = CGI->new;
index 83954c7..eb6609a 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index 4d3b5f8..91fbc2d 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index 50989b4..682f39c 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index 735c1c9..0e38cdf 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index ca5524d..1814e9d 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index 2d6c30d..6918c1e 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $query = CGI->new;
 my $admin = C4::Context->preference('KohaAdminEmailAddress');
index f534c24..d70f574 100755 (executable)
@@ -21,8 +21,7 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use URI;
-use URI::Escape;
-use C4::Auth qw(checkauth);
+use URI::Escape qw( uri_escape );
 use Koha::Logger;
 use Koha::ExternalContent::OverDrive;
 
index 86cd92f..8613ac1 100755 (executable)
 use Modern::Perl;
 
 use C4::ILSDI::Services;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
-use List::MoreUtils qw(any);
-use XML::Simple;
+use List::MoreUtils qw( any );
+use XML::Simple qw( XMLout );
 use CGI qw ( -utf8 );
 use Net::Netmask;
 
index 7ec3ec8..c792492 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Auth;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Templates qw/gettemplate/;
 
 use Koha;
index 9f3bb86..567caf4 100755 (executable)
@@ -41,16 +41,25 @@ the items attached to the biblio
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( parametrized_url output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Biblio;
-use C4::Items;
+use C4::Biblio qw(
+    CountItemsIssued
+    GetISBDView
+    GetMarcControlnumber
+    GetMarcISSN
+    TransformMarcToKoha
+);
 use C4::Reserves;
-use C4::Acquisition;
-use C4::Serials;    # uses getsubscriptionfrom biblionumber
-use C4::Koha;
+use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
+use C4::Koha qw(
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
 use Koha::CirculationRules;
 use Koha::ItemTypes;
 use Koha::Patrons;
index 0dac97d..69578be 100755 (executable)
@@ -45,25 +45,31 @@ the items attached to the biblio
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( parametrized_url output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use MARC::Record;
-use C4::Biblio;
-use C4::Items;
+use C4::Biblio qw(
+    CountItemsIssued
+    GetAuthorisedValueDesc
+    GetMarcBiblio
+    GetMarcControlnumber
+    GetMarcFromKohaField
+    GetMarcISSN
+    GetMarcStructure
+    TransformMarcToKoha
+);
 use C4::Reserves;
 use C4::Members;
-use C4::Acquisition;
-use C4::Koha;
-use List::MoreUtils qw( any uniq );
+use C4::Koha qw( GetNormalizedISBN );
+use List::MoreUtils qw( uniq );
 use Koha::Biblios;
 use Koha::CirculationRules;
 use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Patrons;
 use Koha::RecordProcessor;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 
 my $query = CGI->new();
 
index 841f84f..bdfbcfc 100755 (executable)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use CGI;
 
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use Koha::Plugins::Handler;
 
 my $cgi = CGI->new;
index c12eae0..30be841 100755 (executable)
@@ -22,11 +22,8 @@ use utf8;
 use Modern::Perl;
 
 use CGI;
-use HTTP::Request::Common;
-use LWP::UserAgent;
-use URI;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
 use C4::Context;
 use Koha::Acquisition::Currencies;
index c675c2f..1de5617 100755 (executable)
@@ -22,8 +22,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Members;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Account::Lines;
 use Koha::Patrons;
 use Koha::Plugins;
index 3563dfc..176a1c4 100755 (executable)
@@ -21,9 +21,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Biblio;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 
 use Koha::Biblios;
 use Koha::Virtualshelves;
index e9fb796..c35b341 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Koha;
-use C4::Letters;
-use C4::Serials;
+use C4::Serials qw( GetSubscription );
 
 
 my $query = CGI->new;
index 1372b4e..e926a5f 100755 (executable)
@@ -22,7 +22,7 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use C4::Output;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use Koha::ArticleRequests;
 
 my $query = CGI->new;
index 0308207..eb795f4 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use URI::Escape;
-use C4::Auth;
+use URI::Escape qw( uri_escape_utf8 );
+use C4::Auth qw( get_template_and_user );
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::AuthoritiesMarc;
+use C4::Output qw( pagination_bar output_html_with_http_headers );
 use C4::Koha;
 use C4::Search::History;
 
index 432e298..1accfa9 100755 (executable)
@@ -38,13 +38,12 @@ parameters tables.
 
 use Modern::Perl;
 
-use C4::AuthoritiesMarc;
-use C4::Auth;
-use C4::Biblio qw(GetMarcUrls);
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcUrls );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
+use C4::AuthoritiesMarc qw( GetAuthority BuildSummary );
 use CGI qw ( -utf8 );
-use MARC::Record;
 use C4::Koha;
 
 use Koha::Authorities;
index 2de55f4..ef4a257 100755 (executable)
@@ -20,11 +20,19 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use C4::Koha;
-use C4::Biblio;
-use C4::Items;
-use C4::Circulation;
-use C4::Auth;
-use C4::Output;
+use C4::Biblio qw(
+    GetBiblioData
+    GetFrameworkCode
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcSeries
+    GetMarcSubjects
+    GetMarcUrls
+);
+use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
+use C4::Circulation qw( GetTransfers );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::RecordProcessor;
 use Koha::CsvProfiles;
 use Koha::AuthorisedValues;
index 2876823..6fc1a04 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_with_http_headers );
 use C4::Context;
 
 my $query = CGI->new;
index 84df8c8..bde1e71 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::SearchEngine::Elasticsearch;
 use Koha::SearchEngine::Elasticsearch::Browse;
 use Koha::SearchEngine::Elasticsearch::QueryBuilder;
 use Koha::SearchEngine::Elasticsearch::Search;
 
-use JSON;
+use JSON qw( to_json );
 use Unicode::Collate;
 
 my $query = CGI->new;
index 3524d03..aad5940 100755 (executable)
@@ -26,11 +26,10 @@ TODO :: Description here
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Biblio;
 
 my $query = CGI->new;
 
index 40c9d43..415cade 100755 (executable)
@@ -22,11 +22,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::CourseReserves qw(GetCourse GetCourseReserves);
+use C4::CourseReserves qw( GetCourse GetCourseReserve GetCourseReserves );
 
 my $cgi = CGI->new;
 
index 7e8e759..e5d474b 100755 (executable)
@@ -22,10 +22,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::CourseReserves qw(SearchCourses);
+use C4::CourseReserves qw( SearchCourses );
 
 my $cgi = CGI->new;
 
index 249de81..cbb216e 100755 (executable)
@@ -24,30 +24,51 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Acquisition qw( SearchOrders );
-use C4::Auth qw(:DEFAULT get_session);
-use C4::Koha;
-use C4::Serials;    #uses getsubscriptionfrom biblionumber
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::Circulation;
-use C4::Tags qw(get_tags);
-use C4::XISBN qw(get_xisbns);
-use C4::External::Amazon;
+use C4::Auth qw( get_template_and_user get_session );
+use C4::Koha qw(
+    getitemtypeimagelocation
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
+use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
+use C4::Output qw( parametrized_url output_html_with_http_headers );
+use C4::Biblio qw(
+    CountItemsIssued
+    GetBiblioData
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcControlnumber
+    GetMarcISBN
+    GetMarcISSN
+    GetMarcSeries
+    GetMarcSubjects
+    GetMarcUrls
+);
+use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
+use C4::Circulation qw( GetTransfers );
+use C4::Tags qw( get_tags );
+use C4::XISBN qw( get_xisbns );
+use C4::External::Amazon qw( get_amazon_tld );
 use C4::External::BakerTaylor qw( image_url link_url );
-use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
+use C4::External::Syndetics qw(
+    get_syndetics_anotes
+    get_syndetics_excerpt
+    get_syndetics_index
+    get_syndetics_reviews
+    get_syndetics_summary
+    get_syndetics_toc
+);
 use C4::Members;
-use C4::XSLT;
-use C4::ShelfBrowser;
-use C4::Reserves;
-use C4::Charset;
-use C4::Letters;
-use MARC::Record;
+use C4::XSLT qw( XSLTParse4Display );
+use C4::ShelfBrowser qw( GetNearbyItems );
+use C4::Reserves qw( GetReserveStatus );
+use C4::Charset qw( SetUTF8Flag );
 use MARC::Field;
-use List::MoreUtils qw/any none/;
-use Koha::DateUtils;
+use List::MoreUtils qw( any );
 use C4::HTML5Media;
-use C4::CourseReserves qw(GetItemCourseReservesInfo);
+use C4::CourseReserves qw( GetItemCourseReservesInfo );
 
 use Koha::Biblios;
 use Koha::RecordProcessor;
@@ -63,7 +84,6 @@ use Koha::Ratings;
 use Koha::Reviews;
 use Koha::SearchEngine::Search;
 
-use Try::Tiny;
 
 my $query = CGI->new();
 
@@ -228,7 +248,7 @@ my $session = get_session($query->cookie("CGISESSID"));
 my %paging = (previous => {}, next => {});
 if ($session->param('busc')) {
     use C4::Search;
-    use URI::Escape;
+    use URI::Escape qw( uri_escape_utf8 uri_unescape );
 
     # Rebuild the string to store on session
     # param value is URI encoded and params separator is HTML encode (&amp;)
index 95a4ac3..991ebae 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Carp;
+use Carp qw( carp );
 
-use C4::Auth qw(:DEFAULT get_session);
+use C4::Auth qw( get_template_and_user );
 use CGI qw( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Log;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Patrons;
 use Koha::Patron::Discharge;
-use Koha::DateUtils;
 
 my $input = CGI->new;
 
index 0fb7a02..ade1a53 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw(encode);
+use Encode qw( encode );
 
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetFrameworkCode GetISBDView GetMarcBiblio );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Record;
-use C4::Ris;
+use C4::Ris qw( marc2ris );
 use Koha::CsvProfiles;
 use Koha::RecordProcessor;
 
index 99d14a7..31da711 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw(encode);
 
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetFrameworkCode GetISBDView GetMarcBiblio );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Record;
-use C4::Ris;
+use C4::Ris qw( marc2ris );
 use Koha::CsvProfiles;
 use Koha::RecordProcessor;
 use Koha::Virtualshelves;
index 82954d6..d816ded 100755 (executable)
@@ -22,10 +22,15 @@ use Modern::Perl;
 use C4::Record;
 use C4::Auth;
 use C4::Output;
-use C4::Biblio;
+use C4::Biblio qw(
+    GetFrameworkCode
+    GetISBDView
+    GetMarcBiblio
+    GetMarcControlnumber
+);
 use CGI qw ( -utf8 );
 use C4::Auth;
-use C4::Ris;
+use C4::Ris qw( marc2ris );
 use Koha::RecordProcessor;
 
 my $query = CGI->new;
index 67ecae8..e869128 100755 (executable)
@@ -20,8 +20,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Patrons;
 use Koha::Holds;
index c8116b4..62603f3 100755 (executable)
@@ -29,11 +29,8 @@ use DateTime::Format::ICal;
 use DateTime::Event::ICal;
 use URI;
 
-use C4::Auth;
-use C4::Koha;
-use C4::Circulation;
-use C4::Members;
-use Koha::DateUtils;
+use C4::Auth qw( get_template_and_user );
+use Koha::DateUtils qw( dt_from_string );
 
 my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
index 8b95311..7958422 100755 (executable)
@@ -21,14 +21,13 @@ use Modern::Perl;
 
 use CGI;
 use LWP::UserAgent;
-use HTTP::Request::Common;
-use JSON;
+use JSON qw( from_json );
 use Encode;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::Search;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
index 5881ded..e619707 100755 (executable)
@@ -22,9 +22,9 @@ use Modern::Perl;
 use JSON qw( encode_json );
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Koha;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Illrequest::Config;
 use Koha::Illrequests;
index 6daa63d..bacbf84 100755 (executable)
@@ -20,9 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Biblio;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Biblios;
 use Koha::CoverImages;
index 5153b15..d109ccc 100755 (executable)
@@ -23,12 +23,11 @@ use CGI qw ( -utf8 );
 use C4::Koha;
 use C4::Context;
 use C4::Scrubber;
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Letters;
 use Koha::Checkouts;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Patrons;
 
 my $query = CGI->new;
index 5216861..951d0b4 100755 (executable)
@@ -21,8 +21,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Libraries;
 
 my $query = CGI->new();
index d030fd0..5b98333 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;    # get_template_and_user
-use C4::Output;
-use C4::Languages qw(getTranslatedLanguages accept_language);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Quotes;
 use C4::Members;
-use C4::Overdues;
+use C4::Overdues qw( checkoverdues );
 use Koha::Checkouts;
 use Koha::Holds;
 use Koha::News;
index c9a4790..8945cc3 100755 (executable)
@@ -19,14 +19,14 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use Digest::MD5 qw( md5_base64 md5_hex );
-use JSON;
+use JSON qw( to_json );
 use List::MoreUtils qw( any each_array uniq );
 use String::Random qw( random_string );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Members;
+use C4::Members qw( checkcardnumber );
 use C4::Form::MessagingPreferences;
 use Koha::AuthUtils;
 use Koha::Patrons;
@@ -35,7 +35,7 @@ use Koha::Patron::Modification;
 use Koha::Patron::Modifications;
 use C4::Scrubber;
 use Email::Valid;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Libraries;
 use Koha::Patron::Attribute::Types;
 use Koha::Patron::Attributes;
index 1748c31..4064383 100755 (executable)
@@ -21,12 +21,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;    # checkauth, getborrowernumber.
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Circulation;
-use C4::Output;
-use C4::Members;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members::Messaging;
 use C4::Form::MessagingPreferences;
 use Koha::Patrons;
index ec9b9a8..4022bb9 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Output;
-use C4::Reserves;
-use C4::Auth;
+use C4::Reserves qw( CanReserveBeCanceledFromOpac ToggleSuspend SuspendAll );
+use C4::Auth qw( get_template_and_user );
 my $query = CGI->new;
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     {
index 64b064c..05b01a8 100755 (executable)
@@ -26,8 +26,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Output;
-use C4::Reserves;
-use C4::Auth;
+use C4::Reserves qw( CanReserveBeCanceledFromOpac );
+use C4::Auth qw( get_template_and_user );
 use Koha::Holds;
 my $query = CGI->new;
 
index 5de888a..6acebad 100755 (executable)
@@ -21,11 +21,10 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
 use C4::Letters;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $query = CGI->new();
 
index 58ec362..a969424 100755 (executable)
@@ -20,9 +20,8 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;    # get_template_and_user
-use C4::Output;
-use C4::Languages qw(getTranslatedLanguages accept_language);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::News;
 
 my $input = CGI->new;
index 9b76189..575596d 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth qw(:DEFAULT get_session);
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 
index 6b9081a..6ae82f0 100755 (executable)
@@ -22,14 +22,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;    # checkauth, getborrowernumber.
+use C4::Auth qw( get_template_and_user checkpw checkpw_hash );
 use C4::Context;
-use C4::Circulation;
-use C4::Members;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Patrons;
 
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 my $query = CGI->new;
 
index b6c5592..9ee1278 100755 (executable)
@@ -3,17 +3,21 @@
 use Modern::Perl;
 use CGI;
 
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use Koha::Patron::Password::Recovery
-  qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery DeleteExpiredPasswordRecovery);
+use Koha::Patron::Password::Recovery qw(
+    CompletePasswordRecovery
+    DeleteExpiredPasswordRecovery
+    GetValidLinkInfo
+    SendPasswordRecoveryEmail
+    ValidateBorrowernumber
+);
 use Koha::Patrons;
 my $query = CGI->new;
 use HTML::Entities;
-use Try::Tiny;
-use List::Util qw/any/;
+use Try::Tiny qw( catch try );
+use List::Util qw( any );
 
 my ( $template, $dummy, $cookie ) = get_template_and_user(
     {
index 2de16ab..017e04e 100755 (executable)
@@ -20,9 +20,9 @@
 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 Koha::DateUtils qw/dt_from_string/;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Patron::Consents;
 use Koha::Patrons;
 
index b40788d..3f1efb8 100755 (executable)
@@ -22,7 +22,7 @@ use Modern::Perl;
 use C4::Members;
 use CGI qw ( -utf8 );
 use CGI::Cookie;  # need to check cookies before having CGI parse the POST request
-use C4::Auth qw(:DEFAULT check_cookie_auth);
+use C4::Auth qw( check_cookie_auth );
 use Koha::Patron::Images;
 
 my $query = CGI->new;
index fa3083c..8ea6b12 100755 (executable)
@@ -19,9 +19,9 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;    # checkauth, getborrowernumber.
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Patrons;
 
 my $query = CGI->new;
index 4329357..2f43762 100755 (executable)
@@ -28,9 +28,9 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use CGI::Cookie;  # need to check cookies before having CGI parse the POST request
 
-use C4::Auth qw(:DEFAULT check_cookie_auth);
+use C4::Auth qw( get_template_and_user check_cookie_auth );
 use C4::Context;
-use C4::Output qw(:html :ajax pagination_bar);
+use C4::Output qw( is_ajax output_ajax_with_http_headers );
 
 use Koha::Ratings;
 
index 53a9b4d..7e1bca6 100755 (executable)
@@ -28,7 +28,7 @@ note: there is currently no 'delete rating' functionality in this script
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use C4::Context;
 
 use Koha::Ratings;
index 9c6200f..3652d00 100755 (executable)
@@ -20,17 +20,19 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Koha qw(
+    getitemtypeimagelocation
+    GetNormalizedISBN
+    GetNormalizedUPC
+);
 use C4::Biblio;
-use C4::Circulation;
-use C4::Members;
+use C4::Members qw( GetAllIssues );
 use C4::External::BakerTaylor qw( image_url link_url );
-use Koha::DateUtils;
 use MARC::Record;
 
-use C4::Output;
-use C4::Charset qw(StripNonXmlChars);
+use C4::Output qw( output_html_with_http_headers );
+use C4::Charset qw( StripNonXmlChars );
 use Koha::Patrons;
 
 use Koha::ItemTypes;
index c23ef02..1d2f496 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI qw( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 
index 71ea329..c4e4f22 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 use C4::Form::MessagingPreferences;
 use Koha::AuthUtils;
index 8a946d0..46a2050 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Circulation;
-use C4::Auth;
+use C4::Circulation qw( CanBookBeRenewed AddRenewal );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Items;
 use C4::Members;
 use Koha::Items;
 use Koha::Patrons;
-use Date::Calc qw( Today Date_to_Days );
 my $query = CGI->new;
 
 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
index 293f282..2cb1ff3 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
-use C4::Auth;    # get_template_and_user
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Letters;
 use Koha::ProblemReport;
 use Koha::Libraries;
 use Koha::Patrons;
 use Koha::Util::Navigation;
-use URI::Escape;
+use URI::Escape qw( uri_unescape );
 use Encode;
 
 my $input = CGI->new;
index 2303ea0..dd02b4d 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Biblios;
 use Koha::Patrons;
index b70cff8..721981b 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;    # checkauth, getborrowernumber.
-use C4::Koha;
-use C4::Circulation;
-use C4::Reserves;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Koha qw( getitemtypeimagelocation getitemtypeimagesrc );
+use C4::Circulation qw( GetBranchItemRule GetTransfers );
+use C4::Reserves qw( CanItemBeReserved CanBookBeReserved AddReserve GetReservesControlBranch IsAvailableForItemLevelRequest );
+use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
+use C4::Items qw( GetHostItemsInfo GetItemsInfo );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 use C4::Members;
 use C4::Overdues;
 
 use Koha::AuthorisedValues;
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::CirculationRules;
 use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Checkouts;
 use Koha::Libraries;
 use Koha::Patrons;
-use Date::Calc qw/Today Date_to_Days/;
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 
 my $maxreserves = C4::Context->preference("maxreserves");
 
index ca90b41..b438b7f 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $localNetwork  = C4::Context->preference('RestrictedPageLocalIPs');
 my $userIP = $ENV{'REMOTE_ADDR'};
index d19f9dd..3f6e6c8 100755 (executable)
@@ -21,9 +21,9 @@ use Modern::Perl;
 use CGI;
 use Encode;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::UploadedFiles;
 
 my $input = CGI::->new;
index f00b79f..12152d2 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Scrubber;
 
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Review;
 use Koha::Reviews;
 
index 2be5219..299bb29 100755 (executable)
@@ -19,8 +19,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Members;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Patrons;
 
 my $query = CGI->new;
index 64c696d..019fdc6 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth qw(:DEFAULT get_session);
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Log;
-use C4::Items;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Search::History;
 
-use URI::Escape;
-use POSIX qw(strftime);
 
 
 my $cgi = CGI->new;
index cde8b6e..67c11c1 100755 (executable)
@@ -43,14 +43,14 @@ my ($builder, $searcher);
 $builder  = Koha::SearchEngine::QueryBuilder->new({index => 'biblios'});
 $searcher = Koha::SearchEngine::Search->new({index => 'biblios'});
 
-use C4::Output;
-use C4::Auth qw(:DEFAULT get_session);
-use C4::Languages qw(getLanguages);
-use C4::Search;
+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::Languages qw( getlanguage getLanguages );
+use C4::Search qw( searchResults );
 use C4::Search::History;
-use C4::Biblio; # Unused here?
-use C4::Koha;
-use C4::Tags qw(get_tags);
+use C4::Biblio qw( GetXmlBiblio CountItemsIssued );
+use C4::Koha qw( GetItemTypesCategorized getitemtypeimagelocation GetAuthorisedValues );
+use C4::Tags qw( get_tags get_tag );
 use C4::SocialData;
 use C4::External::OverDrive;
 use C4::External::BakerTaylor qw( image_url link_url );
index eee5e2c..fdf8671 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw(encode);
-use Carp;
-use Try::Tiny;
-
-use C4::Biblio;
-use C4::Items;
-use C4::Auth;
-use C4::Output;
-use C4::Members;
-use C4::Templates ();
+use Encode;
+use Carp qw( carp );
+use Try::Tiny qw( catch try );
+
+use C4::Biblio qw(
+    GetBiblioData
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcSubjects
+);
+use C4::Items qw( GetItemsInfo );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Templates;
 use Koha::Email;
 use Koha::Patrons;
 use Koha::Token;
index c97aa45..825de81 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw( encode );
-use Carp;
-use Try::Tiny;
-
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
-use C4::Members;
+use Encode;
+use Carp qw( carp );
+use Try::Tiny qw( catch try );
+
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw(
+    GetBiblioData
+    GetFrameworkCode
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcISBN
+    GetMarcSubjects
+);
+use C4::Items qw( GetItemsInfo );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Email;
 use Koha::Patrons;
 use Koha::Virtualshelves;
index c842880..b84b176 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
-use C4::Serials;
-use C4::Letters;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Serials qw( GetFullSubscription GetFullSubscriptionsFromBiblionumber PrepareSerialsData GetSubscription GetSubscriptionsFromBiblionumber );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 my $query      = CGI->new;
index 7eecf6c..701871b 100755 (executable)
@@ -27,11 +27,10 @@ use constant SHELVES_URL =>
 use CGI qw ( -utf8 );
 use Email::Valid;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::Letters;
-use C4::Members ();
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Patrons;
 use Koha::Virtualshelves;
index 8fa4fb7..b9eee82 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
 use C4::External::BakerTaylor qw( image_url link_url );
-use C4::Koha;
-use C4::Items;
+use C4::Koha qw(
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
 use C4::Members;
-use C4::Output;
+use C4::Output qw( pagination_bar output_with_http_headers );
 use C4::Tags qw( get_tags );
 use C4::XSLT;
 
index 5ba6a23..57c63fe 100755 (executable)
@@ -25,11 +25,10 @@ use Encode;
 
 # Koha modules used
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::ImportBatch;
-use C4::XSLT ();
+use C4::XSLT;
 use C4::Templates;
 use Koha::RecordProcessor;
 
index cfb359c..e6aab17 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
-use C4::Circulation;
-use C4::Biblio;
-use Koha::DateUtils;
+use C4::Auth qw( get_template_and_user );
+use C4::Koha qw(
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
+use C4::Output qw( output_html_with_http_headers );
+use C4::Biblio qw( GetMarcBiblio );
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Patrons;
 use Koha::Reviews;
-use POSIX qw(ceil floor strftime);
+use POSIX qw( ceil floor );
 
 my $template_name;
 my $query = CGI->new;
index b1f1701..1fb5ffb 100755 (executable)
@@ -19,13 +19,18 @@ use Modern::Perl;
 
 
 use CGI qw ( -utf8 );
-use Encode qw( encode );
-use C4::Auth;    # get_template_and_user
+use Encode;
+use C4::Auth qw( get_template_and_user );
 use C4::Members;
-use C4::Koha;
-use C4::Output;
-use C4::Suggestions;
-use C4::Koha;
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Suggestions qw(
+    DelSuggestion
+    MarcRecordFromNewSuggestion
+    NewSuggestion
+    SearchSuggestion
+);
+use C4::Koha qw( GetAuthorisedValues );
 use C4::Scrubber;
 use C4::Search qw( FindDuplicate );
 
@@ -33,7 +38,7 @@ use Koha::AuthorisedValues;
 use Koha::Libraries;
 use Koha::Patrons;
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input           = CGI->new;
 my $op              = $input->param('op') || 'else';
index 200e8df..df323ce 100755 (executable)
@@ -35,16 +35,21 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use CGI::Cookie; # need to check cookies before having CGI parse the POST request
 
-use C4::Auth qw(:DEFAULT check_cookie_auth);
+use C4::Auth qw( check_cookie_auth get_template_and_user );
 use C4::Context;
-use C4::Output qw(:html :ajax );
+use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers );
 use C4::Scrubber;
-use C4::Biblio;
-use C4::Items qw(GetItemsInfo GetHiddenItemnumbers);
-use C4::Tags qw(add_tag get_approval_rows get_tag_rows remove_tag stratify_tags);
+use C4::Biblio qw( GetMarcBiblio );
+use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
+use C4::Tags qw(
+    add_tag
+    get_approval_rows
+    get_tag_rows
+    remove_tag
+    stratify_tags
+);
 use C4::XSLT;
 
-use Data::Dumper;
 
 use Koha::Logger;
 use Koha::Biblios;
index 25afac4..8af9c29 100755 (executable)
@@ -26,11 +26,10 @@ TODO :: Description here
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Biblio;
 
 my $query = CGI->new;
 
index d2d76da..f185702 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Languages;
 use C4::Search;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation;
-use Date::Manip;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Circulation qw( GetTopIssues );
 
 =head1 NAME
 
index 0d9bdd7..8deb054 100755 (executable)
@@ -21,20 +21,22 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Koha;
-use C4::Circulation;
+use C4::Auth qw( get_template_and_user );
+use C4::Koha qw(
+    getitemtypeimagelocation
+    GetNormalizedISBN
+    GetNormalizedUPC
+);
+use C4::Circulation qw( CanBookBeRenewed GetRenewCount GetIssuingCharges GetSoonestRenewDate );
 use C4::External::BakerTaylor qw( image_url link_url );
-use C4::Reserves;
+use C4::Reserves qw( GetReserveStatus );
 use C4::Members;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::Letters;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Biblio qw( GetMarcBiblio );
 use Koha::Account::Lines;
 use Koha::Biblios;
 use Koha::Libraries;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 use Koha::Holds;
 use Koha::Database;
 use Koha::ItemTypes;
@@ -48,12 +50,8 @@ use Koha::Token;
 
 use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
 
-use Scalar::Util qw(looks_like_number);
-use Date::Calc qw(
-  Today
-  Add_Delta_Days
-  Date_to_Days
-);
+use Scalar::Util qw( looks_like_number );
+use Date::Calc qw( Date_to_Days Today );
 
 my $query = CGI->new;
 
index 88a3cf8..2171fa4 100755 (executable)
@@ -19,13 +19,13 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth qw(get_template_and_user checkpw);
-use C4::Circulation;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Circulation qw( AddReturn );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Items;
 
 use List::MoreUtils qw( uniq );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 my $cgi = CGI->new;
 
index 25e4356..57d02ec 100755 (executable)
@@ -24,8 +24,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth   qw(get_template_and_user in_iprange);
-use C4::Output qw(output_html_with_http_headers);
+use C4::Auth qw( in_iprange get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $query = CGI->new;
 unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
index 3b70741..a2564f1 100755 (executable)
@@ -29,10 +29,9 @@ It is called from sco-main.pl
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Auth qw/:DEFAULT get_session in_iprange/;
-use C4::Output;
-use C4::Members;
-use C4::Koha;
+use C4::Auth qw( in_iprange get_session get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Members qw( IssueSlip );
 
 my $input = CGI->new;
 unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
index d4f9163..40d5915 100755 (executable)
@@ -35,14 +35,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth qw(get_template_and_user checkpw in_iprange);
-use C4::Koha;
-use C4::Circulation;
+use C4::Auth qw( in_iprange get_template_and_user checkpw );
+use C4::Circulation qw( AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
 use C4::Reserves;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
-use C4::Biblio;
-use C4::Items;
 use Koha::DateUtils qw( dt_from_string );
 use Koha::Acquisition::Currencies;
 use Koha::Items;
index e997ab9..36e86b7 100755 (executable)
@@ -18,7 +18,7 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth qw(in_iprange);
+use C4::Auth qw( in_iprange );
 use C4::Service;
 use C4::Members;
 use Koha::Patron::Images;
index 8913ab7..fea4a9e 100755 (executable)
@@ -21,10 +21,10 @@ use Modern::Perl;
 
 use JSON qw( encode_json );
 use C4::Service;
-use C4::Auth qw /check_cookie_auth/;
+use C4::Auth qw( check_cookie_auth get_template_and_user );
 use C4::Letters;
 use CGI;
-use C4::Output qw(:DEFAULT :ajax);
+use C4::Output qw( is_ajax output_with_http_headers );
 use C4::Scrubber;
 use C4::Circulation;
 use C4::Biblio;
index 82e583c..d9797c2 100755 (executable)
@@ -3,10 +3,10 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::ShelfBrowser;
+use C4::Output qw( output_html_with_http_headers );
+use C4::ShelfBrowser qw( GetNearbyItems );
 
 my $cgi = CGI->new;
 
index e357f0a..5849d3a 100755 (executable)
 
 use Modern::Perl;
 use C4::Context;
-use C4::Auth qw(checkauth);
+use C4::Auth qw( checkauth );
 use C4::Biblio;
-use C4::Output;
+use C4::Output qw( output_error );
 use Koha::Items;
 use Koha::Linktracker;
 use CGI qw ( -utf8 );
-use List::MoreUtils qw(any);
+use List::MoreUtils qw( any );
 
 my $cgi = CGI->new;
 my $uri = $cgi->param('uri') || '';
index c10c208..95ff728 100755 (executable)
@@ -21,9 +21,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use Koha::List::Patron;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
 
 my $cgi = CGI->new;
 
index 87c199b..773ec3d 100755 (executable)
@@ -21,9 +21,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
-use Koha::List::Patron;
+use Koha::List::Patron qw( DelPatronList );
 
 my $cgi = CGI->new;
 
index 75f30e2..7076b20 100755 (executable)
@@ -21,10 +21,14 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use Koha::List::Patron;
-use List::MoreUtils qw/uniq/;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use Koha::List::Patron qw(
+    AddPatronsToList
+    DelPatronsFromList
+    GetPatronLists
+);
+use List::MoreUtils qw( uniq );
 
 my $cgi = CGI->new;
 
index df84727..f599cd1 100755 (executable)
@@ -21,9 +21,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use Koha::List::Patron;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use Koha::List::Patron qw( GetPatronLists );
 
 my $cgi = CGI->new;
 
index 98ac959..f97fcf4 100755 (executable)
@@ -21,9 +21,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use Koha::List::Patron;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
 
 my $cgi = CGI->new;
 
index 8eb2a73..04bc0eb 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 
 use Koha::Patron::Categories;
index 6ea391f..e994ddb 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use Graphics::Magick;
-use XML::Simple;
-use POSIX qw(ceil);
-use Storable qw(dclone);
+use XML::Simple qw( XMLin );
+use POSIX qw( ceil );
+use Storable qw( dclone );
 use autouse 'Data::Dumper' => qw(Dumper);
 
 use C4::Context;
 use C4::Creators;
 use C4::Patroncards;
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 use Koha::Patrons;
 use Koha::Patron::Images;
 
index 7cab1a7..d90d37c 100755 (executable)
@@ -24,9 +24,9 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use autouse 'Data::Dumper' => qw(Dumper);
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( get_card_summary html_table );
 use C4::Patroncards;
 use Koha::Patrons;
 
index 6ecbde4..22ef6b9 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Text::CSV_XS;
-use XML::Simple;
+use XML::Simple qw( XMLin XMLout );
 use autouse 'Data::Dumper' => qw(Dumper);
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw(
+    get_all_image_names
+    get_barcode_types
+    get_font_types
+    get_text_justification_types
+    get_unit_values
+);
 use C4::Patroncards;
 
 my $cgi = CGI->new;
index c192702..e5517da 100755 (executable)
@@ -22,9 +22,9 @@ 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::Creators::Lib qw(get_all_templates get_unit_values);
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators::Lib qw( get_all_templates get_unit_values );
 use C4::Patroncards::Profile;
 
 my $cgi = CGI->new;
index fab470a..0238701 100755 (executable)
@@ -23,9 +23,9 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use autouse 'Data::Dumper' => qw(Dumper);
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( get_all_profiles get_unit_values );
 use C4::Patroncards;
 
 my $cgi = CGI->new;
index 6e69187..93df48f 100755 (executable)
@@ -22,8 +22,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::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 587d4ee..3f3c288 100755 (executable)
@@ -4,13 +4,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use Graphics::Magick;
-use POSIX qw(ceil);
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Creators;
-use C4::Patroncards;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( html_table );
+use C4::Patroncards qw( get_image put_image rm_image );
 
 my $cgi = CGI->new;
 
index a2e9546..f4d21c6 100755 (executable)
@@ -23,12 +23,17 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use autouse 'Data::Dumper' => qw(Dumper);
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
-use C4::Patroncards;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw(
+    get_all_layouts
+    get_all_profiles
+    get_all_templates
+    get_batch_summary
+    html_table
+);
 use C4::Labels;
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 
 my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index ec7024a..ea154ea 100755 (executable)
@@ -22,10 +22,9 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use autouse 'Data::Dumper' => qw(Dumper);
 
-use C4::Auth qw(get_template_and_user);
-use C4::Output qw(output_html_with_http_headers);
-use C4::Creators;
-use C4::Patroncards;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Creators qw( get_all_layouts get_all_templates get_output_formats );
 
 my $cgi = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 1815507..6966be9 100755 (executable)
@@ -20,7 +20,7 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use C4::Context;
-use C4::Auth qw(check_cookie_auth);
+use C4::Auth qw( check_cookie_auth );
 use Koha::Plugins::Handler;
 
 die("Koha plugins are disabled!") unless C4::Context->config("enable_plugins");
index efdd503..da892ba 100755 (executable)
@@ -21,12 +21,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use JSON qw(from_json);
-use LWP::Simple qw(get);
+use JSON qw( from_json );
+use LWP::Simple qw( get );
 
 use Koha::Plugins;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 my $plugins_enabled = C4::Context->config("enable_plugins");
index 7d350fe..d6a85d3 100755 (executable)
 use Modern::Perl;
 
 use Archive::Extract;
-use File::Temp;
-use File::Copy;
 use CGI qw ( -utf8 );
 
 use C4::Context;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Output;
 use C4::Members;
 use Koha::Plugins::Handler;
index a681aab..3e44f00 100755 (executable)
@@ -21,12 +21,11 @@ use Modern::Perl;
 use Archive::Extract;
 use CGI qw ( -utf8 );
 use Mojo::UserAgent;
-use File::Copy;
 use File::Temp;
 
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 use Koha::Logger;
 use Koha::Plugins;
index a0bd16a..4570844 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 
 use Koha::Plugins::Handler;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 my $plugins_enabled = C4::Context->config("enable_plugins");
index c834053..b401f12 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use CGI;
 use JSON qw( from_json );
 
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
+use C4::Auth qw( get_session get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 use Koha::Account::DebitTypes;
index a387b8e..0250559 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
+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 CGI qw ( -utf8 );
-use C4::Letters;
 use Koha::Account::Lines;
-use Koha::DateUtils;
 use Koha::Notice::Templates;
 
 my $input = CGI->new;
index e398bda..490fe11 100755 (executable)
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 use Koha::Account::Lines;
 use Koha::Cash::Registers;
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input = CGI->new();
 
index 44c8136..7a9c3a1 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 use Koha::Cash::Registers;
index 8fe5313..1d27870 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Reports;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation;
-use C4::Biblio;
+use C4::Reports qw( GetDelimiterChoices );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField );
 use Koha::ItemTypes;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Libraries;
 
 =head1 NAME
index 6737c03..912798e 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Koha;
-use C4::Circulation;
-use C4::Members;
-use C4::Reports;
+use C4::Reports qw( GetDelimiterChoices );
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::ItemTypes;
 use Koha::Patron::Categories;
 
@@ -286,8 +283,7 @@ sub calculate {
                $patrons{$id}->{oldcols}->{$col} = $rank;
     }
 
-       use Data::Dumper;
-
+       
        $strcalc =~ s/old_issues/issues/g;
     $dbcalc = $dbh->prepare($strcalc);
     $dbcalc->execute;
index 22f71c9..9d7fba6 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Output;
-use C4::Circulation;
-use C4::Reports;
-use C4::Members;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reports qw( GetDelimiterChoices );
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patron::Categories;
 
 =head1 NAME
index dc8b7b4..f636f6b 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use List::MoreUtils qw/uniq/;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Acquisition;
-use C4::Output;
-use C4::Reports;
-use C4::Circulation;
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reports qw( GetDelimiterChoices );
 
 use Koha::AuthorisedValues;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Libraries;
 use Koha::Patron::Attribute::Types;
 use Koha::Patron::Categories;
 
-use Date::Calc qw(
-  Today
-  Add_Delta_YM
-  );
+use Date::Calc qw( Add_Delta_YM Today );
 
 =head1 NAME
 
index 3b790ff..0dcc38f 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI;
 use C4::Context;
-use C4::Reports;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation;
+use C4::Reports qw( GetDelimiterChoices );
+use C4::Output qw( output_html_with_http_headers );
 use DateTime;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Text::CSV::Encoded;
-use List::Util qw/any/;
+use List::Util qw( any );
 
 use Koha::Account::CreditTypes;
 use Koha::Account::DebitTypes;
index 040280d..886fecf 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation;
-use C4::Reports;
-use C4::Members;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Reports qw( GetDelimiterChoices );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::ItemTypes;
 
 =head1 NAME
index 3835f13..5196179 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 # use Date::Manip;  # TODO: add not borrowed since date X criteria
-use Data::Dumper;
 
 =head1 catalogue_out
 
index b7b01e2..c3795df 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::Reports;
-use C4::Circulation;
-use C4::Biblio qw/GetMarcSubfieldStructureFromKohaField/;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Reports qw( GetDelimiterChoices );
+use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField );
 
 use Koha::AuthorisedValues;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::ItemTypes;
 
 =head1 NAME
index 26976c0..ef95e71 100755 (executable)
 #
 # You should have received a copy of the GNU General Public License
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
-use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Reports::Guided;
-use Koha::DateUtils;
+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 Koha::DateUtils qw( dt_from_string output_pref );
 
 =head1 NAME
 
index 854098e..77c19b3 100755 (executable)
@@ -23,21 +23,21 @@ use Text::CSV::Encoded;
 use Encode qw( decode );
 use URI::Escape;
 use File::Temp;
-use C4::Reports::Guided;
+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 Koha::Reports;
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
+use C4::Auth qw( get_template_and_user get_session );
+use C4::Output qw( pagination_bar output_html_with_http_headers );
 use C4::Context;
 use Koha::Caches;
-use C4::Log;
-use Koha::DateUtils qw/dt_from_string output_pref/;
+use C4::Log qw( logaction );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::AuthorisedValue;
 use Koha::AuthorisedValues;
 use Koha::BiblioFrameworks;
 use Koha::Libraries;
 use Koha::Patron::Categories;
 use Koha::SharedContent;
-use Koha::Util::OpenDocument;
+use Koha::Util::OpenDocument qw( generate_ods );
 
 =head1 NAME
 
index d5bbf2d..7be36a5 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::Circulation;
-use C4::Reports;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reports qw( GetDelimiterChoices );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::ItemTypes;
 use Koha::Patron::Categories;
-use Date::Calc qw(Delta_Days);
+use Date::Calc qw( Delta_Days );
 
 =head1 NAME
 
index cb5cda0..3eb27fb 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Date::Manip;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Output;
-use C4::Circulation;
-use C4::Reports;
-use C4::Members;
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reports qw( GetDelimiterChoices );
 
 use Koha::AuthorisedValues;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::ItemTypes;
 use Koha::Patron::Attribute::Types;
 
index 9c77e6e..901ff5a 100755 (executable)
@@ -29,14 +29,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use Text::CSV_XS;
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::AuthorisedValues;
 use Koha::CsvProfiles;
-use Koha::DateUtils;
 
 my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 0d6e1bc..ff174f0 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Circulation;
+use C4::Output qw( output_html_with_http_headers );
 
 
 my $input = CGI->new;
index 92bbb5f..a44ca3f 100755 (executable)
@@ -28,14 +28,12 @@ This script displays all orders associated to a selected budget.
 use Modern::Perl;
 
 use CGI qw( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Budgets;
-use C4::Biblio;
-use C4::Reports;
-use C4::Acquisition; #GetBasket()
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Budgets qw( GetBudgetsReport GetBudgetHierarchy );
+use C4::Acquisition qw( GetBasket get_rounded_price );
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index bffe6b6..71aaa87 100755 (executable)
@@ -20,8 +20,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
 
 
index 3c91778..cb63a6e 100755 (executable)
@@ -21,18 +21,18 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha;
-use C4::Output;
-use C4::Reports;
+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;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::ItemTypes;
 use Koha::Libraries;
 use Koha::Patron::Categories;
-use List::MoreUtils qw/any/;
+use List::MoreUtils qw( any );
 
 =head1 NAME
 
index 277b767..a3b12b5 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use C4::Reports;
-use C4::Serials;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reports qw( GetDelimiterChoices );
+use C4::Serials qw( GetExpirationDate HasSubscriptionExpired );
 
 =head1 serials_out
 
index f1ab945..3a7c3de 100755 (executable)
@@ -26,8 +26,8 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use List::MoreUtils qw( uniq );
 use C4::Output;
-use C4::Reserves;
-use C4::Auth;
+use C4::Reserves qw( ModReserve ModReserveCancelAll );
+use C4::Auth qw( get_template_and_user );
 use Koha::DateUtils qw( dt_from_string );
 
 my $query = CGI->new;
index e0098e0..3217dbf 100755 (executable)
@@ -25,8 +25,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Output;
-use C4::Reserves;
-use C4::Auth;
+use C4::Reserves qw( SuspendAll );
+use C4::Auth qw( get_template_and_user );
 
 my $query = CGI->new;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index 6355594..5ee8dce 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
-use C4::Reserves;
-use C4::Circulation;
-use C4::Members;
-use C4::Auth qw/checkauth/;
+use C4::Reserves qw( CanItemBeReserved AddReserve CanBookBeReserved );
+use C4::Auth qw( checkauth );
 
 use Koha::Items;
 use Koha::Patrons;
index bf13c3d..a4563f3 100755 (executable)
@@ -29,23 +29,21 @@ script to place reserves/requests
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use List::MoreUtils qw/uniq/;
-use Date::Calc qw/Date_to_Days/;
-use C4::Output;
-use C4::Auth;
-use C4::Reserves;
-use C4::Biblio;
-use C4::Items;
-use C4::Koha;
-use C4::Serials;
-use C4::Circulation;
-use Koha::DateUtils;
+use List::MoreUtils qw( uniq );
+use Date::Calc qw( Date_to_Days );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord ItemsAnyAvailableAndNotRestricted CanItemBeReserved IsAvailableForItemLevelRequest );
+use C4::Items qw( get_hostitemnumbers_of );
+use C4::Koha qw( getitemtypeimagelocation );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
+use C4::Circulation qw( GetTransfers _GetCircControlBranch GetBranchItemRule );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use C4::Utils::DataTables::Members;
-use C4::Members;
-use C4::Search;                # enabled_staff_search_views
+use C4::Search qw( enabled_staff_search_views );
 
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Checkouts;
 use Koha::Holds;
 use Koha::CirculationRules;
index 99a0d3f..6d50443 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( pagination_bar output_html_with_http_headers );
 use C4::Context;
-use C4::Biblio;
 use Koha::Biblios;
 use Koha::Patrons;
 use Koha::Reviews;
index f77c4ed..6cde9ae 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Output;
-use C4::Auth;
+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::Items;
 
 use Koha::Items;
 
index 6955291..28a23e5 100755 (executable)
@@ -20,8 +20,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 
 use C4::RotatingCollections;
index 5a22bf4..b350861 100755 (executable)
@@ -20,8 +20,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::RotatingCollections;
 
index 4380c1e..1d5dcf8 100755 (executable)
@@ -18,8 +18,8 @@
 
 use Modern::Perl;
 
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
 use C4::RotatingCollections;
 
index 95a838c..1a82075 100755 (executable)
@@ -41,12 +41,11 @@ acqui-search-result.pl
 
 
 use Modern::Perl;
-use C4::Auth;
-use C4::Biblio;
-use C4::Output;
+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 );
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 
 use Koha::Acquisition::Booksellers;
 
index 2b1041c..682b5bb 100755 (executable)
@@ -20,8 +20,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 my $query = CGI->new;
 
index b42b5fa..1240670 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 
 use Koha::Patron::Categories;
index 97dbec1..6ce76af 100755 (executable)
@@ -44,11 +44,11 @@ The date to filter on.
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Serials; # GetExpirationDate
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Serials qw( SearchSubscriptions GetExpirationDate );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 use DateTime;
 
index 4a8a6b7..f988a6c 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Serials;
-use C4::Acquisition;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Serials qw( GetSuppliersWithLateIssues GetLateOrMissingIssues updateClaim can_claim_subscription );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Letters;
-use C4::Koha qw( GetAuthorisedValues );
+use C4::Letters qw( GetLetters SendAlerts );
 
 use Koha::AdditionalFields;
 use Koha::CsvProfiles;
index 506a539..de6f04d 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Serials::Numberpattern;
-use C4::Auth qw/check_cookie_auth/;
-use URI::Escape;
+use C4::Serials::Numberpattern qw(
+    AddSubscriptionNumberpattern
+    ModSubscriptionNumberpattern
+);
+use C4::Auth qw( check_cookie_auth );
 
 my $input = CGI->new;
 
index 7af3395..f20cdbe 100755 (executable)
@@ -18,8 +18,7 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Auth;
-use C4::Serials;
-use C4::Acquisition;
+use C4::Serials qw( GetLateOrMissingIssues updateClaim );
 use C4::Output;
 use C4::Context;
 
index 093bfb2..b33cb8d 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Koha;
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
-use C4::Reserves;
-use C4::Circulation;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Reserves qw( AddReserve ModReserve );
 use C4::Context;
-use C4::Members;
-use C4::Biblio;
-use C4::Items;
-use C4::Serials;
+use C4::Items qw( GetItemsInfo );
+use C4::Serials qw( delroutingmember getroutinglist GetSubscription GetSerials check_routing );
 use URI::Escape;
 
 use Koha::Biblios;
index 6a237f6..2e3122d 100755 (executable)
@@ -28,14 +28,11 @@ printed out
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Koha;
-use C4::Auth;
-use C4::Output;
-use C4::Acquisition;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
 use C4::Context;
 
-use C4::Members;
-use C4::Serials;
+use C4::Serials qw( GetSubscription delroutingmember addroutingmember getroutinglist GetSerials GetLatestSerials check_routing );
 use Koha::Patrons;
 
 use URI::Escape;
index f725d7f..963eeeb 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
-use C4::Serials;
-use C4::Letters;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Serials qw( ModSerialStatus GetSubscription GetNextExpected GetNextSeq GetNextDate NewIssue HasSubscriptionExpired abouttoexpire check_routing GetFullSubscription PrepareSerialsData CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber GetFullSubscriptionsFromBiblionumber );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
 use C4::Context;
 use Koha::Serial::Items;
 
 use Koha::DateUtils qw( dt_from_string );
 
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 
 
 my $query = CGI->new;
index ea9bee8..76a6bf0 100755 (executable)
@@ -63,21 +63,20 @@ op can be :
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use Encode qw( decode is_utf8 );
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Koha;
-use C4::Output;
+use Encode;
+use C4::Auth qw( get_template_and_user haspermission );
+use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToXml );
+use C4::Items qw( AddItemFromMarc ModItemFromMarc PrepareItemrecordDisplay );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Context;
-use C4::Serials;
-use C4::Search qw/enabled_staff_search_views/;
+use C4::Serials qw( GetSerials GetSerials2 GetSerialInformation HasSubscriptionExpired GetSubscription abouttoexpire NewIssue ModSerialStatus GetPreviousSerialid AddItem2Serial );
+use C4::Search qw( enabled_staff_search_views );
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Items;
 use Koha::Serial::Items;
 
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 
 my $query           = CGI->new();
 my $dbh             = C4::Context->dbh;
index 6f2c40c..a0e4bc0 100755 (executable)
@@ -30,9 +30,9 @@ this script is the main page for serials/
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Serials;
 
 my $query   = CGI->new;
index 5b6608a..56a16e6 100755 (executable)
@@ -30,14 +30,13 @@ this script is the search page for serials
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Koha qw( GetAuthorisedValues );
-use C4::Output;
-use C4::Serials;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials qw( CloseSubscription ReopenSubscription SearchSubscriptions check_routing );
 use Koha::AdditionalFields;
 
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::SharedContent;
 
 my $query         = CGI->new;
index d6bcfc7..6420e50 100755 (executable)
@@ -31,12 +31,12 @@ publication date, based on frequency and first publication date.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Date::Calc qw(Today Day_of_Year Week_of_Year Day_of_Week Days_in_Year Delta_Days Add_Delta_Days Add_Delta_YM);
-use C4::Auth;
-use C4::Output;
-use C4::Serials;
+use Date::Calc qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq );
 use C4::Serials::Frequency;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
index 9689148..b61012e 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Date::Calc qw(Today Day_of_Year Week_of_Year Add_Delta_Days Add_Delta_YM);
-use C4::Koha;
-use C4::Biblio;
-use C4::Auth;
-use C4::Acquisition;
-use C4::Output;
+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::Output qw( output_and_exit output_html_with_http_headers );
 use C4::Context;
-use C4::Serials;
+use C4::Serials qw( GetSubscription GetNextExpected GetSerials GetSubscriptionLength NewSubscription ModNextExpected ModSubscription );
 use C4::Serials::Frequency;
 use C4::Serials::Numberpattern;
-use C4::Letters;
+use C4::Letters qw( GetLetters );
 use Koha::AdditionalFields;
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 use Koha::ItemTypes;
-use Carp;
+use Carp qw( carp );
 
 use Koha::Subscription::Numberpattern;
 use Koha::Subscription::Frequency;
index b06f68d..4e069b9 100755 (executable)
@@ -21,13 +21,13 @@ use Modern::Perl;
 
 use CGI qw( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Serials;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials qw( can_edit_subscription );
 use Koha::Subscriptions;
 use Koha::Acquisition::Booksellers;
 use Koha::AdditionalFields;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 my $cgi = CGI->new;
 
index 8878859..d38147d 100755 (executable)
@@ -49,12 +49,12 @@ to multipage gestion.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Koha;
-use C4::Auth;
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Search;
-use C4::Biblio;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Search qw( new_record_from_zebra );
+use C4::Biblio qw( TransformMarcToKoha );
 
 use Koha::ItemTypes;
 use Koha::SearchEngine;
index 118b3a1..6e82048 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Acquisition;
-use C4::Auth;
-use C4::Budgets;
-use C4::Koha;
-use C4::Serials;
-use C4::Output;
+use C4::Auth qw( get_template_and_user checkauth );
+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;
-use C4::Search qw/enabled_staff_search_views/;
+use C4::Search qw( enabled_staff_search_views );
 
 use Koha::AdditionalFields;
 use Koha::AuthorisedValues;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 use Koha::Acquisition::Bookseller;
 use Koha::Subscriptions;
 
-use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/;
-use Carp;
+use Carp qw( carp );
 
 use Koha::SharedContent;
 
index 30af9f5..86d14fc 100755 (executable)
@@ -31,9 +31,9 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Serials;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials qw( GetSubscription ModSubscription DelSubscription );
 use C4::Serials::Frequency;
 
 my $input = CGI->new;
index 2532f8f..4d46a83 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Serials::Frequency;
-use C4::Auth qw/check_cookie_auth/;
+use C4::Serials::Frequency qw( GetSubscriptionFrequency );
+use C4::Auth qw( check_cookie_auth );
 use JSON qw( to_json );
 
 my $input=CGI->new;
index 75474ed..acaf307 100755 (executable)
@@ -30,13 +30,12 @@ Modify subscription history
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
-use C4::Biblio;
-use C4::Serials;
+use C4::Serials qw( ModSubscriptionHistory ModSubscription GetSubscriptionHistoryFromSubscriptionId GetSubscription );
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( output_pref );
 
 my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
index db17860..cc6b292 100755 (executable)
@@ -19,8 +19,8 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Serials::Numberpattern;
-use C4::Auth qw/check_cookie_auth/;
+use C4::Serials::Numberpattern qw( GetSubscriptionNumberpattern );
+use C4::Auth qw( check_cookie_auth );
 use JSON qw( to_json );
 
 my $input=CGI->new;
index a84c304..19b917b 100755 (executable)
@@ -30,10 +30,18 @@ Manage numbering patterns
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
-use C4::Serials::Numberpattern;
-use C4::Serials::Frequency;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials::Numberpattern qw(
+    AddSubscriptionNumberpattern
+    DelSubscriptionNumberpattern
+    GetSubscriptionNumberpattern
+    GetSubscriptionNumberpatternByName
+    GetSubscriptionNumberpatterns
+    GetSubscriptionsWithNumberpattern
+    ModSubscriptionNumberpattern
+);
+use C4::Serials::Frequency qw( GetSubscriptionFrequencies );
 
 my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
index a30b249..5da1536 100755 (executable)
@@ -46,14 +46,14 @@ Id of the subscription this script has to renew
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Carp;
+use Carp qw( carp );
 use C4::Koha;
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Serials;
-use Koha::DateUtils;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
+use C4::Serials qw( GetSubscription GetSubscriptionLength NewSubscription ReNewSubscription );
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $query = CGI->new;
 my $dbh   = C4::Context->dbh;
index 106b867..bb356c6 100755 (executable)
@@ -20,9 +20,9 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Subscriptions;
 
index 79ee88e..f22faca 100755 (executable)
@@ -30,9 +30,9 @@ It uses PrepareItemrecordDisplay
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Items;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Items qw( PrepareItemrecordDisplay );
 
 my $input = CGI->new;
 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
index f6758aa..d4b5ff0 100755 (executable)
@@ -18,8 +18,8 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
 
 use Koha::Patron::Categories;
index 370bac1..27a263c 100755 (executable)
 use Modern::Perl;
 require Exporter;
 use CGI qw ( -utf8 );
-use C4::Auth;    # get_template_and_user
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Suggestions;
-use C4::Koha;
-use C4::Budgets;
-use C4::Search;
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget );
+use C4::Search qw( FindDuplicate GetDistinctValues );
 use C4::Members;
 use Koha::DateUtils qw( dt_from_string );
 use Koha::AuthorisedValues;
@@ -33,7 +33,7 @@ use Koha::Acquisition::Currencies;
 use Koha::Libraries;
 use Koha::Patrons;
 
-use URI::Escape;
+use URI::Escape qw( uri_escape );
 
 sub Init{
     my $suggestion= shift @_;
index 692b82d..ae082d3 100755 (executable)
@@ -23,7 +23,6 @@ use JSON qw( to_json );
 use CGI;
 use C4::Service;
 use C4::Auth qw( check_cookie_auth );
-use C4::Output qw(:DEFAULT :ajax);
 use Koha::AuthorisedValues;
 
 =head1 NAME
index a04ccfb..a1d6b13 100755 (executable)
@@ -19,9 +19,9 @@
 
 use Modern::Perl;
 use CGI;
-use JSON;
-use C4::Auth qw(check_cookie_auth);
-use C4::Biblio;
+use JSON qw( to_json );
+use C4::Auth qw( check_cookie_auth );
+use C4::Biblio qw( BiblioAutoLink TransformHtmlToMarc );
 use C4::Context;
 
 my $input = CGI->new;
index 3abd3a8..5d13527 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use JSON qw( to_json );
 use CGI;
 use C4::Service;
-use C4::Auth qw /check_cookie_auth/;
-use C4::Output qw(:DEFAULT :ajax);
+use C4::Auth qw ( check_cookie_auth );
+use C4::Output qw( is_ajax output_with_http_headers );
 use Koha::Checkouts;
 
 =head1 NAME
index 743cf11..51e13dc 100755 (executable)
@@ -23,8 +23,8 @@ use JSON qw( encode_json );
 use CGI;
 use C4::Service;
 use C4::Context;
-use C4::Auth qw /check_cookie_auth/;
-use C4::Output qw(:DEFAULT :ajax);
+use C4::Auth qw( check_cookie_auth );
+use C4::Output qw( is_ajax output_with_http_headers );
 use C4::Patroncards::Batch;
 use C4::Labels::Batch;
 
index 9df283e..eafa206 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use JSON qw( to_json );
 use CGI;
 use C4::Service;
-use C4::Auth qw /check_cookie_auth/;
-use C4::Output qw(:DEFAULT :ajax);
+use C4::Auth qw( check_cookie_auth );
+use C4::Output qw( is_ajax output_with_http_headers );
 use Koha::ProblemReports;
 
 =head1 NAME
index a862983..462189e 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 use Test::More tests => 43;
 
-use C4::Acquisition;
+use C4::Acquisition qw( GetBasket GetBasketUsers CanUserManageBasket );
 
 # Avoid "redefined subroutine" warnings
 local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ };
index a02f45b..d5b2f1e 100755 (executable)
--- a/t/Auth.t
+++ b/t/Auth.t
@@ -19,7 +19,7 @@ use Modern::Perl;
 use Test::More tests => 12;
 use Test::Warn;
 
-use C4::Auth qw / in_iprange /;
+use C4::Auth qw( in_iprange );
 
 $ENV{REMOTE_ADDR} = '192.168.1.30';
 
index 17cbdc8..5ea1f0d 100755 (executable)
@@ -94,7 +94,7 @@ $database->mock( 'schema', \&mockedSchema );
 my $logger = t::lib::Mocks::Logger->new();
 
 # Can module load
-use C4::Auth_with_shibboleth;
+use C4::Auth_with_shibboleth qw( shib_ok login_shib_url get_login_shib checkpw_shib );
 require_ok('C4::Auth_with_shibboleth');
 
 # Subroutine tests
index fbf713a..5c5c837 100755 (executable)
@@ -10,7 +10,7 @@ use Test::More tests => 4;
 use MARC::Record;
 
 BEGIN {
-        use_ok('C4::AuthoritiesMarc::MARC21');
+        use_ok('C4::AuthoritiesMarc::MARC21', qw( default_auth_type_location fix_marc21_auth_type_location ));
 }
 
 my @result = C4::AuthoritiesMarc::MARC21::default_auth_type_location();
index 4d26f39..84febb8 100755 (executable)
@@ -9,7 +9,7 @@ use warnings;
 use Test::More tests => 2;
 
 BEGIN {
-        use_ok('C4::AuthoritiesMarc::UNIMARC');
+        use_ok('C4::AuthoritiesMarc::UNIMARC', qw( default_auth_type_location ));
 }
 
 my @test = C4::AuthoritiesMarc::UNIMARC::default_auth_type_location();
index f6259e9..91080bd 100755 (executable)
@@ -23,7 +23,8 @@ use Test::Warn;
 
 plan tests => 39;
 
-use_ok('C4::Biblio');
+
+use_ok('C4::Biblio', qw( AddBiblio ModBiblio BiblioAutoLink LinkBibHeadingsToAuthorities GetMarcPrice GetMarcQuantity GetMarcControlnumber GetMarcISBN GetMarcISSN GetMarcSubjects GetMarcAuthors GetMarcUrls GetMarcSeries TransformMarcToKoha ModBiblioMarc RemoveAllNsb GetMarcBiblio UpdateTotalIssues ));
 
 my $db = Test::MockModule->new('Koha::Database');
 $db->mock( _new_schema => sub { return Schema(); } );
index bbbadd2..90a7c07 100755 (executable)
@@ -22,7 +22,7 @@ use t::lib::Mocks;
 
 use XML::Simple;
 
-use C4::Biblio qw/TransformHtmlToXml/;
+use C4::Biblio qw( TransformHtmlToXml );
 
 
 sub run_tests {
index 3cb0cb0..858bac8 100755 (executable)
@@ -6,7 +6,7 @@ use Test::MockModule;
 
 use MARC::Record;
 
-use C4::Biblio;
+use C4::Biblio qw( GetMarcFromKohaField );
 
 subtest "_koha_marc_update_bib_ids basic Field", \&_koha_marc_update_bib_ids_simple;
 sub _koha_marc_update_bib_ids_simple {
index 91f4c77..b2c8454 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 use Test::More tests => 134;
 
-use C4::Budgets;
+use C4::Budgets qw( GetBudget GetBudgetUsers CanUserModifyBudget );
 use t::lib::Mocks;
 
 # Avoid "redefined subroutine" warnings
index 9be23a3..5c528b4 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 use Test::More tests => 70;
 
-use C4::Budgets;
+use C4::Budgets qw( GetBudget GetBudgetUsers CanUserUseBudget );
 use t::lib::Mocks;
 
 # Avoid "redefined subroutine" warnings
index a3da56f..3e92883 100755 (executable)
@@ -26,7 +26,7 @@ use utf8;
 use open ':std', ':encoding(utf8)';
 
 BEGIN {
-    use_ok('C4::Charset');
+    use_ok('C4::Charset', qw( NormalizeString SetUTF8Flag IsStringUTF8ish nsb_clean ));
 }
 
 my $string;
index a67f53d..a658d35 100755 (executable)
@@ -27,7 +27,7 @@ use Test::Warn;
 
 use t::lib::Mocks;
 
-use C4::Circulation;
+use C4::Circulation qw( GetAgeRestriction );
 
 t::lib::Mocks::mock_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' );
 
index dc6fe96..8a57dcd 100755 (executable)
@@ -22,7 +22,7 @@ use Test::More tests => 26;
 use C4::Context;
 use t::lib::Mocks;
 
-use_ok( 'C4::Circulation' );
+use_ok('C4::Circulation', qw( barcodedecode ));
 
 t::lib::Mocks::mock_userenv({ branchcode => 'IMS' });
 
index 404a967..f4dc8e7 100755 (executable)
@@ -9,7 +9,7 @@ use warnings;
 use Test::More tests => 10;
 
 BEGIN {
-        use_ok('C4::ClassSortRoutine::Dewey');
+        use_ok('C4::ClassSortRoutine::Dewey', qw( get_class_sort_key ));
 }
 
 my $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key(undef, undef );
index 128006b..09c3dd7 100755 (executable)
@@ -9,7 +9,7 @@ use warnings;
 use Test::More tests => 3;
 
 BEGIN {
-        use_ok('C4::ClassSortRoutine::Generic');
+        use_ok('C4::ClassSortRoutine::Generic', qw( get_class_sort_key ));
 }
 
 my $cn_class = "My class ";
index 9ec37cf..bfabee4 100755 (executable)
@@ -9,7 +9,7 @@ use warnings;
 use Test::More tests => 10;
 
 BEGIN {
-        use_ok('C4::ClassSortRoutine::LCC');
+        use_ok('C4::ClassSortRoutine::LCC', qw( get_class_sort_key ));
 }
 
 #Obvious cases
index 6e825d6..b1206af 100755 (executable)
@@ -18,7 +18,7 @@ use Test::More tests => 41;
 
 BEGIN {
         use_ok('C4::Creators');
-        use_ok('C4::Creators::PDF');
+        use_ok('C4::Creators::PDF', qw( Init Add Bookmark Compress Font FontSize Page StrWidth Text End ));
 }
 
 my $pdf_creator = C4::Creators::PDF->new(InitVars => 0);
index f6ceb2a..e480935 100755 (executable)
@@ -8,7 +8,7 @@ use Test::More tests => 9;
 use t::lib::Mocks;
 
 BEGIN {
-        use_ok('C4::External::BakerTaylor');
+        use_ok('C4::External::BakerTaylor', qw( link_url image_url content_cafe_url http_jacket_link availability ));
 }
 
 # test with mocked prefs
index 9db2c27..7274879 100755 (executable)
@@ -25,7 +25,7 @@ use Test::More tests => 3;
 use t::lib::Mocks;
 
 BEGIN {
-    use_ok('C4::ImportBatch');
+    use_ok('C4::ImportBatch', qw( RecordsFromISO2709File RecordsFromMARCXMLFile ));
 }
 
 t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
index 44c56f0..6c12ec8 100755 (executable)
--- a/t/Koha.t
+++ b/t/Koha.t
@@ -31,7 +31,7 @@ BEGIN {
     }
 }
 
-use_ok('C4::Koha');
+use_ok('C4::Koha', qw( xml_escape GetVariationsOfISBN GetVariationsOfISBNs GetVariationsOfISSN GetVariationsOfISSNs));
 
 use Test::DBIx::Class;
 
index aff28cb..f278386 100755 (executable)
@@ -18,6 +18,7 @@
 use Modern::Perl;
 
 use Test::More tests => 2;
+use MARC::Record;
 
 BEGIN { use_ok('Koha::Util::MARC'); }
 
index 009b403..072ec5b 100755 (executable)
@@ -3,8 +3,6 @@
 use Modern::Perl;
 
 use Koha::Script;
-use Fcntl qw(:flock);
-use Try::Tiny;
 
 # # Lock execution
 my $script = Koha::Script->new({ script => 'sleep.pl' });
index f909cb1..ebe873b 100755 (executable)
@@ -3,8 +3,6 @@
 use Modern::Perl;
 
 use Koha::Script;
-use Fcntl qw(:flock);
-use Try::Tiny;
 
 # # Lock execution
 my $script = Koha::Script->new({ script => 'sleep.pl' });
index 3e205c9..e338670 100755 (executable)
@@ -24,6 +24,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 4;
+use MARC::Record;
 
 BEGIN {
         use_ok('Koha::Util::MARC');
index bd0d9ec..6979361 100755 (executable)
 use strict;
 use warnings;
 
-use C4::ClassSplitRoutine::LCC;
+use C4::ClassSplitRoutine::LCC qw( split_callnumber );
 use Test::More tests => 11;
 
 BEGIN {
-    use_ok('C4::Labels::Label');
+    use_ok('C4::Labels::Label', qw( _get_text_fields _check_params _guide_box ));
 }
 
 my $format_string = "title, callnumber";
index e94eaec..b69e03b 100755 (executable)
@@ -18,7 +18,7 @@
 use Modern::Perl;
 
 use Test::More tests => 5;
-use C4::ClassSplitRoutine::RegEx;
+use C4::ClassSplitRoutine::RegEx qw( split_callnumber );
 
 my $callnumbers = {
     '830 Han'          => [qw{830 Han}],
index 33edba1..3044a37 100755 (executable)
@@ -42,7 +42,7 @@ BEGIN {
         $test_num += 4;
     }
     plan tests => $test_num;
-    use_ok('C4::ClassSplitRoutine::Dewey');
+    use_ok('C4::ClassSplitRoutine::Dewey', qw( split_callnumber ));
     use vars qw($ddcns);
 }
 
index f9462ba..76a6a41 100755 (executable)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use C4::ClassSplitRoutine::LCC;
+use C4::ClassSplitRoutine::LCC qw( split_callnumber );
 use Test::More;
 
 BEGIN {
index 6492ba4..14c5d28 100755 (executable)
@@ -24,7 +24,7 @@ use CGI qw ( -utf8 );
 use Koha::Cache::Memory::Lite;
 
 BEGIN {
-    use_ok('C4::Languages');
+    use_ok('C4::Languages', qw( getlanguage ));
 }
 
 my @languages = (); # stores the list of active languages
index 35a4b74..ceec8d7 100755 (executable)
@@ -44,7 +44,7 @@ fixtures_ok [
 my $db = Test::MockModule->new('Koha::Database');
 $db->mock( _new_schema => sub { return Schema(); } );
 
-use_ok('C4::Letters');
+use_ok('C4::Letters', qw( GetLetters ));
 
 t::lib::Mocks::mock_preference('dateformat', 'metric');
 
index 42dc809..3345e14 100755 (executable)
@@ -38,7 +38,7 @@ use Test::DBIx::Class;
 my $db = Test::MockModule->new('Koha::Database');
 $db->mock( _new_schema => sub { return Schema(); } );
 
-use_ok('C4::Matcher');
+use_ok('C4::Matcher', qw( GetMatcherList GetMatcherId ));
 
 fixtures_ok [
     MarcMatcher => [
index 7f4e2b0..7fddc7e 100755 (executable)
@@ -7,7 +7,7 @@ use Test::MockModule;
 
 use t::lib::Mocks;
 
-use_ok('C4::Members');
+use_ok('C4::Members', qw( get_cardnumber_length checkcardnumber ));
 
 BEGIN {
     if ( check_install( module => 'Test::DBIx::Class' ) ) {
index 31ca103..02218de 100755 (executable)
@@ -24,7 +24,7 @@ use CGI qw ( -utf8 );
 use t::lib::Mocks;
 
 BEGIN {
-    use_ok('C4::Output');
+    use_ok('C4::Output', qw( output_html_with_http_headers parametrized_url  ));
 }
 
 my $query = CGI->new();
index 5c2c861..b0832c5 100755 (executable)
@@ -14,7 +14,7 @@ BEGIN {
     }
 }
 
-use_ok('C4::Acquisition');
+use_ok('C4::Acquisition', qw( populate_order_with_prices ));
 use_ok('C4::Context');
 use_ok('Koha::Number::Price');
 
index e7e0670..1dc7ed1 100755 (executable)
@@ -21,7 +21,7 @@ use Test::More tests => 9;
 use Test::Warn;
 
 BEGIN {
-        use_ok('C4::SIP::Sip');
+        use_ok('C4::SIP::Sip', qw( timestamp ));
 }
 
 my $date_time = C4::SIP::Sip::timestamp();
diff --git a/t/SMS.t b/t/SMS.t
index 21dc75b..bf8de65 100755 (executable)
--- a/t/SMS.t
+++ b/t/SMS.t
@@ -22,7 +22,7 @@ use t::lib::Mocks;
 use Test::More tests => 7;
 
 BEGIN {
-    use_ok('C4::SMS');
+    use_ok('C4::SMS', qw( driver send_sms ));
 }
 
 
index f0f02e1..520b6b3 100755 (executable)
@@ -9,7 +9,7 @@ use warnings;
 use Test::More tests => 6;
 
 BEGIN {
-        use_ok('C4::Scheduler');
+        use_ok('C4::Scheduler', qw( get_jobs get_at_jobs get_at_job add_at_job remove_at_job ));
 }
 
 ok(C4::Scheduler::get_jobs(), "testing get_jobs with no arguments");
index 9bcd003..1b4a9e1 100755 (executable)
@@ -8,9 +8,9 @@ use Test::More tests => 29;
 use Test::Warn;
 
 BEGIN {
-       use FindBin;
-       use lib $FindBin::Bin;
-       use_ok('C4::Scrubber');
+    use FindBin;
+    use lib $FindBin::Bin;
+    use_ok('C4::Scrubber');
 }
 
 sub pretty_line {
index 030bca2..0b3715c 100755 (executable)
@@ -7,7 +7,7 @@ use URI::Escape;
 use JSON qw( decode_json );
 
 use_ok('Koha::DateUtils');
-use_ok('C4::Search::History');
+use_ok('C4::Search::History', qw( get get_from_session set_to_session delete ));
 use_ok('C4::Auth', qw/get_session/ );
 
 # Test session
index 910bf4f..cab9d5a 100755 (executable)
@@ -33,7 +33,7 @@ BEGIN {
 # Mock the DB connection and C4::Context
 use Test::DBIx::Class;
 
-use_ok('C4::Search');
+use_ok('C4::Search', qw( buildQuery ));
 can_ok('C4::Search',
     qw/buildQuery/);
 use_ok("Net::Z3950::ZOOM");
index 8fc201a..c1cf423 100755 (executable)
@@ -2,7 +2,7 @@
 
 use Modern::Perl;
 use Test::More tests => 43;
-use C4::Serials;
+use C4::Serials qw( GetNextSeq );
 
 # TEST CASE 1 - 1 variable, from 1 to 4
 my $subscription = {
index afd7eff..480b84f 100755 (executable)
@@ -24,7 +24,7 @@ use Data::Dumper qw/Dumper/;
 
 use Test::More tests => 8;
 
-use C4::Serials qw//;
+use C4::Serials;
 
 # Testing C4::Serials::_handle_seqno
 my $list = '2017 (No. 8); 2017 (No. 9); 2017 (No. 10)';
index 6455820..91b7743 100755 (executable)
@@ -4,7 +4,7 @@ use Test::More tests => 11;
 
 use_ok("MARC::Field");
 use_ok("MARC::Record");
-use_ok("Koha::SimpleMARC");
+use_ok("Koha::SimpleMARC", qw( field_exists read_field update_field copy_field copy_and_replace_field move_field delete_field field_equals ));
 
 sub new_record {
     my $record = MARC::Record->new;
index df14a50..97d6575 100755 (executable)
@@ -31,7 +31,7 @@ BEGIN {
 }
 
 BEGIN {
-    use_ok('C4::SocialData');
+    use_ok('C4::SocialData', qw( get_data get_report ));
 }
 
 use Test::DBIx::Class;
index 579ee9d..a52f3c5 100755 (executable)
@@ -5,7 +5,6 @@
 
 use strict;
 use warnings;
-use C4::TmplTokenType;
 use Test::More tests => 19;
 
 BEGIN {
index caa9268..3bcd14b 100755 (executable)
@@ -37,7 +37,7 @@ use Koha::DateUtils qw( dt_from_string );
 use C4::Circulation qw( MarkIssueReturned );
 
 BEGIN {
-    use_ok('C4::Accounts');
+    use_ok('C4::Accounts', qw( chargelostitem purge_zero_balance_fees ));
     use_ok('Koha::Object');
     use_ok('Koha::Patron');
     use_ok('Data::Dumper');
index 6fe9ede..57ef90d 100755 (executable)
@@ -28,9 +28,9 @@ use Koha::Acquisition::Basket;
 use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'MARC21' );
 
 BEGIN {
-    use_ok('C4::Acquisition');
-    use_ok('C4::Biblio');
-    use_ok('C4::Budgets');
+    use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder SearchOrders GetOrder GetHistory ModOrder get_rounding_sql get_rounded_price ReopenBasket ModBasket ModBasketHeader ModBasketUsers ));
+    use_ok('C4::Biblio', qw( AddBiblio GetMarcSubfieldStructure ));
+    use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget GetBudget GetBudgetByOrderNumber GetBudgetsReport GetBudgets GetBudgetReport ));
     use_ok('Koha::Acquisition::Orders');
     use_ok('Koha::Acquisition::Booksellers');
     use_ok('t::lib::TestBuilder');
index d3317bc..5b5b9c0 100755 (executable)
@@ -21,10 +21,10 @@ use Test::More tests => 12;
 use t::lib::TestBuilder;
 
 use C4::Context;
-use C4::Acquisition;
-use C4::Biblio;
+use C4::Acquisition qw( NewBasket ModReceiveOrder CancelReceipt );
+use C4::Biblio qw( AddBiblio );
 use C4::Items;
-use C4::Budgets;
+use C4::Budgets qw( AddBudget GetBudget );
 use t::lib::Mocks;
 
 use Koha::Database;
index 5b9b648..ae79a8d 100755 (executable)
@@ -6,8 +6,8 @@ use CGI;
 
 use Test::More tests => 4;
 
-use C4::Acquisition;
-use C4::Biblio;
+use C4::Acquisition qw( NewBasket GetBasket GetBasketAsCSV );
+use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 use Koha::CsvProfiles;
 use Koha::Acquisition::Orders;
index fce3cf6..458a2c7 100755 (executable)
@@ -4,9 +4,9 @@ use Modern::Perl;
 use Test::More tests => 43;
 use Data::Dumper;
 
-use C4::Acquisition qw( NewBasket GetBasketsInfosByBookseller );
+use C4::Acquisition qw( NewBasket GetBasket GetBasketsInfosByBookseller ReopenBasket AddInvoice GetInvoice ModReceiveOrder );
 use C4::Biblio qw( AddBiblio );
-use C4::Budgets qw( AddBudget );
+use C4::Budgets qw( AddBudget GetBudget );
 use C4::Context;
 use Koha::Database;
 use Koha::Acquisition::Orders;
index 9135734..9b52802 100755 (executable)
@@ -3,9 +3,9 @@
 use Modern::Perl;
 
 use Test::More;
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Budgets;
+use C4::Acquisition qw( NewBasket GetOrders GetOrdersByBiblionumber GetOrder );
+use C4::Biblio qw( AddBiblio );
+use C4::Budgets qw( AddBudget GetBudget );
 use Koha::Database;
 use Koha::Acquisition::Orders;
 
index 399e9b7..0327a84 100755 (executable)
@@ -11,7 +11,7 @@ use Koha::Database;
 use Test::More tests => 24;
 
 BEGIN {
-    use_ok('C4::Acquisition');
+    use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder GetInvoiceDetails GetInvoices ModInvoice CloseInvoice ReopenInvoice MergeInvoices DelInvoice ));
 }
 
 my $schema = Koha::Database->new()->schema();
index df455c2..6c7e682 100755 (executable)
@@ -3,9 +3,9 @@
 use Modern::Perl;
 
 use Test::More tests => 8;
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Budgets;
+use C4::Acquisition qw( NewBasket );
+use C4::Biblio qw( AddBiblio );
+use C4::Budgets qw( AddBudget GetBudget );
 use MARC::Record;
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string output_pref );
index fb85b52..d9db71c 100755 (executable)
@@ -4,10 +4,10 @@ use Test::More tests => 12;
 
 use t::lib::TestBuilder;
 
-use_ok('C4::Acquisition');
-use_ok('C4::Biblio');
-use_ok('C4::Budgets');
-use_ok('C4::Serials');
+use_ok('C4::Acquisition', qw( NewBasket AddInvoice GetInvoice ModReceiveOrder GetInvoices ));
+use_ok('C4::Biblio', qw( AddBiblio ));
+use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget ));
+use_ok('C4::Serials', qw( NewSubscription GetSubscription subscriptionCurrentlyOnOrder ));
 
 use Koha::Acquisition::Orders;
 use Koha::Database;
index f4ffcb2..3ad3bcd 100755 (executable)
@@ -1,9 +1,9 @@
 use Modern::Perl;
 use Test::More tests => 3;
 
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Letters;
+use C4::Acquisition qw( NewBasket AddInvoice ModOrder ModOrderUsers GetOrder GetOrderUsers ModReceiveOrder );
+use C4::Biblio qw( AddBiblio );
+use C4::Letters qw( GetQueuedMessages );
 use Koha::Database;
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Orders;
index d53d13d..ecf7cd1 100755 (executable)
@@ -4,8 +4,8 @@ use Modern::Perl;
 
 use Test::More tests => 14;
 use C4::Context;
-use C4::Acquisition;
-use C4::Biblio;
+use C4::Acquisition qw( NewBasket GetBasket SearchOrders AddInvoice ModReceiveOrder CancelReceipt );
+use C4::Biblio qw( AddBiblio );
 use C4::Items;
 use C4::Budgets;
 use Koha::Acquisition::Orders;
index 8fa55d2..a9e59a5 100755 (executable)
@@ -4,10 +4,10 @@ use Modern::Perl;
 
 use Test::More tests => 13;
 use C4::Context;
-use C4::Acquisition;
+use C4::Acquisition qw( NewBasket GetOrders GetOrder TransferOrder SearchOrders ModReceiveOrder CancelReceipt );
 use C4::Biblio;
 use C4::Items;
-use C4::Budgets;
+use C4::Budgets qw( AddBudget GetBudget );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Acquisition::Booksellers;
index 7faaac1..16ca597 100755 (executable)
@@ -3,9 +3,9 @@
 use Modern::Perl;
 
 use Test::More tests => 14;
-use C4::Acquisition;
-use C4::Biblio qw( AddBiblio DelBiblio );
-use C4::Budgets;
+use C4::Acquisition qw( NewBasket GetBiblioCountByBasketno GetOrders GetOrder ReopenBasket );
+use C4::Biblio qw( AddBiblio );
+use C4::Budgets qw( AddBudget GetBudget );
 use C4::Context;
 use Koha::Database;
 use Koha::Acquisition::Booksellers;
index 50af03b..0aa3a1a 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 
 use Test::More tests => 44;
-use C4::Acquisition;
+use C4::Acquisition qw( populate_order_with_prices );
 use C4::Context;
 use Koha::Database;
 use t::lib::TestBuilder;
index 2304073..8718084 100755 (executable)
@@ -11,7 +11,7 @@ use t::lib::Mocks;
 use C4::Context;
 
 BEGIN {
-    use_ok('C4::External::Amazon');
+    use_ok('C4::External::Amazon', qw( get_amazon_tld ));
 }
 
 my $context = C4::Context->new();
index a612b1a..5fdf29a 100755 (executable)
@@ -15,14 +15,13 @@ use Test::Warn;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Auth qw(checkpw);
 use C4::Members;
 use Koha::AuthUtils qw/hash_password/;
 use Koha::Database;
 use Koha::Patrons;
 
 BEGIN {
-    use_ok('C4::Auth');
+    use_ok('C4::Auth', qw( checkauth haspermission track_login_daily checkpw get_template_and_user checkpw_hash ));
 }
 
 my $schema  = Koha::Database->schema;
index 064422b..c332faf 100755 (executable)
@@ -25,7 +25,7 @@ use Test::Exception;
 
 use Koha::Database;
 use t::lib::TestBuilder;
-use C4::Auth qw(haspermission);
+use C4::Auth qw( haspermission );
 
 my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index 3038228..be33224 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Context;
 use Koha::Database;
 
 BEGIN {
-    use_ok('C4::Auth_with_cas');
+    use_ok('C4::Auth_with_cas', qw( check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url ));
     can_ok('C4::Auth_with_cas', qw/
             check_api_auth_cas
             checkpw_cas
index 565ddbd..39f6e8e 100755 (executable)
@@ -120,7 +120,7 @@ $builder->build(
 my $patron = Koha::Patrons->find($borrower->{borrowernumber});
 
 # C4::Auth_with_ldap needs several stuff set first ^^^
-use_ok('C4::Auth_with_ldap');
+use_ok('C4::Auth_with_ldap', qw( checkpw_ldap ));
 can_ok(
     'C4::Auth_with_ldap', qw/
       checkpw_ldap
index 8e626f3..f72b0c3 100755 (executable)
@@ -17,7 +17,7 @@ use Koha::Database;
 use Koha::Authority::Types;
 
 BEGIN {
-        use_ok('C4::AuthoritiesMarc');
+        use_ok('C4::AuthoritiesMarc', qw( GetHeaderAuthority AddAuthority AddAuthorityTrees GetAuthority BuildAuthHierarchies GenerateHierarchy BuildSummary DelAuthority CompareFieldWithAuthority ModAuthority merge ));
 }
 
 # We are now going to be testing the authorities hierarchy code, and
index bf25a91..efa9a30 100755 (executable)
@@ -13,14 +13,14 @@ use Test::MockModule;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio GetMarcBiblio ModBiblio );
 use Koha::Authorities;
 use Koha::Authority::ControlledIndicators;
 use Koha::Authority::MergeRequests;
 use Koha::Database;
 
 BEGIN {
-        use_ok('C4::AuthoritiesMarc');
+        use_ok('C4::AuthoritiesMarc', qw( merge AddAuthority compare_fields DelAuthority ));
 }
 
 # Optionally change marc flavour
index 011c775..459f3b2 100755 (executable)
@@ -1,14 +1,14 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use C4::Auth;
+use C4::Auth qw( get_session );
 use CGI qw ( -utf8 );
 use Test::More tests => 18;
 
 use Koha::Database;
 
 BEGIN {
-    use_ok('C4::BackgroundJob');
+    use_ok('C4::BackgroundJob', qw( get id fetch name invoker progress status size set finish results clear ));
 }
 my $query = CGI->new;
 
index 4253a61..2846f4f 100755 (executable)
@@ -29,7 +29,7 @@ $| = 1;
 BEGIN {
     use FindBin;
     use lib $FindBin::Bin;
-    use_ok('C4::Barcodes');
+    use_ok('C4::Barcodes', qw( value initial max db_max next_value next previous serial autoBarcode is_max ));
 }
 
 my $builder = t::lib::TestBuilder->new;
index ef0fa3a..f21f140 100755 (executable)
@@ -23,7 +23,7 @@ use t::lib::TestBuilder;
 use Koha::Database;
 
 BEGIN {
-    use_ok('C4::Barcodes::ValueBuilder');
+    use_ok('C4::Barcodes::ValueBuilder', qw( get_barcode ));
 };
 
 my $schema  = Koha::Database->new->schema;
index feac71d..4515303 100755 (executable)
@@ -30,10 +30,10 @@ use Koha::Database;
 use Koha::Caches;
 use Koha::MarcSubfieldStructures;
 
-use C4::Linker::Default;
+use C4::Linker::Default qw( get_link );
 
 BEGIN {
-    use_ok('C4::Biblio');
+    use_ok('C4::Biblio', qw( AddBiblio GetMarcFromKohaField BiblioAutoLink GetMarcSubfieldStructure GetMarcSubfieldStructureFromKohaField LinkBibHeadingsToAuthorities GetBiblioData GetMarcBiblio ModBiblio GetMarcISSN GetMarcControlnumber GetMarcISBN GetMarcPrice GetFrameworkCode GetMarcUrls IsMarcStructureInternal GetMarcStructure GetXmlBiblio DelBiblio ));
 }
 
 my $schema = Koha::Database->new->schema;
@@ -472,7 +472,7 @@ sub run_tests {
     my $authid = $field->subfield('9');
     ok($authid, 'ModBiblio adds authority id');
 
-    use_ok('C4::AuthoritiesMarc');
+    use_ok('C4::AuthoritiesMarc', qw( GetAuthority ));
     my $auth_record = C4::AuthoritiesMarc::GetAuthority($authid);
     ok($auth_record, 'Authority record successfully retrieved');
 
index 4943afe..dc992b2 100755 (executable)
@@ -25,7 +25,7 @@ use t::lib::Mocks qw( mock_preference );
 use Koha::Database;
 
 BEGIN {
-        use_ok('C4::Biblio');
+        use_ok('C4::Biblio', qw( GetISBDView ));
 }
 
 my $schema  = Koha::Database->new->schema;
index e710ffe..8f7e28b 100755 (executable)
@@ -22,7 +22,7 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 use MARC::Record;
 
-use C4::Biblio;
+use C4::Biblio qw( ModBiblio ModBiblioMarc GetMarcBiblio );
 use Koha::Database;
 
 my $schema  = Koha::Database->new->schema;
index f4ac6a8..708a764 100755 (executable)
@@ -8,7 +8,7 @@ use Test::More tests => 2;
 use Koha::Caches;
 use Koha::Database;
 use Koha::MarcSubfieldStructures;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToMarc );
 
 our ( $biblionumbertagfield, $biblionumbertagsubfield );
 my $schema  = Koha::Database->new->schema;
index 377dbab..d2efaa6 100755 (executable)
@@ -8,7 +8,7 @@ use t::lib::TestBuilder;
 use Koha::Database;
 use Koha::Caches;
 use Koha::MarcSubfieldStructures;
-use C4::Biblio;
+use C4::Biblio qw( TransformKohaToMarc );
 
 my $schema  = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index 1a08ded..5062ed7 100755 (executable)
@@ -28,7 +28,7 @@ use t::lib::TestBuilder;
 use Koha::Database;
 use Koha::Caches;
 use Koha::MarcSubfieldStructures;
-use C4::Biblio;
+use C4::Biblio qw( TransformMarcToKoha TransformMarcToKohaOneField );
 
 my $schema  = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index c7eec72..617673d 100755 (executable)
@@ -3,11 +3,11 @@ use Modern::Perl;
 use Test::More tests => 144;
 
 BEGIN {
-    use_ok('C4::Budgets')
+    use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget GetBudgetPeriods GetBudgetPeriod GetBudget ModBudgetPeriod ModBudget DelBudgetPeriod DelBudget GetBudgets GetBudgetName GetBudgetByCode GetBudgetHierarchy GetBudgetHierarchySpent GetBudgetSpent GetBudgetOrdered CloneBudgetPeriod GetBudgetsByActivity MoveOrders GetBudgetByOrderNumber SetOwnerToFundHierarchy GetBudgetAuthCats GetBudgetsPlanCell ));
 }
 use C4::Context;
-use C4::Biblio;
-use C4::Acquisition;
+use C4::Biblio qw( AddBiblio );
+use C4::Acquisition qw( NewBasket AddInvoice GetInvoice ModReceiveOrder populate_order_with_prices );
 
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Orders;
index b1542a3..420b386 100755 (executable)
@@ -2,7 +2,7 @@ use Modern::Perl;
 use Test::More tests => 4;
 use MARC::Record;
 
-use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
+use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
 use C4::Context;
 use C4::Charset qw( SanitizeRecord );
 
index 4ab64dd..8aa5d4c 100755 (executable)
@@ -32,13 +32,13 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 use C4::Accounts;
-use C4::Calendar;
-use C4::Circulation;
+use C4::Calendar qw( new insert_single_holiday insert_week_day_holiday delete_holiday );
+use C4::Circulation qw( AddIssue AddReturn CanBookBeRenewed GetIssuingCharges AddRenewal GetSoonestRenewDate GetLatestAutoRenewDate LostItem GetUpcomingDueIssues CanBookBeIssued AddIssuingCharge ProcessOfflinePayment transferbook updateWrongTransfer );
 use C4::Biblio;
-use C4::Items;
+use C4::Items qw( ModItemTransfer );
 use C4::Log;
-use C4::Reserves;
-use C4::Overdues qw(UpdateFine CalcFine);
+use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll ModReserveAffect CheckReserves GetOtherReserves );
+use C4::Overdues qw( CalcFine UpdateFine get_chargeable_units );
 use Koha::DateUtils;
 use Koha::Database;
 use Koha::Items;
index 041c000..00352ac 100755 (executable)
@@ -17,9 +17,9 @@
 
 use Modern::Perl;
 
-use C4::Circulation;
-use C4::Items;
-use C4::Biblio;
+use C4::Circulation qw( AddIssue AddReturn GetBranchBorrowerCircRule GetBranchItemRule );
+use C4::Items qw( ModItemTransfer );
+use C4::Biblio qw( AddBiblio );
 use C4::Context;
 use Koha::CirculationRules;
 
@@ -30,7 +30,7 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 BEGIN {
-    use_ok('C4::Circulation');
+    use_ok('C4::Circulation', qw( AddIssue AddReturn GetBranchBorrowerCircRule GetBranchItemRule ));
 }
 
 can_ok( 'C4::Circulation', qw(
index 8085dbd..af23654 100755 (executable)
@@ -8,11 +8,11 @@ use DBI;
 use DateTime;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
-use C4::Calendar;
+use C4::Calendar qw( new insert_single_holiday delete_holiday insert_week_day_holiday );
 
 use Koha::CirculationRules;
 
-use_ok('C4::Circulation');
+use_ok('C4::Circulation', qw( CalcDateDue ));
 
 my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index 85f38ea..840679f 100755 (executable)
@@ -5,7 +5,7 @@ use Modern::Perl;
 use Test::More tests => 3;
 
 use C4::Context;
-use C4::Overdues;
+use C4::Overdues qw( CalcFine );
 
 use Koha::DateUtils qw( dt_from_string );
 
index 2d67ffc..447d954 100755 (executable)
@@ -21,9 +21,9 @@ use Test::More tests => 21;
 use Test::MockModule;
 use t::lib::TestBuilder;
 
-use C4::Circulation;
+use C4::Circulation qw( CheckIfIssuedToPatron AddIssue );
 use C4::Items;
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use Koha::Library;
 use Koha::Patrons;
 use MARC::Record;
index 41305a8..0e159b6 100755 (executable)
@@ -19,15 +19,15 @@ use Modern::Perl;
 
 use Test::More tests => 10;
 
-use C4::Circulation;
-use C4::Biblio;
+use C4::Circulation qw( CheckValidBarcode );
+use C4::Biblio qw( AddBiblio );
 use C4::Items;
 use Koha::Database;
 use Koha::Library;
 
 
 BEGIN {
-    use_ok('C4::Circulation');
+    use_ok('C4::Circulation', qw( CheckValidBarcode ));
 }
 
 my $schema = Koha::Database->new->schema;
index 275ecc4..f68b98c 100755 (executable)
@@ -13,7 +13,7 @@ use t::lib::TestBuilder;
 use Test::More tests => 9;
 
 BEGIN {
-    use_ok('C4::Circulation');
+    use_ok('C4::Circulation', qw( GetHardDueDate GetLoanLength ));
 }
 can_ok(
     'C4::Circulation',
index 2698578..15d5952 100755 (executable)
@@ -21,8 +21,8 @@ use Test::More tests => 2;
 use Test::MockModule;
 use t::lib::TestBuilder;
 
-use C4::Circulation;
-use C4::Biblio;
+use C4::Circulation qw( AddIssue GetPendingOnSiteCheckouts );
+use C4::Biblio qw( AddBiblio );
 use C4::Items;
 use C4::Members;
 
index 80e0443..a5dc375 100755 (executable)
@@ -23,8 +23,8 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 use C4::Context;
-use C4::Circulation;
-use C4::Biblio;
+use C4::Circulation qw( AddIssue GetTopIssues );
+use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
 use C4::Items;
 
 use Koha::Database;
index 5b51eb9..e214882 100755 (executable)
@@ -20,9 +20,9 @@ use Modern::Perl;
 use Test::More tests => 5;
 use Test::MockModule;
 
-use C4::Circulation;
+use C4::Circulation qw( IsItemIssued AddIssue AddReturn );
 use C4::Items;
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Items;
index e9152d3..e7b1d44 100755 (executable)
@@ -23,7 +23,7 @@ use Test::Exception;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Circulation;
+use C4::Circulation qw( MarkIssueReturned AddIssue );
 use C4::Context;
 use Koha::Checkouts;
 use Koha::Database;
index 6a92da4..98cc530 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use C4::Circulation;
+use C4::Circulation qw( AddOfflineOperation GetOfflineOperation GetOfflineOperations DeleteOfflineOperation );
 
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string output_pref );
@@ -10,7 +10,7 @@ use Koha::Library;
 use Test::More tests => 7;
 
 BEGIN {
-    use_ok('C4::Circulation');
+    use_ok('C4::Circulation', qw( AddOfflineOperation GetOfflineOperation GetOfflineOperations DeleteOfflineOperation ));
 }
 can_ok(
     'C4::Circulation',
index 87206ae..ee7b8c5 100755 (executable)
@@ -24,7 +24,7 @@ use Test::Warn;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Circulation;
+use C4::Circulation qw( LostItem AddIssue );
 
 # Mock userenv, used by AddIssue
 my $branch;
index 79ae855..c361d3c 100755 (executable)
@@ -25,9 +25,9 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 use C4::Members;
-use C4::Circulation;
+use C4::Circulation qw( AddReturn AddIssue LostItem );
 use C4::Items;
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 use Koha::Account::Lines;
 use Koha::DateUtils;
index 7d9440d..b6770d8 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use Test::More tests => 1;
 
-use C4::Circulation;
+use C4::Circulation qw( AddReturn );
 use C4::Context;
 use Koha::Database;
 use Koha::DateUtils;
index 9abe3bd..1c8ea0f 100755 (executable)
@@ -18,7 +18,7 @@ use Modern::Perl;
 use Test::More tests => 10;
 use C4::Context;
 
-use C4::Circulation;
+use C4::Circulation qw( TooMany AddIssue CanBookBeIssued );
 use C4::Biblio;
 use C4::Items;
 use C4::Members;
index d1663d9..c8dbd09 100755 (executable)
@@ -21,7 +21,7 @@ use C4::Context;
 use C4::Members;
 use C4::Items;
 use C4::Biblio;
-use C4::Circulation;
+use C4::Circulation qw( TooMany AddIssue );
 use C4::Context;
 
 use Koha::DateUtils qw( dt_from_string );
index 0ded414..d4fb82b 100755 (executable)
@@ -23,11 +23,11 @@ use DateTime::Duration;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Biblio;
-use C4::Circulation;
+use C4::Biblio qw( AddBiblio );
+use C4::Circulation qw( AddIssue AddIssuingCharge AddRenewal AddReturn GetIssuingCharges GetOpenIssue GetRenewCount GetUpcomingDueIssues );
 use C4::Context;
 use C4::Items;
-use C4::Reserves;
+use C4::Reserves qw( AddReserve );
 use Koha::Checkouts;
 use Koha::Database;
 use Koha::DateUtils;
index 2e2ac0f..84756a8 100755 (executable)
@@ -21,8 +21,8 @@ use Test::More tests => 6;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Circulation;
-use C4::Reserves;
+use C4::Circulation qw( transferbook AddIssue GetTransfers );
+use C4::Reserves qw( AddReserve );
 use Koha::DateUtils qw( dt_from_string );
 use Koha::Item::Transfers;
 
index 5e639ae..99767c8 100755 (executable)
@@ -17,9 +17,9 @@
 
 use Modern::Perl;
 use C4::Context;
-use C4::Circulation;
-use C4::Biblio;
-use C4::Items;
+use C4::Circulation qw( CreateBranchTransferLimit DeleteBranchTransferLimits GetTransfers GetTransfersFromTo TransferSlip );
+use C4::Biblio qw( AddBiblio );
+use C4::Items qw( ModItemTransfer );
 use Koha::Database;
 use Koha::DateUtils;
 use DateTime::Duration;
@@ -31,7 +31,7 @@ use Test::More tests => 22;
 use Test::Deep;
 
 BEGIN {
-    use_ok('C4::Circulation');
+    use_ok('C4::Circulation', qw( CreateBranchTransferLimit DeleteBranchTransferLimits GetTransfers GetTransfersFromTo TransferSlip ));
 }
 can_ok(
     'C4::Circulation',
index 1a6bafd..7ce9d34 100755 (executable)
@@ -29,7 +29,7 @@ use DateTime::Duration;
 use Test::More tests => 43;
 
 BEGIN {
-    use_ok('C4::Contract');
+    use_ok('C4::Contract', qw( GetContracts GetContract AddContract ModContract DelContract ));
 }
 
 my $schema = Koha::Database->new->schema;
index c4a888a..f8715c2 100755 (executable)
@@ -23,8 +23,8 @@ use Koha::Database;
 use t::lib::TestBuilder;
 
 BEGIN {
-    use_ok('C4::Biblio');
-    use_ok('C4::CourseReserves', qw/:all/);
+    use_ok('C4::Biblio', qw( AddBiblio ));
+    use_ok('C4::CourseReserves', qw( GetCourse ModCourse GetCourses DelCourse GetCourseInstructors ModCourseInstructors GetCourseItem ModCourseItem GetCourseReserve ModCourseReserve GetCourseReserves DelCourseReserve SearchCourses GetItemCourseReservesInfo ));
     use_ok('C4::Context');
     use_ok('MARC::Field');
     use_ok('MARC::Record');
index 2e6f9ee..9cb287c 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use t::lib::Mocks;
 use t::lib::TestBuilder;
-use C4::CourseReserves qw/ModCourseItem ModCourseReserve DelCourseReserve GetCourseItem/;
+use C4::CourseReserves qw( ModCourse ModCourseItem ModCourseReserve GetCourse GetCourseItem DelCourse DelCourseReserve );
 use C4::Context;
 use Koha::Items;
 
index 7d10b35..c18a659 100755 (executable)
@@ -26,7 +26,7 @@ use Koha::Database;
 use Test::Warn;
 
 BEGIN {
-    use_ok('C4::Creators::Lib');
+    use_ok('C4::Creators::Lib', qw( get_all_templates get_all_layouts get_all_profiles get_all_image_names get_batch_summary get_label_summary get_card_summary get_barcode_types get_label_types get_font_types get_text_justification_types get_output_formats get_table_names get_unit_values html_table ));
     use_ok('C4::Biblio');
     use_ok('C4::Context');
     use_ok('Koha::Patron');
index 9e25faf..8bb0fdc 100755 (executable)
@@ -18,7 +18,7 @@
 use Modern::Perl;
 use DateTime;
 
-use C4::Circulation;
+use C4::Circulation qw( CalcDateDue checkHighHolds CanBookBeIssued );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Patrons;
index 9993d78..5f843d0 100755 (executable)
@@ -28,7 +28,7 @@ use MARC::Batch;
 use File::Slurp;
 use Encode;
 
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use C4::Context;
 use Koha::Database;
 use Koha::Biblio;
index 552245a..8f3c744 100755 (executable)
@@ -29,7 +29,7 @@ use List::MoreUtils qw/any/;
 use MARC::Record;
 use MARC::Field;
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcFromKohaField );
 use Koha::Caches;
 use Koha::Database;
 
index 76cc063..fef8a93 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 
 use C4::Context;
-use C4::Overdues;
+use C4::Overdues qw( CalcFine );
 use Koha::Database;
 use Koha::DateUtils;
 
index 3a28df4..f05c810 100755 (executable)
@@ -8,8 +8,8 @@ use Test::More tests => 5;
 
 use t::lib::TestBuilder;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( checkauth );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Database;
 use Koha::FrameworkPlugin;
 
index 1615ea0..30a9e0a 100755 (executable)
@@ -23,7 +23,7 @@ use Test::More tests => 3;
 use t::lib::Mocks;
 
 BEGIN {
-    use_ok('C4::Heading');
+    use_ok('C4::Heading', qw( field valid_heading_subfield ));
 }
 
 subtest "MARC21 tests" => sub {
index a2ea2df..357d312 100755 (executable)
@@ -10,7 +10,7 @@ use Test::More tests => 5;
 use C4::Context;
 
 BEGIN {
-        use_ok('C4::Heading');
+        use_ok('C4::Heading', qw( field new_from_field display_form search_form ));
 }
 
 SKIP: {
index 365557e..fb983ca 100755 (executable)
@@ -22,7 +22,7 @@ use C4::Context;
 use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 use Koha::Libraries;
-use C4::Calendar;
+use C4::Calendar qw( new insert_single_holiday );
 use Koha::Patrons;
 use Koha::Holds;
 use Koha::Item;
index 64419b5..0710eda 100755 (executable)
@@ -13,8 +13,8 @@ use MARC::Record;
 use C4::Biblio;
 use C4::Calendar;
 use C4::Items;
-use C4::Reserves;
-use C4::Circulation;
+use C4::Reserves qw( AddReserve CalculatePriority ModReserve ToggleSuspend AutoUnsuspendReserves SuspendAll ModReserveMinusPriority AlterPriority CanItemBeReserved CheckReserves );
+use C4::Circulation qw( CanBookBeRenewed );
 
 use Koha::Biblios;
 use Koha::CirculationRules;
index bc2633a..18031c1 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 
 use C4::Context;
-use C4::Circulation;
+use C4::Circulation qw( AddIssue AddReturn );
 use C4::Items;
 use Koha::Items;
 use Koha::CirculationRules;
@@ -14,7 +14,7 @@ use t::lib::TestBuilder;
 use t::lib::Mocks;
 
 BEGIN {
-    use_ok('C4::Reserves');
+    use_ok('C4::Reserves', qw( ItemsAnyAvailableAndNotRestricted IsAvailableForItemLevelRequest ));
 }
 
 my $schema = Koha::Database->schema;
index daf527d..7e21336 100755 (executable)
@@ -12,7 +12,7 @@ use t::lib::Mocks;
 use Koha::Holds;
 
 BEGIN {
-    use_ok('C4::Reserves');
+    use_ok('C4::Reserves', qw( AddReserve CheckReserves ));
 }
 
 my $schema = Koha::Database->schema;
index 13958e6..9157320 100755 (executable)
@@ -14,7 +14,7 @@ use Koha::Holds;
 BEGIN {
     use FindBin;
     use lib $FindBin::Bin;
-    use_ok('C4::Reserves');
+    use_ok('C4::Reserves', qw( AddReserve CheckReserves ));
 }
 
 my $schema = Koha::Database->schema;
index 26c052b..a125d3e 100755 (executable)
@@ -19,7 +19,7 @@ use t::lib::TestBuilder;
 BEGIN {
     use FindBin;
     use lib $FindBin::Bin;
-    use_ok('C4::Reserves');
+    use_ok('C4::Reserves', qw( AddReserve CheckReserves ));
 }
 
 my $schema = Koha::Database->schema;
@@ -208,4 +208,4 @@ subtest "exclude from local holds" => sub {
     is($reserve->{borrowernumber}, $patron_nex_l2->borrowernumber, "Patron from other library is next checkout because item is excluded");
 
     $schema->storage->txn_rollback;
-};
\ No newline at end of file
+};
index 252d277..4dab0f3 100755 (executable)
@@ -24,7 +24,7 @@ use Koha::Patrons;
 use C4::Context;
 use C4::Items;
 use C4::Biblio;
-use C4::Reserves;
+use C4::Reserves qw( AddReserve ModReserve ModReserveAffect );
 
 use t::lib::TestBuilder;
 use t::lib::Mocks;
index 50b6ed8..7536b30 100755 (executable)
@@ -2,7 +2,7 @@
 
 use Modern::Perl;
 
-use C4::Reserves;
+use C4::Reserves qw( ModReserve ModReserveAffect );
 use Koha::DateUtils;
 
 use t::lib::Mocks;
@@ -10,7 +10,7 @@ use t::lib::TestBuilder;
 
 use Test::More tests => 11;
 
-use_ok('C4::Reserves');
+use_ok('C4::Reserves', qw( ModReserve ModReserveAffect ));
 
 my $schema  = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index eb5e902..30f4ec3 100755 (executable)
@@ -11,10 +11,10 @@ use Modern::Perl;
 use Test::More tests => 57;
 use Data::Dumper;
 
-use C4::Calendar;
+use C4::Calendar qw( new insert_single_holiday );
 use C4::Context;
 use C4::Members;
-use C4::Circulation;
+use C4::Circulation qw( AddIssue AddReturn );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Items;
@@ -27,8 +27,8 @@ use t::lib::Mocks;
 BEGIN {
     use FindBin;
     use lib $FindBin::Bin;
-    use_ok('C4::Reserves');
-    use_ok('C4::HoldsQueue');
+    use_ok('C4::Reserves', qw( AddReserve ModReserve ModReserveAffect ));
+    use_ok('C4::HoldsQueue', qw( TransportCostMatrix GetHoldsQueueItems CreateQueue UpdateTransportCostMatrix GetPendingHoldRequestsForBib ));
 }
 
 my $schema = Koha::Database->schema;
index ced8bd5..677c4cc 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::DateUtils;
 
 BEGIN {
     use_ok('Koha::Calendar');
-    use_ok('C4::Calendar');
+    use_ok('C4::Calendar', qw( insert_exception_holiday insert_week_day_holiday insert_day_month_holiday insert_single_holiday copy_to_branch get_exception_holidays isHoliday ));
 }
 
 my $schema = Koha::Database->new->schema;
index c3be5ce..97a2062 100755 (executable)
@@ -25,12 +25,12 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 use C4::Items qw( ModItemTransfer );
-use C4::Circulation;
+use C4::Circulation qw( AddIssue );
 
 use Koha::AuthUtils;
 
 BEGIN {
-    use_ok('C4::ILSDI::Services');
+    use_ok('C4::ILSDI::Services', qw( AuthenticatePatron GetPatronInfo LookupPatron HoldTitle HoldItem GetRecords RenewLoan ));
 }
 
 my $schema  = Koha::Database->schema;
index 0ed9821..24ef726 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use File::Basename qw/basename/;
 
-use C4::Circulation qw(AddIssue AddReturn);
+use C4::Circulation qw( AddIssue AddReturn );
 
 use Koha::Database;
 use Koha::Illrequestattributes;
index da0c189..c96222d 100755 (executable)
@@ -16,7 +16,7 @@ BEGIN {
     # Mock pluginsdir before loading Plugins module
     my $path = dirname(__FILE__) . '/../lib';
     t::lib::Mocks::mock_config( 'pluginsdir', $path );
-    use_ok('C4::ImportBatch');
+    use_ok('C4::ImportBatch', qw( AddImportBatch GetImportBatch AddBiblioToBatch AddItemsToImportBiblio GetRecordFromImportBiblio SetMatchedBiblionumber GetImportBiblios GetItemNumbersFromImportBatch CleanBatch DeleteBatch RecordsFromMarcPlugin ));
 }
 
 # Start transaction
index bd3a6d1..f52200d 100755 (executable)
@@ -26,7 +26,7 @@ use File::Basename qw( dirname );
 use Koha::Database;
 use Koha::BiblioFrameworks;
 use Koha::MarcSubfieldStructures;
-use C4::ImportExportFramework;
+use C4::ImportExportFramework qw( ImportFramework ExportFramework );
 
 my $schema  = Koha::Database->new->schema;
 my $builder = t::lib::TestBuilder->new;
index c8cbe6c..8dfd916 100755 (executable)
@@ -29,7 +29,7 @@ use utf8;
 use Koha::Database;
 
 BEGIN {
-    use_ok('C4::Installer');
+    use_ok('C4::Installer', qw( column_exists index_exists foreign_key_exists primary_key_exists marc_framework_sql_list ));
 }
 
 ok( my $installer = C4::Installer->new(), 'Testing NewInstaller' );
index b28d930..120d9b9 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 use Data::Dumper;
 
 use MARC::Record;
-use C4::Items;
-use C4::Biblio;
+use C4::Items qw( ModItemTransfer GetHiddenItemnumbers GetItemsInfo SearchItems AddItemFromMarc ModItemFromMarc get_hostitemnumbers_of Item2Marc );
+use C4::Biblio qw( GetMarcFromKohaField EmbedItemsInMarcBiblio GetMarcBiblio AddBiblio );
 use Koha::Items;
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string );
index f047252..0c1b044 100755 (executable)
@@ -7,8 +7,8 @@ use MARC::Field;
 use DateTime;
 use DateTime::Duration;
 
-use C4::Items;
-use C4::Biblio;
+use C4::Items qw( GetMarcItem ToggleNewStatus );
+use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
 use C4::Context;
 use Koha::DateUtils;
 use Koha::Items;
index 63e8ea4..d5c34c3 100755 (executable)
@@ -4,7 +4,7 @@ use Test::More tests => 1;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Items;
+use C4::Items qw( GetHostItemsInfo );
 use Koha::Database;
 
 my $schema = Koha::Database->new->schema;
index 5e3ea78..b5c2b97 100755 (executable)
@@ -25,8 +25,8 @@ use t::lib::TestBuilder;
 use List::MoreUtils qw( any none );
 
 use C4::Biblio qw(AddBiblio);
-use C4::Reserves;
-use C4::ClassSource;
+use C4::Reserves qw( AddReserve );
+use C4::ClassSource qw( GetClassSort );
 use Koha::AuthorisedValues;
 use Koha::Biblios;
 use Koha::Database;
@@ -34,7 +34,7 @@ use MARC::Record;
 
 BEGIN {
     use_ok('C4::Context');
-    use_ok('C4::Items');
+    use_ok('C4::Items', qw( GetItemsForInventory ));
     use_ok('C4::Biblio');
     use_ok('C4::Koha');
 }
index 75ae92a..7a3cf2b 100755 (executable)
@@ -18,7 +18,7 @@
 use Modern::Perl;
 use Test::More tests => 8;
 
-use C4::Items;
+use C4::Items qw( MoveItemFromBiblio );
 use C4::Reserves;
 use Koha::Database;
 use Koha::Holds;
index 9e0b8d3..ca80723 100755 (executable)
@@ -14,7 +14,7 @@ use Koha::AuthorisedValue;
 use Koha::AuthorisedValueCategories;
 
 BEGIN {
-    use_ok('C4::Koha', qw( :DEFAULT GetItemTypesCategorized));
+    use_ok('C4::Koha', qw( GetAuthorisedValues GetItemTypesCategorized xml_escape ));
     use_ok('C4::Members');
 }
 
index 232a567..936fc5f 100755 (executable)
@@ -25,7 +25,7 @@ use Test::MockModule;
 
 use DateTime;
 
-use C4::Circulation qw/AddIssue AddReturn/;
+use C4::Circulation qw( AddRenewal CanBookBeRenewed LostItem AddIssue AddReturn );
 use Koha::Account;
 use Koha::Account::Lines;
 use Koha::Account::Offsets;
index 7b6c17d..971752a 100755 (executable)
@@ -25,7 +25,7 @@ use Test::Exception;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Acquisition;
+use C4::Acquisition qw( NewBasket ModBasket ModBasketHeader );
 use Koha::Database;
 use Koha::DateUtils qw(dt_from_string);
 
index 5b5f58c..9025f1c 100755 (executable)
@@ -21,10 +21,10 @@ use Test::More tests => 3;
 
 use t::lib::TestBuilder;
 
-use C4::Acquisition;
-use C4::Biblio;
-use C4::Budgets;
-use C4::Serials;
+use C4::Acquisition qw( NewBasket );
+use C4::Biblio qw( AddBiblio );
+use C4::Budgets qw( AddBudgetPeriod AddBudget );
+use C4::Serials qw( NewSubscription SearchSubscriptions );
 
 use Koha::Acquisition::Booksellers;
 use Koha::Database;
index 8919fe2..dd21384 100755 (executable)
@@ -25,7 +25,7 @@ use Test::Exception;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Circulation;
+use C4::Circulation qw( AddIssue AddReturn );
 
 use Koha::Biblios;
 use Koha::Database;
index 24bce1b..ede7e0c 100755 (executable)
@@ -20,7 +20,7 @@ use Modern::Perl;
 use Test::More tests => 3;
 
 use C4::Context;
-use C4::Log;
+use C4::Log qw( logaction );
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string );
 
index a618bfa..04ad663 100755 (executable)
@@ -29,7 +29,7 @@ use Test::MockObject;
 use Test::Warn;
 
 use C4::Context;
-use C4::AuthoritiesMarc;
+use C4::AuthoritiesMarc qw( merge AddAuthority );
 use Koha::Authority;
 use Koha::Authority::ControlledIndicators;
 use Koha::Authorities;
index e7ecb4f..83de063 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use Test::More tests => 14;
 
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio ModBiblio );
 use Koha::Database;
 use Koha::Acquisition::Orders;
 
index 2afd5c3..7bd22e2 100755 (executable)
@@ -22,7 +22,7 @@ use Test::Exception;
 
 use t::lib::TestBuilder;
 
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 
 BEGIN {
index 5758ea0..d19e8f3 100755 (executable)
@@ -27,8 +27,8 @@ use Test::MockModule;
 use MARC::Field;
 
 use C4::Items;
-use C4::Biblio;
-use C4::Reserves;
+use C4::Biblio qw( AddBiblio ModBiblio );
+use C4::Reserves qw( AddReserve );
 
 use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Biblios;
index 637aaa2..2f2af9d 100755 (executable)
@@ -28,7 +28,7 @@ use t::lib::TestBuilder;
 use t::lib::Dates;
 
 use Time::Fake;
-use C4::Calendar;
+use C4::Calendar qw( new insert_week_day_holiday delete_holiday );
 use Koha::DateUtils qw(dt_from_string);
 
 BEGIN {
index 7163bd2..9c4b0db 100755 (executable)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use Test::More tests => 10;
 
-use C4::Circulation;
+use C4::Circulation qw( MarkIssueReturned AddReturn );
 use Koha::Checkouts;
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string );
index 8ea7d07..528be79 100755 (executable)
@@ -45,4 +45,4 @@ subtest 'is_canceled' => sub {
     ok($enrollment->is_canceled, 'Enrollment should be canceled');
 
     $schema->storage->txn_rollback;
-}
\ No newline at end of file
+}
index cfbad44..524bfb5 100755 (executable)
@@ -21,7 +21,7 @@ use Test::More tests => 1;
 
 use t::lib::TestBuilder;
 
-use C4::Biblio;
+use C4::Biblio qw( GetMarcSubfieldStructure );
 
 use Koha::Database;
 use Koha::RecordProcessor;
index d4a7b2d..ca81af1 100755 (executable)
@@ -25,7 +25,7 @@ use t::lib::TestBuilder;
 
 use MARC::Record;
 
-use C4::Biblio qw/AddBiblio GetMarcBiblio/;
+use C4::Biblio qw( GetMarcFromKohaField AddBiblio GetMarcBiblio );
 use Koha::Database;
 use Koha::RecordProcessor;
 
index 7d19a13..51c3383 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use Test::More tests => 6;
 use Test::Warn;
 
-use C4::Circulation;
-use C4::Reserves;
+use C4::Circulation qw( AddIssue );
+use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll );
 use Koha::AuthorisedValueCategory;
 use Koha::Database;
 use Koha::Holds;
index 161a13b..1ac523c 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use Test::More tests => 9;
 use Test::Exception;
 
-use C4::Biblio;
-use C4::Circulation;
+use C4::Biblio qw( GetMarcSubfieldStructure );
+use C4::Circulation qw( AddIssue AddReturn );
 
 use Koha::Items;
 use Koha::Database;
index 157477c..aecd8d9 100755 (executable)
@@ -25,7 +25,7 @@ use Test::More tests => 14;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Calendar;
+use C4::Calendar qw( new );
 use Koha::Biblioitems;
 use Koha::Libraries;
 use Koha::Database;
index 900004d..e3e7205 100755 (executable)
@@ -25,7 +25,7 @@ use Test::MockModule;
 use Test::Exception;
 use Time::Fake;
 
-use C4::Circulation;
+use C4::Circulation qw( AddIssue LostItem AddReturn );
 use C4::Context;
 use Koha::Item;
 use Koha::Item::Transfer::Limits;
index b78283c..64d3f1d 100755 (executable)
@@ -23,8 +23,8 @@ use Test::Warn;
 use DateTime;
 
 use C4::Context;
-use C4::Circulation; # AddIssue
-use C4::Biblio; # AddBiblio
+use C4::Circulation qw( AddIssue );
+use C4::Biblio qw( AddBiblio );
 
 use Koha::Database;
 
index 93711d7..5accf56 100755 (executable)
@@ -201,4 +201,4 @@ subtest 'effective_require_strong_password' => sub {
   is($category->effective_require_strong_password, 1, 'Patron should be required strong password from category');
 
   $schema->storage->txn_rollback;
-};
\ No newline at end of file
+};
index 120e981..59c6a8a 100755 (executable)
@@ -29,9 +29,9 @@ use JSON;
 use Data::Dumper;
 use utf8;
 
-use C4::Circulation;
+use C4::Circulation qw( AddIssue AddReturn );
 use C4::Biblio;
-use C4::Auth qw(checkpw_hash);
+use C4::Auth qw( checkpw checkpw_hash );
 
 use Koha::ActionLogs;
 use Koha::Holds;
index 5f8569d..5ef25f7 100755 (executable)
@@ -22,7 +22,7 @@ use Test::Warn;
 
 use File::Basename;
 
-use C4::Circulation qw(AddIssue AddRenewal AddReturn);
+use C4::Circulation qw( AddIssue AddRenewal AddReturn );
 
 use t::lib::Mocks;
 use t::lib::TestBuilder;
index 02086fa..07aa4f7 100755 (executable)
@@ -22,7 +22,7 @@ use Test::Warn;
 
 use File::Basename;
 
-use C4::Reserves qw(AddReserve);
+use C4::Reserves qw( AddReserve );
 
 use t::lib::Mocks;
 use t::lib::TestBuilder;
index cfefc82..674ad36 100755 (executable)
@@ -22,8 +22,8 @@ use Modern::Perl;
 use Test::More tests => 3;
 use Try::Tiny;
 
-use C4::Circulation;
-use C4::Stats;
+use C4::Circulation qw( AddIssue AddReturn );
+use C4::Stats qw( UpdateStats );
 
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string );
index a1740c7..69f5ec3 100755 (executable)
@@ -15,10 +15,10 @@ use Test::MockObject;
 use t::lib::Mocks;
 
 #use C4::Biblio qw//;
-use C4::AuthoritiesMarc;
-use C4::Biblio;
-use C4::Circulation;
-use C4::Items;
+use C4::AuthoritiesMarc qw( AddAuthority DelAuthority merge );
+use C4::Biblio qw( ModZebra ModBiblio ModBiblioMarc DelBiblio );
+use C4::Circulation qw( MarkIssueReturned AddReturn LostItem );
+use C4::Items qw( ModDateLastSeen ModItemTransfer );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::SearchEngine::Elasticsearch;
index 12ebc9e..01600fa 100755 (executable)
@@ -23,7 +23,7 @@ use Test::More tests => 4;
 
 use Koha::Database;
 use Koha::Statistics;
-use C4::Stats;
+use C4::Stats qw( UpdateStats );
 
 use t::lib::TestBuilder;
 
index 279aafe..b48ac0c 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 use Test::More tests => 3;
 use t::lib::TestBuilder;
-use C4::Items;
+use C4::Items qw( GetMarcItem );
 
 BEGIN {
     use_ok('Koha::Z3950Responder');
index e6e8e23..71ba26e 100755 (executable)
@@ -3,7 +3,7 @@
 use Modern::Perl;
 use Test::More tests => 3;
 use t::lib::TestBuilder;
-use C4::Items;
+use C4::Items qw( GetMarcItem );
 
 use Koha::Caches;
 
index 300b6a8..e576457 100755 (executable)
@@ -20,8 +20,8 @@
 use Modern::Perl;
 
 use C4::Context;
-use C4::Charset;
-use C4::AuthoritiesMarc;
+use C4::Charset qw( MarcToUTF8Record );
+use C4::AuthoritiesMarc qw( AddAuthority );
 use Koha::Database;
 use Test::More;
 use File::Basename;
index 7f21be9..fd9a1c1 100755 (executable)
@@ -3,7 +3,7 @@ use Modern::Perl;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 use Test::More tests => 3;                      # last test to print
-use C4::Auth;
+use C4::Auth qw( get_session );
 use Koha::Database;
 
 use Module::Load::Conditional qw( can_load );
index b74917b..61a3710 100755 (executable)
@@ -27,13 +27,13 @@ use MARC::Field;
 use t::lib::TestBuilder;
 
 use C4::Context;
-use C4::Items;
-use C4::Biblio;
+use C4::Items qw( AddItemBatchFromMarc );
+use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
 use Koha::Database;
 use Koha::Libraries;
 
 BEGIN {
-    use_ok('C4::Labels::Batch');
+    use_ok('C4::Labels::Batch', qw( save retrieve delete ));
 }
 
 my $schema = Koha::Database->new->schema;
index 120f1d5..f9e50aa 100755 (executable)
@@ -13,7 +13,7 @@ use t::lib::Mocks;
 use Koha::Database;
 
 BEGIN {
-    use_ok('C4::Languages');
+    use_ok('C4::Languages', qw( accept_language getAllLanguages getLanguages getTranslatedLanguages get_rfc4646_from_iso639 ));
 }
 
 my $schema = Koha::Database->new->schema;
index f916f08..7e5273f 100755 (executable)
@@ -44,9 +44,9 @@ $email_sender_module->mock(
 
 use_ok('C4::Context');
 use_ok('C4::Members');
-use_ok('C4::Acquisition');
-use_ok('C4::Biblio');
-use_ok('C4::Letters');
+use_ok('C4::Acquisition', qw( NewBasket ));
+use_ok('C4::Biblio', qw( AddBiblio GetBiblioData ));
+use_ok('C4::Letters', qw( GetMessageTransportTypes GetMessage EnqueueLetter GetQueuedMessages SendQueuedMessages ResendMessage GetLetters GetPreparedLetter SendAlerts ));
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 use Koha::Database;
@@ -472,7 +472,7 @@ is($err->{error}, 'something went wrong', "Send exception, error message returne
 }
 
 {
-use C4::Serials;
+use C4::Serials qw( NewSubscription GetSerials findSerialsByStatus ModSerialStatus );
 
 my $notes = 'notes';
 my $internalnotes = 'intnotes';
index ded8985..3a49e7d 100755 (executable)
@@ -2,7 +2,7 @@ use Modern::Perl;
 use Test::More tests => 19;
 
 use C4::Context;
-use C4::Letters qw( GetLettersAvailableForALibrary DelLetter );
+use C4::Letters qw( GetLetters GetLettersAvailableForALibrary DelLetter );
 use Koha::Database;
 
 my $schema = Koha::Database->new->schema;
index 8d04942..7e72517 100755 (executable)
@@ -28,9 +28,9 @@ use MARC::Record;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Circulation;
-use C4::Letters;
-use C4::Members;
+use C4::Circulation qw( AddIssue AddReturn );
+use C4::Letters qw( GetPreparedLetter );
+use C4::Members qw( IssueSlip );
 use C4::Biblio;
 use Koha::Database;
 use Koha::DateUtils;
index 2682421..f9ecabf 100755 (executable)
@@ -162,4 +162,4 @@ subtest 'Koha::Library::Groups->get_root_ancestor' => sub {
 
     is($ancestor1->id, $groupY->id, "Get root ancestor should return group's root ancestor");
     ok($ancestor1->id ne $ancestor2->id, "Both root groups should have different ids");
-};
\ No newline at end of file
+};
index 19f4213..e16d790 100755 (executable)
@@ -21,8 +21,8 @@ use Test::More tests => 2;
 use MARC::Record;
 use MARC::Field;
 use MARC::File::XML;
-use C4::Heading;
-use C4::Linker::FirstMatch;
+use C4::Heading qw( authorities field new_from_field auth_type search_form );
+use C4::Linker::Default;
 use Test::MockModule;
 use t::lib::Mocks qw( mock_preference );
 use t::lib::TestBuilder;
index cfcd752..d4d211a 100755 (executable)
@@ -24,7 +24,7 @@ use Test::More tests => 3;
 use MARC::Record;
 use MARC::Field;
 use MARC::File::XML;
-use C4::Heading;
+use C4::Heading qw( authorities field new_from_field );
 use C4::Linker::FirstMatch;
 use Test::MockModule;
 use t::lib::Mocks qw( mock_preference );
index 3ce974b..b3084ce 100755 (executable)
@@ -18,8 +18,8 @@ use Modern::Perl;
 use Test::More tests => 3;
 
 use C4::Context;
-use C4::Log;
-use C4::Auth qw/checkpw/;
+use C4::Log qw( logaction cronlogaction );
+use C4::Auth qw( checkpw );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::ActionLogs;
index fa148f9..82d8a29 100755 (executable)
@@ -9,7 +9,7 @@ use t::lib::Mocks;
 
 use_ok("MARC::Field");
 use_ok("MARC::Record");
-use_ok("C4::MarcModificationTemplates");
+use_ok('C4::MarcModificationTemplates', qw( AddModificationTemplate AddModificationTemplateAction GetModificationTemplateAction GetModificationTemplateActions ModModificationTemplateAction MoveModificationTemplateAction DelModificationTemplate DelModificationTemplateAction ModifyRecordWithTemplate GetModificationTemplates ));
 
 my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
index 367d0d2..dd0ed5d 100755 (executable)
@@ -33,7 +33,7 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 BEGIN {
-        use_ok('C4::Members');
+        use_ok('C4::Members', qw( checkcardnumber GetBorrowersToExpunge DeleteUnverifiedOpacRegistrations DeleteExpiredOpacRegistrations ));
 }
 
 my $schema = Koha::Database->schema;
index 45c3682..b327c8f 100755 (executable)
@@ -22,10 +22,10 @@ use Test::MockModule;
 
 use t::lib::TestBuilder;
 
-use C4::Circulation;
-use C4::Biblio;
+use C4::Circulation qw( AddIssue );
+use C4::Biblio qw( AddBiblio );
 use C4::Items;
-use C4::Members;
+use C4::Members qw( GetAllIssues );
 use Koha::Libraries;
 use Koha::Patrons;
 use MARC::Record;
index 9586769..dced423 100755 (executable)
@@ -24,10 +24,10 @@ use Test::MockModule;
 use Test::MockTime qw( set_fixed_time );
 use t::lib::TestBuilder;
 
-use C4::Circulation;
-use C4::Biblio;
+use C4::Circulation qw( AddIssue AddReturn );
+use C4::Biblio qw( AddBiblio );
 use C4::Items;
-use C4::Members;
+use C4::Members qw( IssueSlip );
 
 use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Library;
index fe0ca9b..fc1a620 100755 (executable)
@@ -5,7 +5,7 @@ use Test::More tests => 2;
 
 use t::lib::Mocks;
 
-use C4::Members::Statistics;
+use C4::Members::Statistics qw( get_fields );
 use Koha::Database; # we need the db here; get_fields looks for the item columns
 
 my $schema = Koha::Database->schema;
index cdb3032..ab65e0b 100755 (executable)
@@ -22,7 +22,7 @@ use utf8;
 
 use t::lib::TestBuilder;
 
-use C4::Letters;
+use C4::Letters qw( GetPreparedLetter );
 use Koha::Database;
 
 my $schema = Koha::Database->schema;
index 12a3d6a..1a51423 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use C4::Biblio;
+use C4::Biblio qw( MungeMarcPrice );
 use Koha::Database;
 use Koha::Acquisition::Currencies;
 use Test::More;
index d589595..0d6bd90 100755 (executable)
@@ -25,8 +25,8 @@ use MARC::Record;
 use Data::Dumper;
 
 use Koha::Database;
-use C4::Biblio;
-use C4::OAI::Sets;
+use C4::Biblio qw( GetMarcBiblio );
+use C4::OAI::Sets qw( AddOAISet ModOAISet ModOAISetMappings CalcOAISetsBiblio );
 
 use t::lib::TestBuilder;
 
index 09a09de..48fea41 100755 (executable)
@@ -32,7 +32,7 @@ use YAML::XS;
 
 use t::lib::Mocks;
 
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio GetMarcBiblio ModBiblio );
 use C4::Context;
 
 use Koha::Biblio::Metadatas;
index 1fd5773..4dfd80b 100755 (executable)
@@ -24,8 +24,8 @@ use Test::Warn;
 use MARC::Record;
 
 use Koha::Database;
-use C4::Biblio;
-use C4::OAI::Sets;
+use C4::Biblio qw( GetMarcBiblio );
+use C4::OAI::Sets qw( AddOAISet GetOAISets GetOAISet GetOAISetBySpec ModOAISet ModOAISetMappings GetOAISetsMappings GetOAISetMappings AddOAISetsBiblios GetOAISetsBiblio ModOAISetsBiblios DelOAISet DelOAISetsBiblio UpdateOAISetsBiblio CalcOAISetsBiblio );
 
 use t::lib::TestBuilder;
 use t::lib::Mocks;
index ed031b2..55a5db6 100755 (executable)
@@ -11,7 +11,7 @@ use Koha::Libraries;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use_ok('C4::Overdues');
+use_ok('C4::Overdues', qw( GetOverdueMessageTransportTypes GetBranchcodesWithOverdueRules UpdateFine ));
 can_ok('C4::Overdues', 'GetOverdueMessageTransportTypes');
 can_ok('C4::Overdues', 'GetBranchcodesWithOverdueRules');
 
index f4a7209..0f33acb 100755 (executable)
@@ -18,7 +18,7 @@
 use Modern::Perl;
 
 use C4::Context;
-use C4::Letters;
+use C4::Letters qw( GetQueuedMessages );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Patrons;
index 8a240ce..3b12f70 100755 (executable)
@@ -2,7 +2,7 @@
 use Modern::Perl;
 
 use C4::Members;
-use C4::Circulation;
+use C4::Circulation qw( AddIssue AddReturn CanBookBeIssued );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Patrons;
index 0f09959..8da4915 100755 (executable)
@@ -47,4 +47,4 @@ subtest 'Delete a patron having messages' => sub {
     is(Koha::Patron::Messages->find($message->{message_id}), undef, 'Message is deleted');
 };
 
-$schema->storage->txn_rollback;
\ No newline at end of file
+$schema->storage->txn_rollback;
index 3f9b742..5ae61af 100755 (executable)
@@ -20,7 +20,7 @@ use Test::MockModule;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Patroncards::Layout;
+use C4::Patroncards::Layout qw( save new );
 
 subtest '->save' => sub {
     plan tests => 1;
index 22fcdb3..53a4ae6 100755 (executable)
@@ -10,7 +10,7 @@ use C4::Context;
 use Koha::Database;
 
 BEGIN {
-        use_ok('C4::Record');
+    use_ok('C4::Record', qw( marc2marc marc2marcxml marcxml2marc marc2dcxml marc2modsxml marc2bibtex ));
 }
 
 my $schema = Koha::Database->new->schema;
index 384588d..495f8e0 100755 (executable)
@@ -27,7 +27,7 @@ use constant WHEREAMI => 't/db_dependent/Record/testrecords';
 # specify the number of tests
 use Test::More tests => 21; #FIXME Commented out two failing tests
 #use C4::Context;
-use C4::Record;
+use C4::Record qw( marc2marc marc2marcxml marc2dcxml changeEncoding );
 
 =head1 NAME
 
index 37b6e30..53fa0bd 100755 (executable)
@@ -7,12 +7,12 @@ use MARC::Record;
 use MARC::Field;
 use Text::CSV::Encoded;
 
-use C4::Biblio qw( AddBiblio );
+use C4::Biblio qw( AddBiblio GetMarcBiblio );
 use C4::Context;
-use C4::Record;
+use C4::Record qw( marcrecord2csv );
 use Koha::Database;
 
-use C4::Items;
+use C4::Items qw( AddItemFromMarc );
 
 use t::lib::TestBuilder;
 
index e28efd6..9cf56ab 100755 (executable)
@@ -9,7 +9,7 @@ use warnings;
 use Test::More tests => 2;
 
 BEGIN {
-        use_ok('C4::Reports');
+        use_ok('C4::Reports', qw( GetDelimiterChoices ));
 }
 
 
index 5419bdd..6373c0e 100755 (executable)
@@ -28,7 +28,7 @@ use Koha::Items;
 use Koha::Reports;
 use Koha::Notice::Messages;
 
-use_ok('C4::Reports::Guided');
+use_ok('C4::Reports::Guided', qw( execute_query save_report delete_report strip_limit GetReservedAuthorisedValues IsAuthorisedValueValid GetParametersFromSQL ValidateSQLParameters get_saved_reports update_sql get_report_areas convert_sql EmailReport nb_rows ));
 can_ok(
     'C4::Reports::Guided',
     qw(save_report delete_report execute_query)
index 93e1799..e748f11 100755 (executable)
@@ -27,11 +27,11 @@ use t::lib::TestBuilder;
 use MARC::Record;
 use DateTime::Duration;
 
-use C4::Circulation;
+use C4::Circulation qw( AddReturn AddIssue );
 use C4::Items;
-use C4::Biblio;
+use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblio );
 use C4::Members;
-use C4::Reserves;
+use C4::Reserves qw( AddReserve CheckReserves GetReservesControlBranch ModReserve ModReserveAffect ReserveSlip CalculatePriority CanReserveBeCanceledFromOpac CanBookBeReserved IsAvailableForItemLevelRequest MoveReserve ChargeReserveFee RevertWaitingStatus CanItemBeReserved MergeHolds );
 use Koha::ActionLogs;
 use Koha::Caches;
 use Koha::DateUtils;
index d5703cc..4d24794 100755 (executable)
@@ -22,7 +22,7 @@ use Test::More tests => 1;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Reserves;
+use C4::Reserves qw( AutoUnsuspendReserves );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Holds;
index 6822a04..27a583b 100755 (executable)
@@ -7,7 +7,7 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 use C4::Members;
-use C4::Reserves;
+use C4::Reserves qw( CancelExpiredReserves );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Holds;
index bb9b4da..f53f7c1 100755 (executable)
@@ -26,8 +26,8 @@ use Test::MockModule;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Circulation;
-use C4::Reserves qw|AddReserve|;
+use C4::Circulation qw( AddIssue );
+use C4::Reserves qw( GetReserveFee ChargeReserveFee AddReserve );
 use Koha::Database;
 
 my $schema = Koha::Database->new->schema;
index 6e88740..07f7ea9 100755 (executable)
@@ -23,7 +23,7 @@ use Test::More tests => 16;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Reserves qw( GetMaxPatronHoldsForRecord AddReserve CanBookBeReserved );
+use C4::Reserves qw( GetMaxPatronHoldsForRecord CanBookBeReserved AddReserve );
 use Koha::Database;
 use Koha::Holds;
 
index 1db4e45..f278ad4 100755 (executable)
@@ -19,8 +19,8 @@ use Modern::Perl;
 
 use Test::More tests => 53;
 use C4::Context;
-use C4::RotatingCollections;
-use C4::Biblio;
+use C4::RotatingCollections qw( AddItemToCollection CreateCollection DeleteCollection GetCollection GetCollectionItemBranches GetCollections GetItemsInCollection RemoveItemFromCollection TransferCollection UpdateCollection isItemInAnyCollection isItemInThisCollection );
+use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 use Koha::Library;
 
index ebfdeea..79eabdd 100755 (executable)
@@ -25,8 +25,8 @@ use Test::More tests => 13;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Reserves;
-use C4::Circulation;
+use C4::Reserves qw( AddReserve );
+use C4::Circulation qw( AddIssue );
 use Koha::CirculationRules;
 use Koha::Database;
 use Koha::DateUtils;
index db48fde..790248b 100755 (executable)
@@ -30,7 +30,7 @@ use Test::Warn;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Reserves qw(AddReserve);
+use C4::Reserves qw( AddReserve );
 use C4::Circulation qw( AddReturn );
 use Koha::Database;
 use Koha::AuthUtils qw(hash_password);
index 4adecf9..8d6d574 100755 (executable)
@@ -37,7 +37,7 @@ BEGIN {
     $mockPrefork->mock( 'run', sub {} );
 }
 
-use C4::SIP::SIPServer;
+use C4::SIP::SIPServer qw( get_timeout );
 
 # Start testing !
 # TODO We should include more tests here.
index 6fa5810..1f8cab6 100755 (executable)
@@ -18,7 +18,7 @@ use C4::SIP::ILS::Transaction::Hold;
 use C4::SIP::ILS::Transaction::Checkout;
 use C4::SIP::ILS::Transaction::Checkin;
 
-use C4::Reserves;
+use C4::Reserves qw( AddReserve ModReserve ModReserveAffect RevertWaitingStatus );
 use Koha::CirculationRules;
 use Koha::Item::Transfer;
 use Koha::DateUtils qw( dt_from_string output_pref );
index 5205137..8efe5df 100755 (executable)
@@ -262,7 +262,7 @@ sub run_marc21_search_tests {
     my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
     $context->set_context();
 
-    use_ok('C4::Search');
+    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
 
     # set search syspreferences to a known starting point
     $QueryStemming = 0;
@@ -836,7 +836,7 @@ sub run_unimarc_search_tests {
     my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
     $context->set_context();
 
-    use_ok('C4::Search');
+    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
 
     # set search syspreferences to a known starting point
     $QueryStemming = 0;
@@ -859,7 +859,7 @@ sub run_unimarc_search_tests {
     is($total_hits, 1, 'UNIMARC generic item index (bug 10037)');
 
     # authority records
-    use_ok('C4::AuthoritiesMarc');
+    use_ok('C4::AuthoritiesMarc', qw( SearchAuthorities ));
 
     my ($auths, $count) = SearchAuthorities(
         ['mainentry'], ['and'], [''], ['contains'],
index db3a103..5694694 100755 (executable)
@@ -8,7 +8,7 @@ use List::MoreUtils qw/all any none/;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Auth;
+use C4::Auth qw( get_session checkauth get_template_and_user );
 use Koha::Database;
 
 use Test::More tests => 27;
@@ -28,7 +28,7 @@ my $dbh = C4::Context->dbh;
 t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' );
 
 use_ok('Koha::DateUtils');
-use_ok('C4::Search::History');
+use_ok('C4::Search::History', qw( add get delete get_from_session ));
 
 my $userid = 123;
 my $previous_sessionid = "PREVIOUS_SESSIONID";
index 0dcdada..925a750 100755 (executable)
@@ -5,12 +5,12 @@
 
 use Modern::Perl;
 
-use C4::Serials;
+use C4::Serials qw( updateClaim NewSubscription GetSubscription GetSubscriptionHistoryFromSubscriptionId SearchSubscriptions ModSubscription GetExpirationDate GetSerials GetSerialInformation NewIssue AddItem2Serial DelSubscription GetFullSubscription PrepareSerialsData GetSubscriptionsFromBiblionumber ModSubscriptionHistory GetSerials2 GetLatestSerials GetNextSeq GetSeq CountSubscriptionFromBiblionumber ModSerialStatus findSerialsByStatus HasSubscriptionStrictlyExpired HasSubscriptionExpired GetLateOrMissingIssues check_routing addroutingmember GetNextDate );
 use C4::Serials::Frequency;
 use C4::Serials::Numberpattern;
-use C4::Biblio;
-use C4::Budgets;
-use C4::Items;
+use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
+use C4::Budgets qw( AddBudgetPeriod AddBudget );
+use C4::Items qw( AddItemFromMarc );
 use Koha::Database;
 use Koha::DateUtils;
 use Koha::Acquisition::Booksellers;
@@ -19,7 +19,7 @@ use t::lib::TestBuilder;
 use Test::More tests => 49;
 
 BEGIN {
-    use_ok('C4::Serials');
+    use_ok('C4::Serials', qw( updateClaim NewSubscription GetSubscription GetSubscriptionHistoryFromSubscriptionId SearchSubscriptions ModSubscription GetExpirationDate GetSerials GetSerialInformation NewIssue AddItem2Serial DelSubscription GetFullSubscription PrepareSerialsData GetSubscriptionsFromBiblionumber ModSubscriptionHistory GetSerials2 GetLatestSerials GetNextSeq GetSeq CountSubscriptionFromBiblionumber ModSerialStatus findSerialsByStatus HasSubscriptionStrictlyExpired HasSubscriptionExpired GetLateOrMissingIssues check_routing addroutingmember GetNextDate ));
 }
 
 my $schema = Koha::Database->new->schema;
index 6458497..afc3a18 100755 (executable)
@@ -2,10 +2,10 @@ use Modern::Perl;
 use Test::More tests => 17;
 
 use C4::Acquisition;
-use C4::Budgets;
+use C4::Budgets qw( AddBudgetPeriod AddBudget );
 use Koha::Database;
 use Koha::Acquisition::Booksellers;
-use_ok('C4::Serials');
+use_ok('C4::Serials', qw( GetSuppliersWithLateIssues NewSubscription GetLateOrMissingIssues updateClaim ));
 
 use Koha::DateUtils qw( dt_from_string output_pref );
 
index b185854..02a64f7 100755 (executable)
@@ -8,7 +8,7 @@ use Modern::Perl;
 my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
 
-use C4::Serials::Frequency;
+use C4::Serials::Frequency qw( GetSubscriptionFrequencies DelSubscriptionFrequency GetSubscriptionFrequency ModSubscriptionFrequency AddSubscriptionFrequency );
 
 # Start by deleting all frequencies.
 my @frequencies = GetSubscriptionFrequencies();
index 1ad66b2..5a5e6b0 100755 (executable)
@@ -6,7 +6,7 @@ use Modern::Perl;
 use Test::More tests => 5;
 
 use Koha::Database;
-use C4::Serials;
+use C4::Serials qw( GetFictiveIssueNumber GetSubscription );
 use C4::Serials::Frequency;
 
 my $schema  = Koha::Database->new->schema;
index bcbb76c..4081dea 100755 (executable)
@@ -4,7 +4,7 @@ use Modern::Perl;
 use Test::More tests => 102;
 
 use Koha::Database;
-use C4::Serials;
+use C4::Serials qw( GetNextDate );
 use C4::Serials::Frequency;
 
 my $schema  = Koha::Database->new->schema;
index d369b6c..270568d 100755 (executable)
@@ -9,7 +9,7 @@ my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
 
 use C4::Serials::Frequency;
-use C4::Serials;
+use C4::Serials qw( GetNextDate GetNextSeq );
 
 my $frequency = {
     description => "One issue per day",
index 84a62cc..65e1f42 100755 (executable)
@@ -9,7 +9,7 @@ use Koha::Database;
 my $schema = Koha::Database->new->schema;
 $schema->storage->txn_begin;
 
-use C4::Serials::Numberpattern;
+use C4::Serials::Numberpattern qw( GetSubscriptionNumberpatterns GetSubscriptionNumberpattern DelSubscriptionNumberpattern ModSubscriptionNumberpattern AddSubscriptionNumberpattern );
 
 # Start by deleting all numberpatterns.
 my @numberpatterns = GetSubscriptionNumberpatterns();
index c8e4a60..6abe836 100755 (executable)
@@ -27,7 +27,7 @@ use Test::MockModule;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Serials;
+use C4::Serials qw( NewSubscription ReNewSubscription GetSubscription GetSubscriptionLength );
 
 use Koha::Database;
 use Koha::Subscription::Histories;
index caf3d43..d0a1b7a 100755 (executable)
@@ -10,8 +10,8 @@ use Koha::Database;
 use Koha::Patrons;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
-use_ok('C4::Serials');
-use_ok('C4::Budgets');
+use_ok('C4::Serials', qw( NewSubscription GetSubscription NewIssue GetPreviousSerialid ));
+use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget ));
 
 # Mock userenv
 local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ };
index bf5906f..27d3741 100755 (executable)
@@ -8,12 +8,12 @@ use MARC::Record;
 
 use C4::Context;
 use C4::Items;
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use Koha::Database;
 
 use t::lib::TestBuilder;
 
-use_ok('C4::ShelfBrowser');
+use_ok('C4::ShelfBrowser', qw( GetNearbyItems ));
 
 my $schema = Koha::Database->schema;
 $schema->storage->txn_begin;
index 7e2e6f7..5bf1b61 100755 (executable)
@@ -1,13 +1,13 @@
 #!/usr/bin/perl
 
 use Modern::Perl;
-use C4::Stats;
+use C4::Stats qw( UpdateStats );
 use Koha::Database;
 
 use Test::More tests => 18;
 
 BEGIN {
-    use_ok('C4::Stats');
+    use_ok('C4::Stats', qw( UpdateStats ));
 }
 can_ok(
     'C4::Stats',
index 762f9ad..44e90a9 100755 (executable)
@@ -25,7 +25,7 @@ use t::lib::Mocks;
 use t::lib::TestBuilder;
 
 use C4::Context;
-use C4::Letters;
+use C4::Letters qw( GetQueuedMessages GetMessage );
 use C4::Budgets qw( AddBudgetPeriod AddBudget GetBudget );
 use Koha::Database;
 use Koha::DateUtils qw( dt_from_string output_pref );
@@ -34,7 +34,7 @@ use Koha::Patrons;
 use Koha::Suggestions;
 
 BEGIN {
-    use_ok('C4::Suggestions');
+    use_ok('C4::Suggestions', qw( NewSuggestion GetSuggestion ModSuggestion GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio SearchSuggestion DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ));
 }
 
 my $schema  = Koha::Database->new->schema;
index 93014bb..30cbc12 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Tags;
 use Koha::Tags::Approvals;
 use Koha::Tags::Indexes;
 
-use C4::Tags;
+use C4::Tags qw( add_tag_approval add_tag add_tag_index get_tag_rows get_tag stratify_tags );
 
 # So any output is readable :-D
 binmode STDOUT, ':encoding(utf8)';
index 2efce26..5d44d47 100755 (executable)
@@ -27,10 +27,10 @@ use File::Temp qw/tempfile/;
 
 use t::lib::Mocks;
 
-use C4::Auth qw//;
+use C4::Auth qw( get_template_and_user );
 
 BEGIN {
-    use_ok( 'C4::Templates' );
+    use_ok('C4::Templates', qw( GetColumnDefs getlanguagecookie setlanguagecookie themelanguage gettemplate param output availablethemes badtemplatecheck ));
     can_ok( 'C4::Templates',
          qw/ GetColumnDefs
              getlanguagecookie
index ddc1267..8b8b0f2 100755 (executable)
@@ -25,11 +25,11 @@ use Koha::Biblios;
 use Koha::Libraries;
 
 BEGIN {
-    use_ok('C4::UsageStats');
+    use_ok('C4::UsageStats', qw( NeedUpdate BuildReport ReportToCommunity _count ));
     use_ok('C4::Context');
-    use_ok('C4::Biblio');
+    use_ok('C4::Biblio', qw( UpdateTotalIssues ));
     use_ok( 'C4::AuthoritiesMarc', qw(AddAuthority) );
-    use_ok('C4::Reserves');
+    use_ok('C4::Reserves', qw( AddReserve ));
     use_ok('MARC::Record');
     use_ok('Koha::Acquisition::Orders');
 }
index ae0c61b..409dd6e 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use Test::More tests => 1;
 
-use C4::Utils::DataTables;
+use C4::Utils::DataTables qw( dt_build_orderby );
 
 use t::lib::Mocks;
 use t::lib::TestBuilder;
index 758f93f..d43dbc5 100755 (executable)
@@ -19,7 +19,7 @@ use Modern::Perl;
 
 use Test::More tests => 13;
 
-use C4::Biblio;
+use C4::Biblio qw( AddBiblio );
 use C4::Context;
 
 use Koha::Library;
index ed34e5a..0633d34 100755 (executable)
@@ -8,8 +8,8 @@ use Modern::Perl;
 use Test::More tests => 6;
 use List::MoreUtils qw(any none);
 use MARC::Record;
-use C4::Biblio;
-use C4::XISBN;
+use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
+use C4::XISBN qw( get_xisbns );
 use C4::Context;
 use C4::Search;
 use Koha::Database;
@@ -17,7 +17,7 @@ use t::lib::Mocks;
 use Test::MockModule;
 
 BEGIN {
-    use_ok('C4::XISBN');
+    use_ok('C4::XISBN', qw( get_xisbns ));
 }
 
 my $schema = Koha::Database->new->schema;
index f90baff..5215789 100755 (executable)
@@ -26,7 +26,7 @@ use t::lib::Mocks;
 use Koha::ItemTypes;
 
 BEGIN {
-    use_ok('C4::XSLT');
+    use_ok('C4::XSLT', qw( transformMARCXML4XSLT getAuthorisedValues4MARCSubfields buildKohaItemsNamespace ));
 }
 
 my $schema  = Koha::Database->new->schema;
index 2003ac6..cdb1719 100755 (executable)
@@ -24,7 +24,7 @@ use Test::Warn;
 use t::lib::TestBuilder;
 use t::lib::Mocks;
 
-use C4::Auth;
+use C4::Auth qw( get_session );
 use Koha::Database;
 
 my $schema  = Koha::Database->new->schema;
index b3868a3..abd32a4 100755 (executable)
@@ -26,7 +26,7 @@ use t::lib::TestBuilder;
 use DateTime;
 
 use C4::Context;
-use C4::Circulation;
+use C4::Circulation qw( AddIssue AddReturn );
 
 use Koha::Database;
 use Koha::DateUtils;
index e5a84ba..5abba54 100755 (executable)
@@ -28,7 +28,7 @@ use Mojo::JSON qw(encode_json);
 
 use C4::Context;
 use Koha::Patrons;
-use C4::Reserves;
+use C4::Reserves qw( AddReserve CanItemBeReserved CanBookBeReserved );
 use C4::Items;
 
 use Koha::Database;
index 2123b5e..a9877f7 100755 (executable)
@@ -24,7 +24,7 @@ use Test::Warn;
 use t::lib::Mocks;
 use t::lib::TestBuilder;
 
-use C4::Circulation qw(AddIssue);
+use C4::Circulation qw( AddIssue );
 
 use Koha::Checkouts::ReturnClaims;
 use Koha::Database;
index 605bde4..f72fa9f 100755 (executable)
@@ -2,7 +2,7 @@
 
 use Modern::Perl;
 use C4::Context;
-use C4::Circulation;
+use C4::Circulation qw( CanBookBeIssued AddIssue AddReturn );
 use C4::Members;
 use C4::Items;
 use Koha::DateUtils;
index 4d04104..4bf121b 100755 (executable)
@@ -37,7 +37,7 @@ use Modern::Perl;
 use Time::HiRes qw(gettimeofday);
 use POSIX qw(strftime);
 use C4::Context;
-use C4::Biblio qw( AddBiblio ); # We shouldn't use it
+use C4::Biblio qw( AddBiblio );
 
 use Koha::CirculationRules;
 
index a59739f..220345f 100755 (executable)
@@ -25,7 +25,7 @@ use Test::MockModule;
 
 use C4::Context;
 use C4::Biblio qw( AddBiblio );
-use C4::Circulation;
+use C4::Circulation qw( AddIssue );
 use Koha::AuthUtils;
 use t::lib::Mocks;
 use t::lib::Selenium;
index 9ea1a1d..8b9c77b 100755 (executable)
@@ -23,7 +23,7 @@ use t::lib::TestBuilder;
 use t::lib::Mocks;
 
 use C4::Context;
-use C4::Biblio;
+use C4::Biblio qw( ModBiblio );
 
 use Koha::Database;
 use Koha::Caches;
index 8f962de..169c51e 100755 (executable)
@@ -2,10 +2,10 @@
 
 use Modern::Perl;
 
-use File::Copy;
-use File::Path qw(make_path);
-use File::Find;
-use File::Basename;
+use File::Copy qw( copy );
+use File::Path qw( make_path );
+use File::Find qw( find );
+use File::Basename qw( dirname );
 use File::Spec;
 
 use C4::Context;
index 66299d9..5340099 100644 (file)
@@ -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
index 6e74038..2b6490d 100644 (file)
@@ -16,7 +16,7 @@ package t::lib::Koha::BackgroundJob::BatchTest;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 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 );
index baf7e23..66a1417 100644 (file)
@@ -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);
 
index 1c296b0..3656539 100644 (file)
@@ -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);
index a240464..2b63c0e 100644 (file)
@@ -16,7 +16,7 @@ package t::lib::Mocks;
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use C4::Context;
+use C4::Context qw( config new preference userenv _new_userenv set_userenv );
 
 use Test::MockModule;
 use Test::MockObject;
index 35d2c04..8e235e9 100644 (file)
@@ -18,10 +18,8 @@ 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;
+use C4::Context qw( new config preference interface );
 
 use base qw(Class::Accessor);
 __PACKAGE__->mk_accessors(qw(login password base_url opac_base_url selenium_addr selenium_port driver));
index ee37542..e8b0dbf 100644 (file)
@@ -2,16 +2,15 @@ package t::lib::TestBuilder;
 
 use Modern::Perl;
 
-use Koha::Database;
-use C4::Biblio;
-use C4::Items;
-use Koha::Biblios;
-use Koha::Items;
+use Koha::Database qw( schema );
+use C4::Biblio qw( AddBiblio );
+use Koha::Biblios qw( _type );
+use Koha::Items qw( _type );
 use Koha::DateUtils qw( dt_from_string );
 
 use Bytes::Random::Secure;
-use Carp;
-use Module::Load;
+use Carp qw( carp );
+use Module::Load qw( load );
 use String::Random;
 
 use constant {
index 76d65c8..ac2ccbc 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 
-use C4::Auth qw(:DEFAULT check_cookie_auth);
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetBiblioData );
 use C4::Context;
-use C4::Items;
-use C4::Koha;
-use C4::Tags qw(get_tags remove_tag get_tag_rows);
-use C4::Output;
+use C4::Items qw( GetItemsInfo );
+use C4::Tags qw( get_tag_rows get_tags remove_tag );
+use C4::Output qw( output_html_with_http_headers );
 
 my $needed_flags = { tools => 'moderate_tags'
 };    # FIXME: replace when more specific permission is created.
index 866d94c..0cc157a 100755 (executable)
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Data::Dumper;
-use POSIX;
+use POSIX qw( ceil exit );
 use CGI qw ( -utf8 );
 use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
-use URI::Escape;
-use C4::Auth qw(:DEFAULT check_cookie_auth);
+use URI::Escape qw( uri_escape_utf8 );
+use C4::Auth qw( check_cookie_auth get_template_and_user );
 use C4::Context;
-use Koha::DateUtils;
-# use C4::Koha;
-use C4::Output qw(:html :ajax pagination_bar);
-use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved);
+use Koha::DateUtils qw( dt_from_string output_pref );
+use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
+use C4::Tags qw(
+    approval_counts
+    blacklist
+    get_approval_rows
+    is_approved
+    whitelist
+);
 
 my $script_name = "/cgi-bin/koha/tags/review.pl";
 my $needed_flags = { tools => 'moderate_tags' };    # FIXME: replace when more specific permission is created.
index 5ead581..8a1c1ad 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI;
 use C4::Context;
-use C4::Output;
-use C4::Koha;
-use File::stat qw(stat);
-use Digest::MD5 qw(md5_hex);
-use Encode;
+use C4::Output qw( output_html_with_http_headers );
+use File::stat qw( stat );
+use Digest::MD5 qw( md5_hex );
+use Encode qw( decode );
 
 my $input = CGI->new;
 my $file_id = $input->param("id");
index 72175cf..a8c8c9d 100755 (executable)
@@ -2,7 +2,7 @@
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( check_api_auth );
 use C4::Items qw( ModDateLastSeen );
 
 my $input = CGI->new;
index ae9bcec..3693f31 100755 (executable)
@@ -32,12 +32,11 @@ This script allows a user to update the new status for items.
 use Modern::Perl;
 
 use CGI;
-use JSON qw( to_json from_json );
+use JSON qw( to_json );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Items;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Koha;
 
 use Koha::Items;
index 625389f..e9e914d 100755 (executable)
 use Modern::Perl;
 
 # standard or CPAN modules used
-use IO::File;
 use CGI qw ( -utf8 );
 use CGI::Session;
 use C4::Context;
-use C4::Auth qw/check_cookie_auth/;
+use C4::Auth qw( check_cookie_auth );
 use C4::BackgroundJob;
 use CGI::Cookie; # need to check cookies before
                  # having CGI parse the POST request
index 6354d3b..63e22fc 100755 (executable)
 
 use CGI qw ( -utf8 );
 use Modern::Perl;
-use Try::Tiny;
-
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::Circulation;
+use Try::Tiny qw( catch try );
+
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Biblio qw(
+    DelBiblio
+    GetAuthorisedValueDesc
+    GetMarcFromKohaField
+    GetMarcStructure
+    IsMarcStructureInternal
+    TransformHtmlToXml
+);
+use C4::Items qw( GetItemsInfo Item2Marc ModItemFromMarc );
+use C4::Circulation qw( LostItem IsItemIssued );
 use C4::Context;
 use C4::Koha;
 use C4::BackgroundJob;
-use C4::ClassSource;
-use C4::Members;
+use C4::ClassSource qw( GetClassSources GetClassSource );
 use MARC::File::XML;
-use List::MoreUtils qw/uniq/;
+use List::MoreUtils qw( uniq );
 
 use Koha::Database;
 use Koha::Exceptions::Exception;
 use Koha::AuthorisedValues;
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Items;
 use Koha::ItemTypes;
 use Koha::Patrons;
index ea87d8b..2ec14ef 100755 (executable)
@@ -23,10 +23,10 @@ use Modern::Perl;
 use CGI;
 use List::MoreUtils qw( uniq );
 
-use C4::Auth;
-use C4::Output;
-use C4::AuthoritiesMarc;
-use C4::Biblio;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcBiblio );
 use Koha::Virtualshelves;
 
 use Koha::Authorities;
index d118120..31231e7 100755 (executable)
@@ -22,14 +22,15 @@ use Modern::Perl;
 
 use CGI;
 use List::MoreUtils qw( uniq );
-use JSON qw( encode_json );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
 use C4::Auth qw( get_template_and_user );
 use C4::Output qw( output_html_with_http_headers );
-use C4::AuthoritiesMarc qw( BuildSummary ModAuthority );
-use C4::Biblio qw( GetMarcBiblio ModBiblio );
-use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates );
+use C4::Auth qw( get_template_and_user );
+use C4::MarcModificationTemplates qw(
+    GetModificationTemplateActions
+    GetModificationTemplates
+);
 
 use Koha::Biblios;
 use Koha::BackgroundJob::BatchUpdateBiblio;
index 4ddb0f5..1085348 100755 (executable)
@@ -32,12 +32,11 @@ the records from an import batch.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use JSON qw/ to_json /;
+use JSON qw( to_json );
 
 use C4::Context;
-use C4::Charset;
-use C4::Auth qw/check_cookie_auth/;
-use C4::ImportBatch;
+use C4::Auth qw( check_cookie_auth );
+use C4::ImportBatch qw( GetImportBatch GetImportRecordsRange GetImportRecordMatches );
 
 my $input = CGI->new;
 
index 1afc3f9..add68a2 100755 (executable)
@@ -34,16 +34,13 @@ This script allows to do 2 things.
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Members;
-use C4::Circulation;    # AnonymiseIssueHistory.
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Members qw( GetBorrowersToExpunge );
 use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patron::Categories;
 use Koha::Patrons;
-use Date::Calc qw/Today Add_Delta_YM/;
-use Koha::Patrons;
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 
 my $cgi = CGI->new;
 
index e11353a..381f9e7 100755 (executable)
@@ -21,7 +21,7 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use C4::Output;
 
 
index cf4012f..2883f71 100755 (executable)
@@ -37,11 +37,10 @@ This script allow the user to define a new profile for CSV export
 use Modern::Perl;
 use Encode;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Koha;
 use Koha::CsvProfiles;
 
 my $input            = CGI->new;
index 6894074..a96b1d0 100755 (executable)
@@ -4,12 +4,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use C4::Output;
 use DateTime;
 
 use C4::Calendar;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 
 my $input = CGI->new;
 my $dbh = C4::Context->dbh();
index 588f1b9..7b96861 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use MARC::File::XML;
-use List::MoreUtils qw(uniq);
-use C4::Auth;
-use C4::Output;
+use List::MoreUtils qw( uniq );
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Authority::Types;
 use Koha::Biblioitems;
 use Koha::CsvProfiles;
 use Koha::Database;
-use Koha::DateUtils qw( dt_from_string output_pref );
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Exporter::Record;
 use Koha::ItemTypes;
 use Koha::Libraries;
index 3b7e93d..ddf45db 100755 (executable)
@@ -20,11 +20,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 
 use C4::Calendar;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input = CGI->new;
 
index 9d9eedf..949f402 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
 use C4::Templates;
 use Koha::Patrons;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Token;
 use Koha::Libraries;
 use Koha::Patron::Categories;
 use Koha::Patron::Attribute::Types;
-use Koha::List::Patron;
+use Koha::List::Patron qw( AddPatronList AddPatronsToList );
 
 use Koha::Patrons::Import;
 my $Import = Koha::Patrons::Import->new();
index 2ad5452..5eac6e4 100755 (executable)
@@ -26,18 +26,17 @@ my $input = CGI->new;
 my $uploadbarcodes = $input->param('uploadbarcodes');
 my $barcodelist = $input->param('barcodelist');
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Biblio;
-use C4::Items;
-use C4::Koha;
-use C4::Circulation;
-use C4::Reports::Guided;    #_get_column_defs
-use C4::Charset;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Items qw( GetItemsForInventory );
+use C4::Koha qw( GetAuthorisedValues );
+use C4::Circulation qw( AddReturn );
+use C4::Reports::Guided qw( );
+use C4::Charset qw( NormalizeString );
 
 use Koha::Biblios;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::AuthorisedValues;
 use Koha::BiblioFrameworks;
 use Koha::ClassSources;
@@ -371,7 +370,7 @@ $template->param(
 
 # Export to csv
 if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
-    eval {use Text::CSV};
+    eval {use Text::CSV ();};
     my $csv = Text::CSV->new or
             die Text::CSV->error_diag ();
     binmode STDOUT, ":encoding(UTF-8)";
index 65f560a..cfc8066 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Languages qw(getTranslatedLanguages);
-use Date::Calc qw/Date_to_Days Today/;
-use Koha::DateUtils;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Languages qw( getTranslatedLanguages );
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::News;
 
 my $cgi = CGI->new;
index 3ed44c3..b913d0e 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
-use C4::Letters;
-use C4::Log;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Letters qw( GetMessageTransportTypes );
+use C4::Log qw( logaction );
 
 use Koha::Notice::Templates;
 use Koha::Patron::Attribute::Types;
index 8fcea16..ef0bd36 100755 (executable)
@@ -27,11 +27,9 @@ use MARC::File::USMARC;
 # Koha modules used
 use C4::Context;
 use C4::Koha;
-use C4::Auth;
-use C4::AuthoritiesMarc;
-use C4::Output;
-use C4::Biblio;
-use C4::ImportBatch;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::ImportBatch qw( CleanBatch DeleteBatch GetImportBatch GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates SetImportBatchMatcher GetItemNumbersFromImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches BatchCommitRecords BatchRevertRecords );
 use C4::Matcher;
 use C4::BackgroundJob;
 use C4::Labels::Batch;
index ffe5784..b802d50 100755 (executable)
@@ -20,10 +20,18 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
-use C4::Koha;
-use C4::Output;
-use C4::MarcModificationTemplates;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::MarcModificationTemplates qw(
+    AddModificationTemplate
+    AddModificationTemplateAction
+    DelModificationTemplate
+    DelModificationTemplateAction
+    GetModificationTemplateActions
+    GetModificationTemplates
+    ModModificationTemplateAction
+    MoveModificationTemplateAction
+);
 
 my $cgi = CGI->new;
 
index ee89684..a12c81d 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
+use C4::Koha qw( GetAuthorisedValues );
 use C4::Members;
-use C4::Output;
-use List::MoreUtils qw /any uniq/;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::DateUtils qw( dt_from_string );
-use Koha::List::Patron;
+use Koha::List::Patron qw( GetPatronLists );
 use Koha::Libraries;
 use Koha::Patron::Categories;
-use Koha::Patron::Debarments;
+use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
 use Koha::Patrons;
 
 my $input = CGI->new;
index c402dfd..b07079d 100755 (executable)
@@ -21,12 +21,12 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth;
+use C4::Auth qw( checkauth );
 use C4::Output;
 
 use C4::Calendar;
 use DateTime;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 
 my $input               = CGI->new;
 my $dbh                 = C4::Context->dbh();
index b7860d8..5cab5a8 100755 (executable)
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Koha;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use C4::Letters;
 use C4::Members;
-use C4::Overdues;
+use C4::Overdues qw( GetOverdueMessageTransportTypes );
 use Koha::Libraries;
 
 use Koha::Patron::Categories;
index 868149e..c708f7f 100755 (executable)
 use Modern::Perl;
 
 use File::Temp;
-use File::Copy;
 use CGI qw ( -utf8 );
 use GD;
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_and_exit output_html_with_http_headers );
 use C4::Members;
 
 use Koha::Logger;
index 0b07511..31a3671 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Context;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 use Koha::ProblemReports;
 
 my $query = CGI->new;
index 28ef9ce..6efb6da 100755 (executable)
@@ -22,10 +22,9 @@ use Modern::Perl;
 use CGI qw ( -utf8 );
 use autouse 'Data::Dumper' => qw(Dumper);
 
-use C4::Auth;
-use C4::Koha;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 my $cgi = CGI->new;
 
index f87991a..b45f55e 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Try::Tiny;
+use Try::Tiny qw( catch try );
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Quotes;
 
 my $input = CGI->new;
index b6a3953..53d4b64 100755 (executable)
 
 use Modern::Perl;
 use C4::Context;
-use C4::Scheduler;
-use C4::Reports::Guided;
-use C4::Auth;
+use C4::Scheduler qw( add_at_job get_jobs remove_at_job );
+use C4::Reports::Guided qw( get_saved_reports );
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
-use C4::Output;
-use Koha::DateUtils;;
+use C4::Output qw( output_html_with_http_headers );
+use Koha::DateUtils qw( dt_from_string output_pref );;
 
 my $input = CGI->new;
 my $base;
index 57da80e..c879433 100755 (executable)
@@ -26,11 +26,11 @@ use CGI qw(:standard -utf8);
 
 # Koha modules used
 use C4::Context;
-use C4::Output;
-use C4::Auth;
-use C4::Biblio;
-use C4::AuthoritiesMarc;
-use C4::ImportBatch;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcBiblio );
+use C4::Auth qw( get_template_and_user );
+use C4::ImportBatch qw( GetRecordFromImportBiblio GetImportBiblios );
 
 use Koha::Biblios;
 
index e9afdc1..7653bc6 100755 (executable)
@@ -33,14 +33,13 @@ use MARC::File::USMARC;
 
 # Koha modules used
 use C4::Context;
-use C4::Auth;
-use C4::Output;
-use C4::Biblio;
-use C4::ImportBatch;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::ImportBatch qw( RecordsFromMARCXMLFile RecordsFromISO2709File RecordsFromMarcPlugin BatchStageMarcRecords BatchFindDuplicates SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction );
 use C4::Matcher;
 use Koha::UploadedFiles;
 use C4::BackgroundJob;
-use C4::MarcModificationTemplates;
+use C4::MarcModificationTemplates qw( GetModificationTemplates );
 use Koha::Plugins;
 use Koha::ImportBatches;
 
index 18891fa..b1d2548 100755 (executable)
 use Modern::Perl;
 use CGI;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 
 use Koha::Libraries;
 use Koha::StockRotationRotas;
 use Koha::StockRotationItems;
 use Koha::StockRotationStages;
 use Koha::Item;
-use Koha::Util::StockRotation qw(:ALL);
+use Koha::Util::StockRotation qw( get_branches get_stages move_to_next_stage toggle_indemand remove_from_stage add_items_to_rota get_barcodes_status );
 
 my $input = CGI->new;
 
index 4a4ed2c..842ae68 100755 (executable)
@@ -18,9 +18,9 @@
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Output;
-use C4::Tags qw/get_count_by_tag_status/;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
+use C4::Tags qw( get_count_by_tag_status );
 use Koha::Reviews;
 
 my $query = CGI->new;
index 84fc4a4..f55d8f1 100755 (executable)
@@ -43,13 +43,13 @@ use File::Temp;
 use CGI qw ( -utf8 );
 use GD;
 use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Biblios;
 use Koha::CoverImages;
 use Koha::Items;
 use Koha::UploadedFiles;
-use C4::Log;
+use C4::Log qw( logaction );
 
 my $input = CGI->new;
 
index 86ef2c5..7ec0fc7 100755 (executable)
@@ -23,10 +23,10 @@ use CGI qw ( -utf8 );
 use CGI::Cookie;
 use Encode;
 use JSON;
-use URI::Escape;
+use URI::Escape qw( uri_unescape );
 
 use C4::Context;
-use C4::Auth qw/check_cookie_auth haspermission/;
+use C4::Auth qw( check_cookie_auth get_session );
 use Koha::Uploader;
 
 # upload-file.pl must authenticate the user
index c01d57f..509e99b 100755 (executable)
@@ -21,8 +21,8 @@ use Modern::Perl;
 use CGI qw/-utf8/;
 use JSON;
 
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::UploadedFiles;
 
 use constant ERR_READING     => 'UPLERR_FILE_NOT_READ';
index e0b19e9..5909cb3 100755 (executable)
 
 use Modern::Perl;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use CGI qw ( -utf8 );
 use Text::CSV::Encoded;
 use C4::Context;
-use C4::Koha;
-use C4::Output;
-use C4::Items;
-use C4::Serials;
-use C4::Search;    # enabled_staff_search_views
+use C4::Output qw( output_html_with_http_headers );
+use C4::Serials qw( CountSubscriptionFromBiblionumber );
+use C4::Search qw( enabled_staff_search_views );
 
 use Koha::ActionLogs;
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string );
 use Koha::Items;
 use Koha::Patrons;
 
index 68e7da5..5c2b262 100755 (executable)
@@ -59,9 +59,8 @@ addbybiblionumber.pl
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use C4::Biblio;
-use C4::Output;
-use C4::Auth;
+use C4::Output qw( output_html_with_http_headers );
+use C4::Auth qw( get_template_and_user );
 
 use Koha::Biblios;
 use Koha::Virtualshelves;
index c6cb31f..07b2682 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw(encode);
 
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcBiblio );
+use C4::Output qw( output_html_with_http_headers );
 use C4::Record;
-use C4::Ris;
+use C4::Ris qw( marc2ris );
 
 use Koha::CsvProfiles;
 use Koha::Virtualshelves;
index f15e2c9..bc47249 100755 (executable)
 use Modern::Perl;
 
 use CGI qw ( -utf8 );
-use Encode qw( encode );
-use Carp;
-use Try::Tiny;
-
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
+use Encode;
+use Carp qw( carp );
+use Try::Tiny qw( catch try );
+
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw(
+    GetBiblioData
+    GetMarcAuthors
+    GetMarcBiblio
+    GetMarcISBN
+    GetMarcSubjects
+);
+use C4::Items qw( GetItemsInfo );
+use C4::Output qw( output_html_with_http_headers );
 use Koha::Email;
 use Koha::Virtualshelves;
 
index d233eb1..85a529e 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
-use C4::Biblio;
-use C4::Koha;
-use C4::Items;
+use C4::Auth qw( get_template_and_user );
+use C4::Biblio qw( GetMarcBiblio );
+use C4::Koha qw(
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
+use C4::Items qw( GetItemsLocationInfo );
 use C4::Members;
-use C4::Output;
+use C4::Output qw( pagination_bar output_html_with_http_headers );
 use C4::XSLT;
 
 use Koha::Biblios;
index 2bbb965..59e303a 100755 (executable)
@@ -18,7 +18,7 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
-use Getopt::Long;
+use Getopt::Long qw( GetOptions );
 use YAML::XS;
 
 my $usage = <<EOF;