diff --git a/C4/Koha.pm b/C4/Koha.pm new file mode 100644 index 0000000000..96452f4b69 --- /dev/null +++ b/C4/Koha.pm @@ -0,0 +1,61 @@ +package C4::Koha; + +use strict; +require Exporter; + +use vars qw($VERSION @ISA @EXPORT); + +$VERSION = 0.01; + +@ISA = qw(Exporter); +@EXPORT = qw(&slashifyDate); + +use vars qw(); + + +sub slashifyDate { + # accepts a date of the form xx-xx-xx[xx] and returns it in the + # form xx/xx/xx[xx] + my @dateOut = split('-', shift); + return("$dateOut[2]/$dateOut[1]/$dateOut[0]") +} + + + +1; +__END__ + +=head1 NAME + +Koha - Perl Module containing convenience functions for Koha scripts + +=head1 SYNOPSIS + + use Koha; + + + $date = slashifyDate("01-01-2002") + + + +=head1 DESCRIPTION + +Koha.pm provides many functions for Koha scripts. + +slashifyDate() takes a dash separated date string and returns a slash +separated date string + +=head1 AUTHOR + +Pat Eyler, pate@gnu.org + +=head1 SEE ALSO + +perl(1). + +=cut + + + + + diff --git a/C4/Output.pm b/C4/Output.pm index bfbe8cc5c5..e16ae31a82 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -72,8 +72,7 @@ my $priv_func = sub { # make all your functions, whether exported or not; sub startpage{ - my $string="\n"; - return($string); + return("\n"); } sub gotopage{ @@ -133,13 +132,16 @@ sub endmenu{ } sub mktablehdr { - my $string="