From 73c851144720e28b21a491b6250385170db9d752 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 24 Apr 2003 19:00:12 +0000 Subject: perl_checker adaptations + fixes --- perl-install/diskdrake/hd_gtk.pm | 8 ++++---- perl-install/diskdrake/interactive.pm | 5 +++-- perl-install/diskdrake/removable.pm | 2 +- perl-install/diskdrake/smbnfs_gtk.pm | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'perl-install/diskdrake') diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 2071b3e4a..82fe1964a 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -304,11 +304,11 @@ sub create_buttons4partitions { ################################################################################ # disks: helpers ################################################################################ -sub current_hd { +sub current_hd() { $current_kind->{type} eq 'hd' or die 'current_hd called but $current_kind is not an hd'; $current_kind->{val}; } -sub current_part { +sub current_part() { current_hd(); $current_entry; } @@ -369,14 +369,14 @@ sub lvm2kind { ################################################################################ # raids: helpers ################################################################################ -sub raid2kind { +sub raid2kind() { { type => 'raid', name => 'raid', val => $all_hds->{raids} }; } ################################################################################ # loopbacks: helpers ################################################################################ -sub loopback2kind { +sub loopback2kind() { { type => 'loopback', name => 'loopback', val => $all_hds->{loopbacks} }; } diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index f32c872c7..85cdfa54e 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -235,6 +235,7 @@ sub main { # general actions ################################################################################ sub general_possible_actions { + my ($_in, $_all_hds) = @_; N_("Undo"), ($::expert ? N_("Toggle to normal mode") : N_("Toggle to expert mode")); } @@ -932,8 +933,8 @@ sub Options { { no strict; - *{'Toggle to normal mode'} = sub { $::expert = 0 }; - *{'Toggle to expert mode'} = sub { $::expert = 1 }; + *{'Toggle to normal mode'} = sub() { $::expert = 0 }; + *{'Toggle to expert mode'} = sub() { $::expert = 1 }; *{'Clear all'} = \&Clear_all; *{'Auto allocate'} = \&Auto_allocate; *{'Mount point'} = \&Mount_point; diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm index 939e61283..6862225c5 100644 --- a/perl-install/diskdrake/removable.pm +++ b/perl-install/diskdrake/removable.pm @@ -19,7 +19,7 @@ sub main { } } -sub actions { +sub actions() { ( N_("Mount point") => \&mount_point, N_("Options") => \&options, diff --git a/perl-install/diskdrake/smbnfs_gtk.pm b/perl-install/diskdrake/smbnfs_gtk.pm index 51152d991..8197d9ed1 100644 --- a/perl-install/diskdrake/smbnfs_gtk.pm +++ b/perl-install/diskdrake/smbnfs_gtk.pm @@ -261,11 +261,11 @@ sub add_smbnfs { $kind; } -sub nfs2kind { +sub nfs2kind() { network::nfs->new({ type => 'nfs', name => 'NFS', val => $all_hds->{nfss}, no_auto => 1 }); } -sub smb2kind { +sub smb2kind() { network::smb->new({ type => 'smb', name => 'Samba', val => $all_hds->{smbs}, no_auto => 1 }); } -- cgit v1.2.1