[Opensrf-commits] r1413 - branches/sboyette/src/perl/lib/OpenSRF/Utils

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 13 11:49:10 EDT 2008


Author: sboyette
Date: 2008-08-13 11:49:07 -0400 (Wed, 13 Aug 2008)
New Revision: 1413

Modified:
   branches/sboyette/src/perl/lib/OpenSRF/Utils/Config.pm
Log:
undoing unintentional makefile frobbery


Modified: branches/sboyette/src/perl/lib/OpenSRF/Utils/Config.pm
===================================================================
--- branches/sboyette/src/perl/lib/OpenSRF/Utils/Config.pm	2008-08-13 15:37:10 UTC (rev 1412)
+++ branches/sboyette/src/perl/lib/OpenSRF/Utils/Config.pm	2008-08-13 15:49:07 UTC (rev 1413)
@@ -112,7 +112,6 @@
 
 =head1 SYNOPSIS
 
- 
   use OpenSRF::Utils::Config;
 
   my $config_obj = OpenSRF::Utils::Config->load( config_file   => '/config/file.cnf' );
@@ -125,24 +124,25 @@
   print FH $config_obj;
   close FH;
 
- 
-
 =head1 DESCRIPTION
 
- 
-This module is mainly used by other OpenSRF modules to load an OpenSRF configuration file.
-OpenSRF configuration files are XML files that contain a C<< <config> >> root element and an C<< <opensrf> >>
-child element (in XPath notation, C</config/opensrf/>). Each child element is converted into a
-hash key=>value pair. Elements that contain other XML elements are pushed into arrays and added
-as an array reference to the hash. Scalar values have whitespace trimmed from the left and right
-sides.
+This module is mainly used by other OpenSRF modules to load an OpenSRF
+configuration file.  OpenSRF configuration files are XML files that
+contain a C<< <config> >> root element and an C<< <opensrf> >> child
+element (in XPath notation, C</config/opensrf/>). Each child element
+is converted into a hash key=>value pair. Elements that contain other
+XML elements are pushed into arrays and added as an array reference to
+the hash. Scalar values have whitespace trimmed from the left and
+right sides.
 
-Child elements of C<< <config> >> other than C<< <opensrf> >> are currently ignored by this module.
+Child elements of C<< <config> >> other than C<< <opensrf> >> are
+currently ignored by this module.
 
 =head1 EXAMPLE
- 
-Given an OpenSRF configuration file named F<opensrf_core.xml> with the following content:
 
+Given an OpenSRF configuration file named F<opensrf_core.xml> with the
+following content:
+
   <?xml version='1.0'?>
   <config>
     <opensrf>
@@ -153,32 +153,38 @@
 	<router>otherhost</router>
       </routers>
 
-      <logfile>LOCALSTATEDIR/log/osrfsys.log</logfile>
+      <logfile>/var/log/osrfsys.log</logfile>
     </opensrf>
   </config>
 
-... calling C<< OpenSRF::Utils::Config->load(config_file => 'opensrf_core.xml') >> will create a hash
-with the following structure:
+... calling C<< OpenSRF::Utils::Config->load(config_file =>
+'opensrf_core.xml') >> will create a hash with the following
+structure:
 
   {
     router_name => 'router',
     routers => ['localhost', 'otherhost'],
-    logfile => 'LOCALSTATEDIR/log/osrfsys.log'
+    logfile => '/var/log/osrfsys.log'
   }
 
-You can retrieve any of these values by name from the bootstrap section of C<$config_obj>; for example:
+You can retrieve any of these values by name from the bootstrap
+section of C<$config_obj>; for example:
 
   $config_obj->bootstrap->router_name
 
 =head1 NOTES
 
-For compatibility with a previous version of OpenSRF configuration files, the F</config/opensrf/> section
-has a hardcoded name of B<bootstrap>. However, future iterations of this module may extend the ability
-of the module to parse the entire OpenSRF configuration file and provide sections named after the sibling
-elements of C</config/opensrf>.
+For compatibility with a previous version of OpenSRF configuration
+files, the F</config/opensrf/> section has a hardcoded name of
+B<bootstrap>. However, future iterations of this module may extend the
+ability of the module to parse the entire OpenSRF configuration file
+and provide sections named after the sibling elements of
+C</config/opensrf>.
 
-Hashrefs of sections can be returned by calling a method of the object of the same name as the section.
-They can be set by passing a hashref back to the same method.  Sections will B<NOT> be autovivicated, though.
+Hashrefs of sections can be returned by calling a method of the object
+of the same name as the section.  They can be set by passing a hashref
+back to the same method.  Sections will B<NOT> be autovivicated,
+though.
 
 
 =head1 METHODS
@@ -192,11 +198,11 @@
 
 =head2 OpenSRF::Utils::Config->load( config_file => '/some/config/file.cnf' )
 
-Returns a OpenSRF::Utils::Config object representing the config file that was loaded.
-The most recently loaded config file (hopefully the only one per app)
-is stored at $OpenSRF::Utils::ConfigCache. Use OpenSRF::Utils::Config::current() to get at it.
+Returns a OpenSRF::Utils::Config object representing the config file
+that was loaded.  The most recently loaded config file (hopefully the
+only one per app) is stored at $OpenSRF::Utils::ConfigCache. Use
+OpenSRF::Utils::Config::current() to get at it.
 
-
 =cut
 
 sub load {



More information about the opensrf-commits mailing list