my ( $class, $params ) = @_;
my $self = {};
$self->{biblionumber} = $params->{biblionumber};
$self->{biblionumber} = $params->{biblionumber} =~ s/\D//gr;
# just in case biblionumber obtained from CGI and passed directly here contains a weird characters like space
bless $self, $class;
return $self;
my $biblio;
if ($biblionumber){
$biblio = Koha::Biblios->find($biblionumber);
# just in case $biblionumber obtained from CGI contains a weird characters like space
$biblionumber = $biblio->biblionumber if $biblio;
unless ( $biblio ) {
$biblionumber = undef;
$template->param( bib_doesnt_exist => 1 );
-