diff options
author | Denis Barbier <barbier> | 2001-12-05 01:47:49 +0000 |
---|---|---|
committer | Denis Barbier <barbier> | 2001-12-05 01:47:49 +0000 |
commit | a80c764aa4c8b9b3165f5cf0ba950b696c1af740 (patch) | |
tree | 3c8076e8b0554e6c2bde0aae1b1b01454adff41b /Perl/Webwml | |
parent | b11bbb92124cfe59baae808f6dd57c9948da69f0 (diff) |
Remove useless `Warnings´ category.
A non-existing field now returns an empty array instead of undef (for
array values).
CVS version numbers
Perl/Webwml/L10n/Db.pm: 1.6 -> 1.7
Diffstat (limited to 'Perl/Webwml')
-rw-r--r-- | Perl/Webwml/L10n/Db.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Perl/Webwml/L10n/Db.pm b/Perl/Webwml/L10n/Db.pm index 75fbad19431..dfbeb977546 100644 --- a/Perl/Webwml/L10n/Db.pm +++ b/Perl/Webwml/L10n/Db.pm @@ -55,7 +55,7 @@ sub new { # Fields below are written into file in the same order # Package must always be the first field scalar => [qw(Package Version Section Priority PoolDir Type Upstream)], - array1 => [qw(Errors Warnings Catgets Gettext)], + array1 => [qw(Errors Catgets Gettext)], array2 => [qw(NLS PO TEMPLATES MENU)], }; $self->{methods} = {}; @@ -109,6 +109,9 @@ sub AUTOLOAD { return defined($self->{data}->{$pkg}->{$field}); } else { if ($#_ == -1) { + if ($self->{fields}->{$field} =~ m/@/) { + return $self->{data}->{$pkg}->{$field} || []; + } return $self->{data}->{$pkg}->{$field}; } if ($self->{fields}->{$field} eq '$') { @@ -297,7 +300,7 @@ sub get_date { Data about packages can be classified within scalar values (C<package>, C<version>, C<section>, C<priority>, C<pooldir>, C<type>, C<upstream>), -arrays (C<errors>, C<warnings>, C<catgets>, C<gettext>), and arrays of +arrays (C<errors>, C<catgets>, C<gettext>), and arrays of arrays (C<nls>, C<po>, C<templates>, C<menu>). Each field has a method with the same name to get and set it, e.g. |