From c83300030889d4a917e821537149dbbcfa07f55c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 18 Mar 2016 13:31:27 +0000 Subject: [PATCH] [PASSED QA] Bug 16104: Remove warnings "used only once: possible typo" Since bug 11998, the following warnings are raised: Name "Tie::Hash::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::LRU::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. Name "Cache::RemovalStrategy::FIELDS" used only once: possible typo at /usr/share/perl/5.22/fields.pm line 135. It comes from the Koha::Cache 103 if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { Test plan: perl -wc C4/AuthoritiesMarc.pm should return green QA note: this may have an impact on performance but I have not found any other workarounds. NOTE: I applied 15870 to master, got the error (-v 2 -c 5), applied 16104, rebased it in front, error disappeared (still only -c 5), rebased it at the end, and signed off 16104. Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer --- Koha/Cache.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Cache.pm b/Koha/Cache.pm index 8370d3e..4e45180 100644 --- a/Koha/Cache.pm +++ b/Koha/Cache.pm @@ -103,7 +103,7 @@ sub new { } } - if ( can_load( modules => { 'Cache::Memory' => undef } ) ) { + if ( can_load( modules => { 'Cache::Memory' => undef, nocache => 1 } ) ) { _initialize_memory($self); if ( $self->{'default_type'} eq 'memory' && defined( $self->{'memory_cache'} ) ) -- 1.9.1