 009b-bug17941-purefunctions.patch
+
 This patch adds Koha::Util::PureFunctions
+
 PureFunctions adds a HashMap function attribute that will work as a Cached Index for
 stable, idempotent Getter functions that will greatly improve the speed of Koha in
 places where same function is called many times and produces many Mysql requests
+
 diff --git a/C4/Biblio.pm b/C4/Biblio.pm
 index 6d0c9bb..6569414 100644
 --- a/C4/Biblio.pm
 +++ b/C4/Biblio.pm
 @@ -50,9 +50,9 @@ use vars qw(@ISA @EXPORT);
  use vars qw($debug $cgi_debug);
+
  BEGIN {
 -
 +    require Koha::Util::PureFunctions;
      require Exporter;
 -    @ISA = qw( Exporter );
 +    @ISA = qw( Koha::Util::PureFunctions Exporter );
+
      # to add biblios
      # EXPORTED FUNCTIONS.
 @@ -761,7 +761,7 @@ the first one is considered.
- =cut
+
+ =cut
+
 -sub GetBiblioData {
 +sub GetBiblioData : PureFunction {
      my ($bibnum) = @_;
      my $dbh = C4::Context->dbh;
+
 @@ -860,7 +860,7 @@ database.
  =cut
+
  #'
 -sub GetBiblioFromItemNumber {
 +sub GetBiblioFromItemNumber : PureFunction {

+
     enable "ReverseProxy";
     enable "Plack::Middleware::Static";
     # + is required so Plack doesn't try to prefix Plack::Middleware::
--- a/C4/Members.pm
+++ b/C4/Members.pm
@@ -56,8 +56,9 @@ if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) {

 BEGIN {
     $debug = $ENV{DEBUG} || 0;
+    require Koha::Util::PureFunctions;
