summaryrefslogtreecommitdiffstats
path: root/perl-install/c.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/c.pm')
-rw-r--r--perl-install/c.pm25
1 files changed, 19 insertions, 6 deletions
diff --git a/perl-install/c.pm b/perl-install/c.pm
index e2cfe0428..d1da19f2d 100644
--- a/perl-install/c.pm
+++ b/perl-install/c.pm
@@ -1,12 +1,25 @@
package c;
-use vars qw($AUTOLOAD);
+use strict;
+use vars qw($VERSION @ISA);
-use c::stuff;
+require DynaLoader;
-sub AUTOLOAD {
- $AUTOLOAD =~ /::(.*)/;
- goto &{$c::stuff::{$1}};
-}
+@ISA = qw(DynaLoader);
+$VERSION = '0.01';
+
+bootstrap c $VERSION;
1;
+
+sub headerGetEntry {
+ my ($h, $q) = @_;
+
+ $q eq 'name' and return headerGetEntry_string($h, RPMTAG_NAME());
+ $q eq 'group' and return headerGetEntry_string($h, RPMTAG_GROUP());
+ $q eq 'version' and return headerGetEntry_string($h, RPMTAG_VERSION());
+ $q eq 'release' and return headerGetEntry_string($h, RPMTAG_RELEASE());
+ $q eq 'arch' and return headerGetEntry_string($h, RPMTAG_ARCH());
+ $q eq 'size' and return headerGetEntry_int($h, RPMTAG_SIZE());
+}
+