=cut
+our $_frameworkcode;
+
sub GetFrameworkCode {
my ($biblionumber) = @_;
+
+ my $frameworkcode;
+ if ( $frameworkcode = $_frameworkcode->{$biblionumber} ) {
+warn "# _frameworkcode hit $biblionumber\n";
+ return $frameworkcode;
+ }
+
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("SELECT frameworkcode FROM biblio WHERE biblionumber=?");
$sth->execute($biblionumber);
my ($frameworkcode) = $sth->fetchrow;
- return $frameworkcode;
+ return $_frameworkcode->{$biblionumber} = $frameworkcode;
}
=head2 TransformKohaToMarc