X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FConfig.swg;h=06f35641ce2792210fae03484f425b775a95753b;hb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;hp=6573f1b52570568e75ace46f255632fbc381d979;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/perl/Amanda/Config.swg b/perl/Amanda/Config.swg index 6573f1b..06f3564 100644 --- a/perl/Amanda/Config.swg +++ b/perl/Amanda/Config.swg @@ -14,8 +14,8 @@ * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120 - * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com + * Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300 + * Sunnyvale, CA 94086, USA, or: http://www.zmanda.com */ %module "Amanda::Config" @@ -40,7 +40,7 @@ Amanda::Config - access to Amanda configuration parameters print "tape device is ", getconf($CNF_TAPEDEV), "\n"; -This API closely parallels the C API. See L for details +This API closely parallels the C API. See F for details on the functions and constants available here. =head1 API STATUS @@ -77,9 +77,6 @@ is loaded. =item If C is given, then any existing configuration is not reset. -=item If C is given, then any errors are considered -fatal, and C does not return. - =back See C for more detailed information on these flags and @@ -94,11 +91,24 @@ and filename (C) are available from C, C, and C, respectively. +=head3 CONFIG ERRORS + +This module collects configuration errors and warnings in a list, and also +tracks the overall error level with an enumeration: C<$CFGERR_OK>, +C<$CFGERR_WARNINGS>, and C<$CFGERR_ERRORS>. C and +C both return the current level. The level and the +list of error messages are available from C: + + my ($cfgerr_level, @errors) = Amanda::Configconfig_errors(); + +As a convenience, C will print all error messages to +stderr. The error state can be cleared with C. + =head2 CONFIG OVERWRITES Most Amanda applications accept the command-line option C<-o> to "overwrite" configuration values in C. In Perl -applications, these options should be parsed with L, with +applications, these options should be parsed with L, with the action being a call to C. For example: my $config_overwrites = new_config_overwrites($#ARGV+1); @@ -150,17 +160,23 @@ Each subsection type has the following functions: =over -=item C, which returns an opaque object +=item C + +which returns an opaque object (C<$ss>) representing the subsection, or C if no subsection with that name exists; -=item C, returning the name of the subsection; +=item C + +returning the name of the subsection; -=item C, which fetches a parameter value from -C<$ss>; and +=item C -=item C, which returns a true value if <$cnf> -was seen in the subsection. +which fetches a parameter value from C<$ss>; and + +=item C + +which returns a true value if <$cnf> was seen in the subsection. =back @@ -168,22 +184,52 @@ The subsections are: =over -=item C, with constants beginning with C<$TAPETYPE_>, +=item C + +with constants beginning with C<$TAPETYPE_> + +=item C + +with constants beginning with C<$DUMPTYPE_> + +=item C -=item C, with constants beginning with C<$DUMPTYPE_>, +with constants beginning with C<$INTER_> -=item C, with constants beginning with C<$INTER_>, and +=item C -=item C, with constants beginning with C<$HOLDING_>. +with constants beginning with C<$HOLDING_> + +=item C + +with constants beginning with C<$APPLICATION_> + +=item C