koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Biblio.pm


From: Joshua Ferraro
Subject: [Koha-cvs] koha/C4 Biblio.pm
Date: Sat, 25 Feb 2006 21:02:20 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         
Changes by:     Joshua Ferraro <address@hidden> 06/02/25 21:02:20

Modified files:
        C4             : Biblio.pm 

Log message:
        Further cleanup, convering new routines to 4-chars

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?tr1=1.150&tr2=1.151&r1=text&r2=text

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.150 koha/C4/Biblio.pm:1.151
--- koha/C4/Biblio.pm:1.150     Sat Feb 25 20:49:15 2006
+++ koha/C4/Biblio.pm   Sat Feb 25 21:02:20 2006
@@ -30,7 +30,7 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.150 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.151 $' =~ /\d+/g;
                 shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 @ISA = qw(Exporter);
@@ -175,48 +175,48 @@
 
 =cut
 sub z3950_extended_services {
-        my ($Zconn,$serviceType,$serviceOptions,$record) = @_;
+       my ($Zconn,$serviceType,$serviceOptions,$record) = @_;
+        
+       # create a new package object
+       my $Zpackage = $Zconn->package();
 
-        # create a new package object
-        my $Zpackage = $Zconn->package();
+       # set our options
+       $Zpackage->option(action => $serviceOptions->{'action'});
 
-        # set our options
-        $Zpackage->option(action => $serviceOptions->{'action'});
-
-        if ($serviceOptions->{'databaseName'}) {
-                $Zpackage->option(databaseName => 
$serviceOptions->{'databaseName'});
-        }
-        if ($serviceOptions->{'recordIdNumber'}) {
-                $Zpackage->option(recordIdNumber => 
$serviceOptions->{'recordIdNumber'});
-        }
-        if ($serviceOptions->{'recordIdOpaque'}) {
-                $Zpackage->option(recordIdOpaque => 
$serviceOptions->{'recordIdOpaque'});
-        }
+       if ($serviceOptions->{'databaseName'}) {
+               $Zpackage->option(databaseName => 
$serviceOptions->{'databaseName'});
+       }
+       if ($serviceOptions->{'recordIdNumber'}) {
+               $Zpackage->option(recordIdNumber => 
$serviceOptions->{'recordIdNumber'});
+       }
+       if ($serviceOptions->{'recordIdOpaque'}) {
+               $Zpackage->option(recordIdOpaque => 
$serviceOptions->{'recordIdOpaque'});
+       }
 
-        # this is an ILL request (Zebra doesn't support it)
-        if ($serviceType eq 'itemorder') {
-           $Zpackage->option('contact-name' => 
$serviceOptions->{'contact-name'});
-           $Zpackage->option('contact-phone' => 
$serviceOptions->{'contact-phone'});
-           $Zpackage->option('contact-email' => 
$serviceOptions->{'contact-email'});
-           $Zpackage->option('itemorder-item' => 
$serviceOptions->{'itemorder-item'});
-        }
+       # this is an ILL request (Zebra doesn't support it)
+       #if ($serviceType eq 'itemorder') {
+       #   $Zpackage->option('contact-name' => 
$serviceOptions->{'contact-name'});
+       #   $Zpackage->option('contact-phone' => 
$serviceOptions->{'contact-phone'});
+       #   $Zpackage->option('contact-email' => 
$serviceOptions->{'contact-email'});
+       #   $Zpackage->option('itemorder-item' => 
$serviceOptions->{'itemorder-item'});
+       #}
 
-        if ($record) {
-          my $xmlrecord = marc2xml($record);
-           $Zpackage->option(record => $xmlrecord);
-           if ($serviceOptions->{'syntax'}) {
-              $Zpackage->option(syntax => $serviceOptions->{'syntax'});
-           }
-        }
+       if ($record) {
+               my $xmlrecord = marc2xml($record);
+               $Zpackage->option(record => $xmlrecord);
+               if ($serviceOptions->{'syntax'}) {
+                       $Zpackage->option(syntax => 
$serviceOptions->{'syntax'});
+               }
+       }
 
-        # send the request, handle any exception encountered
-        eval {  $Zpackage->send($serviceType) };
-        if ($@ && address@hidden>isa("ZOOM::Exception")) {
-                print "Oops!  ", address@hidden>message(), "\n";
-                return address@hidden>code();
-        }
-        # free up package resources
-        $Zpackage->destroy();
+       # send the request, handle any exception encountered
+       eval { $Zpackage->send($serviceType) };
+               if ($@ && address@hidden>isa("ZOOM::Exception")) {
+                       print "Oops!  ", address@hidden>message(), "\n";
+                       return address@hidden>code();
+               }
+       # free up package resources
+       $Zpackage->destroy();
 }
 
 =head2 set_service_options
@@ -244,13 +244,10 @@
        # nothing to do
 
        }
-       
-        if ($serviceType eq 'create') {
+       if ($serviceType eq 'create') {
         # nothing to do
-
-        }
-       
-       if (serviceType eq 'drop') {
+       }
+       if ($serviceType eq 'drop') {
                die "ERROR: 'drop' not currently supported (by Zebra)";
        }
        return $serviceOptions;
@@ -267,16 +264,14 @@
 =cut
 
 sub marc2xml {
-        my ($record) = @_;
-        my $xmlrecord;
-        eval {
-                $xmlrecord=$record->as_xml();
-        };
-        #TODO: better error handling here
-        if ($@){
-                warn "ERROR: I suspect a badly formatted MARC record";
-        }
-        return $xmlrecord;
+       my ($record) = @_;
+       my $xmlrecord;
+       eval { $xmlrecord=$record->as_xml() };
+       #TODO: better error handling here
+       if ($@){
+               warn "ERROR: I suspect a badly formatted MARC record";
+       }
+       return $xmlrecord;
 }
 
 =head2 @tagslib = &MARCgettagslib($dbh,1|0,$frameworkcode);
@@ -2912,8 +2907,12 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.150 2006/02/25 20:49:15 kados Exp $
+# $Id: Biblio.pm,v 1.151 2006/02/25 21:02:20 kados Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.151  2006/02/25 21:02:20  kados
+#
+# Further cleanup, convering new routines to 4-chars
+#
 # Revision 1.150  2006/02/25 20:49:15  kados
 # Better documentation, added warning if serviceType is 'drop' since it's
 # not supported in Zebra.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]