summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-09 15:53:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-09 15:53:01 +0000
commit65e9c38d45f493187a15394b61aa41377aa0de5f (patch)
tree488aad3a9860ca804f13706d2a4c25297705c1ba /urpm/args.pm
parent8e87e794d346a87afb8ed3ea008f95fd17add726 (diff)
downloadurpmi-65e9c38d45f493187a15394b61aa41377aa0de5f.tar
urpmi-65e9c38d45f493187a15394b61aa41377aa0de5f.tar.gz
urpmi-65e9c38d45f493187a15394b61aa41377aa0de5f.tar.bz2
urpmi-65e9c38d45f493187a15394b61aa41377aa0de5f.tar.xz
urpmi-65e9c38d45f493187a15394b61aa41377aa0de5f.zip
use standard Exporter
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm24
1 files changed, 5 insertions, 19 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index c81942d3..4d3d971a 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -8,6 +8,10 @@ no warnings 'once';
use Getopt::Long;# 2.33;
use urpm::download;
use urpm::msg;
+use Exporter;
+
+our @ISA = 'Exporter';
+our @EXPORT = ('%options');
(our $VERSION) = q($Revision$) =~ /(\d+)/;
@@ -27,14 +31,6 @@ my $urpm;
# stores the values of the command-line options
our %options;
-sub import {
- if (@_ > 1 && $_[1] eq 'options') {
- # export the global %options hash
- no strict 'refs';
- *{caller() . '::options'} = \%options;
- }
-}
-
# used by urpmf
sub add_param_closure {
my (@tags) = @_;
@@ -49,17 +45,7 @@ my %options_spec = (
"help|h" => sub {
if (defined &::usage) { ::usage() } else { die "No help defined\n" }
},
- "no-locales" => sub {
- undef *::N;
- undef *urpm::N;
- undef *urpm::msg::N;
- undef *urpm::args::N;
- undef *urpm::cfg::N;
- undef *urpm::download::N;
- *::N = *urpm::N = *urpm::msg::N = *urpm::args::N
- = *urpm::cfg::N = *urpm::download::N
- = sub { my ($f, @p) = @_; sprintf($f, @p) };
- },
+ "no-locales" => sub { $urpm::msg::no_translation = 1 },
update => \$::update,
'media|mediums=s' => \$::media,
'excludemedia|exclude-media=s' => \$::excludemedia,