From c0deb8c50868dadfcbffa77b9a04dac2f494a9c9 Mon Sep 17 00:00:00 2001 From: rjray Date: Tue, 8 Aug 2000 07:02:06 +0000 Subject: [PATCH] Covered some changes not yet reflected in the documentation. CVS patchset: 4038 CVS date: 2000/08/08 07:02:06 --- Perl-RPM/RPM/Header.pm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Perl-RPM/RPM/Header.pm b/Perl-RPM/RPM/Header.pm index ad8839f..3942706 100644 --- a/Perl-RPM/RPM/Header.pm +++ b/Perl-RPM/RPM/Header.pm @@ -5,7 +5,7 @@ # ############################################################################### # -# $Id: Header.pm,v 1.8 2000/08/02 08:05:00 rjray Exp $ +# $Id: Header.pm,v 1.9 2000/08/08 07:02:06 rjray Exp $ # # Description: The RPM::Header class provides access to the RPM Header # structure as a tied hash, allowing direct access to the @@ -35,7 +35,7 @@ use RPM::Error; use RPM::Constants ':rpmerr'; $VERSION = '0.27'; -$revision = do { my @r=(q$Revision: 1.8 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r }; +$revision = do { my @r=(q$Revision: 1.9 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r }; 1; @@ -115,13 +115,16 @@ them via C or C returns the tags in the order in which they appear in the header. Keys may be requested without regard for letter case, but they are always returned as all upper-case. -The return value corresponding to each key is a list reference (or C -if the key is not valid). This is due to the fact that any of the tags may -have more than one piece of data associated, and the C interface to -hashes presumes scalar calling context and return value. Thus, rather than -require developers to frequently test the return value as a reference or -not, the value is simple always returned as a list ref, even if there is only -one element. +The return value corresponding to each key is a list reference or scalar +(or C if the key is not valid), depending on the data-type of the +key. Each of the header tags are noted with one of C<$> or C<@> in the +B documentation. The C keyword should be used +for testing success versus failure, as empty tags are possible. See the +C test, below. + +This is a significant change from versions prior to 0.27, in which the +return value was always a list reference. This new approach brings +B more in line with other interfaces to B header information. B objects are also the native return value from keys retrieved in the B class (see L). In these cases, the @@ -237,8 +240,6 @@ stored within the header. =back -=back - =item NVR The commonly-needed data triple of (B, B, B) may be @@ -256,6 +257,8 @@ established behavior of other comparison operators (C and C=E>); passed argument. A value of 1 indicates that the calling object is greater, or newer, than the argument. A value of 0 indicates that they are equal. +=back + =head1 DIAGNOSTICS Direct binding to the internal error-management of B is still under @@ -269,7 +272,7 @@ subject to change in future releases. =head1 SEE ALSO -L, L, L, L +L, L, L, L, L =head1 AUTHOR -- 2.7.4