diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-01-03 15:41:30 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-01-03 15:41:30 +0000 |
commit | c2dda5abbae0ef821d2d8c93e2cf90972279f1f8 (patch) | |
tree | d309965399fedd8fdd6c09c6a74e8d21ba98a7ac /perl-install/wizards.pm | |
parent | be98e2d67ccfcb58c1c114bf6054b8dcb00250b0 (diff) | |
download | drakx-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar drakx-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar.gz drakx-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar.bz2 drakx-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.tar.xz drakx-c2dda5abbae0ef821d2d8c93e2cf90972279f1f8.zip |
don't have a useless empty hash in wizards objects, use the wizards hash
Diffstat (limited to 'perl-install/wizards.pm')
-rw-r--r-- | perl-install/wizards.pm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/wizards.pm b/perl-install/wizards.pm index c7f4f9e15..22af03d53 100644 --- a/perl-install/wizards.pm +++ b/perl-install/wizards.pm @@ -11,12 +11,10 @@ wizards - a layer on top of interactive that ensure proper stepping =head1 SYNOPSIS - use wizards - # global wizard options: - use wizards; use interactive; - my $wiz = { + + my $wiz = wizards->new({ allow_user => "", # do we need root defaultimage => "", # wizard icon @@ -52,10 +50,9 @@ wizards - a layer on top of interactive that ensure proper stepping ], }, }, - }; - - my $w = wizards->new; - $w->process($wiz, $in); + }); + my $in = 'interactive'->vnew; + $wiz->process($in); =head1 DESCRIPTION @@ -85,7 +82,10 @@ extra exception managment such as destroying the wizard window and the like. =cut -sub new { bless {}, $_[0] } +sub new { + my ($class, $o) = @_; + bless $o, $class; +} sub check_rpm { @@ -109,7 +109,7 @@ my %default_callback = (changed => sub {}, focus_out => sub {}, complete => sub sub process { - my ($_w, $o, $in) = @_; + my ($o, $in) = @_; local $::isWizard = 1; local $::Wizard_title = $o->{name} || $::Wizard_title; local $::Wizard_pix_up = $o->{defaultimage} || $::Wizard_pix_up; @@ -193,8 +193,8 @@ sub process { sub safe_process { - my ($w, $wiz, $in) = @_; - eval { $w->process($wiz, $in) }; + my ($o, $in) = @_; + eval { $o->process($in) }; my $err = $@; if ($err =~ /wizcancel/) { $in->exit(0); |