Dpkg.pm 725 B

123456789101112131415161718192021222324252627
  1. package Dpkg;
  2. use strict;
  3. use warnings;
  4. use base qw(Exporter);
  5. our @EXPORT = qw($version $progname $admindir $dpkglibdir $pkgdatadir);
  6. our %EXPORT_TAGS = ( 'compression' =>
  7. [ qw(@comp_supported %comp_supported %comp_ext $comp_regex) ] );
  8. our @EXPORT_OK = @{$EXPORT_TAGS{compression}};
  9. our ($progname) = $0 =~ m#(?:.*/)?([^/]*)#;
  10. # The following lines are automatically fixed at install time
  11. our $version = "1.14";
  12. our $admindir = "/var/lib/dpkg";
  13. our $dpkglibdir = ".";
  14. our $pkgdatadir = "..";
  15. # Compression
  16. our @comp_supported = qw(gzip bzip2 lzma);
  17. our %comp_supported = map { $_ => 1 } @comp_supported;
  18. our %comp_ext = ( gzip => 'gz', bzip2 => 'bz2', lzma => 'lzma' );
  19. our $comp_regex = '(?:gz|bz2|lzma)';
  20. 1;