[Koha-cvs] koha/C4 Koha.pm

Antoine Farnault antoine at koha-fr.org
Thu Jul 26 17:15:09 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Changes by:	Antoine Farnault <toins>	07/07/26 15:15:09

Modified files:
	C4             : Koha.pm 

Log message:
	using 'our' instead of 'use vars' + POD fixing.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&r1=1.56&r2=1.57

Patches:
Index: Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- Koha.pm	8 Jul 2007 15:36:59 -0000	1.56
+++ Koha.pm	26 Jul 2007 15:15:08 -0000	1.57
@@ -17,19 +17,19 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Koha.pm,v 1.56 2007/07/08 15:36:59 kados Exp $
+# $Id: Koha.pm,v 1.57 2007/07/26 15:15:08 toins Exp $
 
 use strict;
 require Exporter;
 use C4::Context;
 use C4::Output;
-use vars qw($VERSION @ISA @EXPORT);
+our ($VERSION, at ISA, at EXPORT);
 
-$VERSION = do { my @v = '$Revision: 1.56 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.57 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
-C4::Koha - Perl Module containing convenience functions for Koha scripts
+    C4::Koha - Perl Module containing convenience functions for Koha scripts
 
 =head1 SYNOPSIS
 
@@ -38,7 +38,7 @@
 
 =head1 DESCRIPTION
 
-Koha.pm provides many functions for Koha scripts.
+    Koha.pm provides many functions for Koha scripts.
 
 =head1 FUNCTIONS
 
@@ -86,8 +86,8 @@
 
   $slash_date = &slashifyDate($dash_date);
 
-Takes a string of the form "DD-MM-YYYY" (or anything separated by
-dashes), converts it to the form "YYYY/MM/DD", and returns the result.
+    Takes a string of the form "DD-MM-YYYY" (or anything separated by
+    dashes), converts it to the form "YYYY/MM/DD", and returns the result.
 
 =cut
 
@@ -102,7 +102,7 @@
 
 =head2 DisplayISBN
 
-my $string = DisplayISBN( $isbn );
+    my $string = DisplayISBN( $isbn );
 
 =cut
 
@@ -173,21 +173,21 @@
 
 =head3 in PERL SCRIPT
 
-my $itemtypes = GetItemTypes;
-my @itemtypesloop;
-foreach my $thisitemtype (sort keys %$itemtypes) {
+    my $itemtypes = GetItemTypes;
+    my @itemtypesloop;
+    foreach my $thisitemtype (sort keys %$itemtypes) {
     my $selected = 1 if $thisitemtype eq $itemtype;
     my %row =(value => $thisitemtype,
                 selected => $selected,
                 description => $itemtypes->{$thisitemtype}->{'description'},
             );
     push @itemtypesloop, \%row;
-}
-$template->param(itemtypeloop => \@itemtypesloop);
+    }
+    $template->param(itemtypeloop => \@itemtypesloop);
 
 =head3 in TEMPLATE
 
-<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
+    <form action='<!-- TMPL_VAR name="script_name" -->' method=post>
     <select name="itemtype">
         <option value="">Default</option>
     <!-- TMPL_LOOP name="itemtypeloop" -->
@@ -196,8 +196,7 @@
     </select>
     <input type=text name=searchfield value="<!-- TMPL_VAR name="searchfield" -->">
     <input type="submit" value="OK" class="button">
-</form>
-
+    </form>
 
 =cut
 





More information about the Koha-cvs mailing list