Update of /cvsroot/mhonarc/mharc/lib/MHArc
In directory subversions:/tmp/cvs-serv481/lib/MHArc
Modified Files:
ListDef.pm
Log Message:
* [bug #4319]: Fixed mainly in MHArc::ListDef to remember order
definitions are read. Added get_names method to allow scripts
to retrieve archives in the order defined.
* lib/common.mrc.in.dist,
lib/mrc/_lang_en.mrc:
. Changed the value of BOOKMARK-LINK-LABEL custom resource variable
to "Permanent Link". This appears to be more descriptive
and less ambiguous than "Bookmark Link".
* bin/web-archive:
. Added support for the following lists.def options:
All-Lists-Name: Archive name to use in all-lists index
Language: Language of archive
Hide-From-All-Lists: Do not list archive in all-lists index
See the mk-procmailrc manpage for more information about these
options.
* bin/mk-procmailrc:
. Archives can now be defined solely by Procmail-Condition, without
the requirement of defining an Address or From-Address option.
This provides the greatest flexibility.
Index: ListDef.pm
===================================================================
RCS file: /cvsroot/mhonarc/mharc/lib/MHArc/ListDef.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** ListDef.pm 13 Sep 2002 07:24:18 -0000 1.4
--- ListDef.pm 16 Jul 2003 00:49:58 -0000 1.5
***************
*** 24,27 ****
--- 24,29 ----
package MHArc::ListDef;
+ sub _DEF_ORDER() { return '-X-DEF-ORDER-'; }
+
sub new {
my $self = { };
***************
*** 31,34 ****
--- 33,37 ----
bless $self, $class;
+ $self->{_DEF_ORDER} = [ ];
$self->load_file($fh);
}
***************
*** 62,65 ****
--- 65,70 ----
$value =~ s/\s//g;
$name = $value;
+ push(@{$self->{_DEF_ORDER}}, $name);
+ $self->{$name}{'name'} = [ $name ];
next;
}
***************
*** 83,86 ****
--- 88,96 ----
}
+ sub get_names {
+ my $self = shift;
+ @{$self->{_DEF_ORDER}};
+ }
+
1;
__END__
***************
*** 94,97 ****
--- 104,113 ----
$def = MHArc::ListDef->new($fh);
$def = MHArc::ListDef->new($filename);
+
+ # Return list of names in order defined
+ @names = $def->get_names;
+
+ # Access an option
+ $description = $def->{$name}{'description'}[0];
=head1 DESCRIPTION
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV