[Opensrf-commits] r1752 - in trunk/src/perl: lib/OpenSRF lib/OpenSRF/Utils t (sboyette)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Aug 25 11:45:04 EDT 2009


Author: sboyette
Date: 2009-08-25 11:45:01 -0400 (Tue, 25 Aug 2009)
New Revision: 1752

Modified:
   trunk/src/perl/lib/OpenSRF/Utils.pm
   trunk/src/perl/lib/OpenSRF/Utils/Config.pm
   trunk/src/perl/t/09-Utils.t
Log:
removed $VERSION construct which caused undef warnings when not under svn, and only occurred in 2 modules

Modified: trunk/src/perl/lib/OpenSRF/Utils/Config.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Utils/Config.pm	2009-08-25 15:04:43 UTC (rev 1751)
+++ trunk/src/perl/lib/OpenSRF/Utils/Config.pm	2009-08-25 15:45:01 UTC (rev 1752)
@@ -2,13 +2,13 @@
 
 no strict 'refs';
 
-use vars qw/@ISA $AUTOLOAD $VERSION/;
+use vars qw/@ISA $AUTOLOAD/;
 push @ISA, qw/OpenSRF::Utils/;
 
 use OpenSRF::Utils (':common');
 use Net::Domain qw/hostfqdn/;
 
-$VERSION = do { my @r=(q$Revision$=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
+our $VERSION = "1.000";
 
 my %SECTIONCACHE;
 my %SUBSECTION_FIXUP;
@@ -190,12 +190,7 @@
 =head1 METHODS
 
 
-=cut
 
-
-$VERSION = do { my @r=(q$Revision$=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
-
-
 =head2 OpenSRF::Utils::Config->load( config_file => '/some/config/file.cnf' )
 
 Returns a OpenSRF::Utils::Config object representing the config file

Modified: trunk/src/perl/lib/OpenSRF/Utils.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Utils.pm	2009-08-25 15:04:43 UTC (rev 1751)
+++ trunk/src/perl/lib/OpenSRF/Utils.pm	2009-08-25 15:45:01 UTC (rev 1752)
@@ -1,51 +1,48 @@
 package OpenSRF::Utils;
 
-=head1 NAME 
+use Time::Local;
+use Errno;
+use POSIX;
+use FileHandle;
+use Digest::MD5 qw(md5 md5_hex md5_base64);
+use Exporter;
+use DateTime;
+use DateTime::Format::ISO8601;
+use DateTime::TimeZone;
 
+=head1 NAME
+
 OpenSRF::Utils
 
-=head1 DESCRIPTION 
+=head1 DESCRIPTION
 
 This is a container package for methods that are useful to derived modules.
 It has no constructor, and is generally not useful by itself... but this
 is where most of the generic methods live.
- 
 
-=head1 METHODS 
+=head1 VERSION
 
-
 =cut
 
-use vars qw/@ISA $AUTOLOAD %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION/;
+our $VERSION = 1.000;
+
+use vars qw/@ISA $AUTOLOAD %EXPORT_TAGS @EXPORT_OK @EXPORT/;
 push @ISA, 'Exporter';
 
-$VERSION = do { my @r=(q$Revision$=~/\d+/g); sprintf "%d."."%02d"x$#r, at r };
-
-use Time::Local;
-use Errno;
-use POSIX;
-use FileHandle;
-#use Cache::FileCache;
-#use Storable qw(dclone);
-use Digest::MD5 qw(md5 md5_hex md5_base64);
-use Exporter;
-use DateTime;
-use DateTime::Format::ISO8601;
-use DateTime::TimeZone;
-
-our $date_parser = DateTime::Format::ISO8601->new;
-
-# This turns errors into warnings, so daemons don't die.
-#$Storable::forgive_me = 1;
-
 %EXPORT_TAGS = (
 	common		=> [qw(interval_to_seconds seconds_to_interval sendmail tree_filter)],
 	daemon		=> [qw(safe_fork set_psname daemonize)],
 	datetime	=> [qw(clense_ISO8601 gmtime_ISO8601 interval_to_seconds seconds_to_interval)],
 );
-
 Exporter::export_ok_tags('common','daemon','datetime');  # add aa, cc and dd to @EXPORT_OK
 
+our $date_parser = DateTime::Format::ISO8601->new;
+
+=head1 METHODS
+
+
+=cut
+
 sub AUTOLOAD {
 	my $self = shift;
 	my $type = ref($self) or return undef;

Modified: trunk/src/perl/t/09-Utils.t
===================================================================
--- trunk/src/perl/t/09-Utils.t	2009-08-25 15:04:43 UTC (rev 1751)
+++ trunk/src/perl/t/09-Utils.t	2009-08-25 15:45:01 UTC (rev 1752)
@@ -1,15 +1,7 @@
 #!perl -T
 
-use Test::More tests => 8;
+use Test::More tests => 1;
 
 BEGIN {
 	use_ok( 'OpenSRF::Utils' );
 }
-
-use_ok( 'OpenSRF::Utils::Cache' );
-use_ok( 'OpenSRF::Utils::Config' );
-use_ok( 'OpenSRF::Utils::JSON' );
-use_ok( 'OpenSRF::Utils::Logger' );
-use_ok( 'OpenSRF::Utils::LogServer' );
-use_ok( 'OpenSRF::Utils::SettingsClient' );
-use_ok( 'OpenSRF::Utils::SettingsParser' );



More information about the opensrf-commits mailing list