summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
be7b993)
* Only export when asked to export
* Use the proper configuration items, instead of assuming that
they're in the debbugs package.
package Debbugs::Packages;
package Debbugs::Packages;
use strict;
use Debbugs::Config qw(:config :globals);
use strict;
use Debbugs::Config qw(:config :globals);
-use Exporter ();
-use vars qw($VERSION @ISA @EXPORT);
+use base qw(Exporter);
+use vars qw($VERSION @EXPORT_OK %EXPORT_TAGS @EXPORT);
- @ISA = qw(Exporter);
- @EXPORT = qw(getpkgsrc getpkgcomponent getsrcpkgs
- binarytosource sourcetobinary getversions);
+ @EXPORT = ();
+ %EXPORT_TAGS = (versions => [qw(getverions)],
+ mapping => [qw(getpkgsrc getpkgcomponent getsrcpkgs),
+ qw(binarytosource sourcetobinary)
+ ],
+ );
+ @EXPORT_OK = ();
+ Exporter::export_ok_tags(qw(versions mapping));
+ $EXPORT_TAGS{all} = [@EXPORT_OK];
}
use Fcntl qw(O_RDONLY);
}
use Fcntl qw(O_RDONLY);
my %_versions;
sub getversions {
my ($pkg, $dist, $arch) = @_;
my %_versions;
sub getversions {
my ($pkg, $dist, $arch) = @_;
- return () unless defined $debbugs::gVersionIndex;
+ return () unless defined $gVersionIndex;
$dist = 'unstable' unless defined $dist;
unless (tied %_versions) {
$dist = 'unstable' unless defined $dist;
unless (tied %_versions) {
- tie %_versions, 'MLDBM', $debbugs::gVersionIndex, O_RDONLY
+ tie %_versions, 'MLDBM', $gVersionIndex, O_RDONLY
or die "can't open versions index: $!";
}
or die "can't open versions index: $!";
}