X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FCmdline.pm;h=3bd405161e54573f0fd7c8dec4c0f45d1080601c;hb=fd48f3e498442f0cbff5f3606c7c403d0566150e;hp=4a917bc73c5f88a3577947e50926e5a0983f4bc4;hpb=96f35b20267e8b1a1c846d476f27fcd330e0b018;p=debian%2Famanda diff --git a/perl/Amanda/Cmdline.pm b/perl/Amanda/Cmdline.pm index 4a917bc..3bd4051 100644 --- a/perl/Amanda/Cmdline.pm +++ b/perl/Amanda/Cmdline.pm @@ -51,6 +51,7 @@ package Amanda::Cmdline; *format_dumpspec_components = *Amanda::Cmdlinec::format_dumpspec_components; *parse_dumpspecs = *Amanda::Cmdlinec::parse_dumpspecs; +*header_matches_dumpspecs = *Amanda::Cmdlinec::header_matches_dumpspecs; ############# Class : Amanda::Cmdline::dumpspec_t ############## @@ -109,6 +110,7 @@ package Amanda::Cmdline; @EXPORT_OK = (); %EXPORT_TAGS = (); + =head1 NAME Amanda::Cmdline - utilities for handling command lines @@ -123,10 +125,6 @@ Amanda::Cmdline - utilities for handling command lines my @specs = Amanda::Cmdline::parse_dumpspecs(["host", "disk", "date"], $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP); -=head1 API STATUS - -Will change. - =head1 Amanda::Cmdline::dumpspec_t Objects =head2 Instance Variables @@ -159,24 +157,34 @@ Format the dumpspec as a string. =item C -This function returns a string representing the formatted form of the given dumpspec. This formatting -is the same as performed by C, but does not need a C. +This function returns a string representing the formatted form of the +given dumpspec. This formatting is the same as performed by +C, but does not need a C. -=item C +=item C This function parses C<@cmdline> into a list of C objects, -according to C<$flags>, which is a logical combination of zero or -more of C<$CMDLINE_PARSE_DATESTAMP> to recognize datestamps and +according to C<$flags>, which is a logical combination of zero or more +of C<$CMDLINE_PARSE_DATESTAMP> to recognize datestamps and C<$CMDLINE_PARSE_LEVEL> to recognize levels. +=item C + +This function compares a header to a list of dumpspecs, returning true if the +header matches at least one dumpspec. If C<@dumpspecs> is empty, the function +returns false. + =back =head1 SEE ALSO -L handles C<-o> options itself, through C. +L handles C<-o> options itself, through +C. =cut + + push @EXPORT_OK, qw(cmdline_parse_dumpspecs_flags_to_strings); push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw(cmdline_parse_dumpspecs_flags_to_strings); @@ -217,4 +225,6 @@ push @EXPORT_OK, qw($CMDLINE_EMPTY_TO_WILDCARD); push @{$EXPORT_TAGS{"cmdline_parse_dumpspecs_flags"}}, qw($CMDLINE_EMPTY_TO_WILDCARD); $_cmdline_parse_dumpspecs_flags_VALUES{"CMDLINE_EMPTY_TO_WILDCARD"} = $CMDLINE_EMPTY_TO_WILDCARD; + +push @EXPORT_OK, qw(header_matches_dumpspecs); 1;