use Business::ISBN;
use Business::ISSN;
use autouse 'Data::cselectall_arrayref' => qw(Dumper);
-use vars qw(@ISA @EXPORT @EXPORT_OK $DEBUG);
+our (@ISA, @EXPORT_OK);
BEGIN {
- require Exporter;
- @ISA = qw(Exporter);
- @EXPORT = qw(
- &GetItemTypesCategorized
- &getallthemes
- &getFacets
- &getnbpages
- &getitemtypeimagedir
- &getitemtypeimagesrc
- &getitemtypeimagelocation
- &GetAuthorisedValues
- &GetNormalizedUPC
- &GetNormalizedISBN
- &GetNormalizedEAN
- &GetNormalizedOCLCNumber
- &xml_escape
-
- &GetVariationsOfISBN
- &GetVariationsOfISBNs
- &NormalizeISBN
- &GetVariationsOfISSN
- &GetVariationsOfISSNs
- &NormalizeISSN
-
- $DEBUG
- );
- $DEBUG = 0;
+ require Exporter;
+ @ISA = qw(Exporter);
+ @EXPORT_OK = qw(
+ GetItemTypesCategorized
+ getallthemes
+ getFacets
+ getImageSets
+ getnbpages
+ getitemtypeimagedir
+ getitemtypeimagesrc
+ getitemtypeimagelocation
+ GetAuthorisedValues
+ GetNormalizedUPC
+ GetNormalizedISBN
+ GetNormalizedEAN
+ GetNormalizedOCLCNumber
+ xml_escape
+
+ GetVariationsOfISBN
+ GetVariationsOfISBNs
+ NormalizeISBN
+ GetVariationsOfISSN
+ GetVariationsOfISSNs
+ NormalizeISSN
+
+ );
}
=head1 NAME
my @imagesets = (); # list of hasrefs of image set data to pass to template
my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
foreach my $imagesubdir ( @subdirectories ) {
- warn $imagesubdir if $DEBUG;
my @imagelist = (); # hashrefs of image info
my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
my $imagesetactive = 0;
=cut
sub GetAuthorisedValues {
- my ( $category, $opac ) = @_;
+ my $category = shift // ''; # optional parameter
+ my $opac = shift ? 1 : 0; # normalise to be safe
# Is this cached already?
- $opac = $opac ? 1 : 0; # normalise to be safe
my $branch_limit =
C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
my $cache_key =