[Koha-patches] [PATCH] Bug 8890: don't try to load DB-dependent modules

Jared Camins-Esakov jcamins at cpbibliography.com
Tue Oct 16 11:20:46 CEST 2012


Both C4::Members::Statistics and Koha::Borrower::Files use the database
in their BEGIN {} blocks, which breaks the package build process. This
patch causes them to be skipped in the 00-load test.
---
 t/00-load.t |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/00-load.t b/t/00-load.t
index da9008d..748fa10 100644
--- a/t/00-load.t
+++ b/t/00-load.t
@@ -29,6 +29,7 @@ find({
 	    return if $m =~ /C4::Reports::Guided/; # DB
 	    return if $m =~ /C4::Serials/; # DB
 	    return if $m =~ /C4::VirtualShelves::Page/; # DB
+        return if $m =~ /C4::Members::Statistics/; # DB
         use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
     },
 }, $lib);
@@ -44,6 +45,7 @@ find(
             $m =~ s{^.*/Koha/}{Koha/};
             $m =~ s{/}{::}g;
             return if $m =~ /Koha::SearchEngine::/; # Koha::SearchEngine::* are experimental
+            return if $m =~ /Koha::Borrower::Files/;
             use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
         },
     },
-- 
1.7.9.5


More information about the Koha-patches mailing list