summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-15 18:43:12 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-15 18:43:12 +0000
commitf62e579af0c78a83c6a26889128b3eaf5bf1f21a (patch)
tree15781436fa7b1737fc6a45d322ba107d6de1e7b5 /bin
parent9fcf7cd986b30c8139684e6a28516b84919daa0e (diff)
downloaddrakguard-f62e579af0c78a83c6a26889128b3eaf5bf1f21a.tar
drakguard-f62e579af0c78a83c6a26889128b3eaf5bf1f21a.tar.gz
drakguard-f62e579af0c78a83c6a26889128b3eaf5bf1f21a.tar.bz2
drakguard-f62e579af0c78a83c6a26889128b3eaf5bf1f21a.tar.xz
drakguard-f62e579af0c78a83c6a26889128b3eaf5bf1f21a.zip
perl_checker: kill unused variables
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard18
1 files changed, 7 insertions, 11 deletions
diff --git a/bin/drakguard b/bin/drakguard
index b4d0e7b..9420979 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -230,8 +230,6 @@ gtkadd($w->{window},
})),
0, gtknew('Button', text => N("Add"), clicked => sub {
my $text = $entry->get_text;
- my $exec;
- my $args;
$text =~ s,^[^:]+://,,g; #- strip protocol
if ($url_list->{tab_title} eq N("Block programs")) {
$text =~ s,(\W?)$,,g; #- remove unknown caracters
@@ -244,9 +242,9 @@ gtkadd($w->{window},
$locale = lc($locale->{country});
my @system_name = grep { $_ && m/^GenericName(\[$locale\])?=(.*)\s*/g } chomp_(cat_($text));
foreach (@exec_line) {
- ($exec, $text, $args) = /(^Exec=)(\w+)\s*(.*)/;
+ ($text) = /^Exec=(\w+)\s*/;
if ($text eq "") {
- ($exec, $text, $args) = /(^Exec=)(.*+)\s*(.*)/ }
+ ($text) = /^Exec=(.*+)\s*/ }
}
foreach my $b (@system_name) {
$original_entry = $b;
@@ -302,7 +300,7 @@ if (grep { $_ && !/acl/ } chomp_(cat_($fstab_file)) && grep { $_ && m/ext/ } cho
if ($acl_active) {
my @ext_lines = grep { $_ && m/ext/ } chomp_(cat_($fstab_file));
foreach my $line (@ext_lines) {
- my ($id, $directory, $flag, $number) = $line =~ /^(.+)\s(.+)\s(ext(\w)\s(\w*))\s(.*)/ or next;
+ my ($flag) = $line =~ /^.+\s.+\s(ext(\w)\s(\w*))\s/ or next;
$line =~ s/ext(\w)\s(\w*)\s/$flag,acl /g;
subst_config_line($fstab_file, "$line\n"); #adds ,acl in the fstab file in the first run
# remount filesystem with acl parameter
@@ -556,14 +554,13 @@ sub subst_config_line {
sub clean_config_line {
my ($file, $line) = @_;
my $key = first(split(' ', $line));
- my $done;
substInFile {
- $done = 1 if s|^\s*$key.*\n||;
+ s|^\s*$key.*\n||;
} $file;
}
sub block_internet_dansguardian {
- my ($file, $line) = @_;
+ my ($file) = @_;
my $key = "#";
substInFile {
s|^$key\*\*\s|**\n|;
@@ -677,13 +674,12 @@ sub apply_block_program() {
s/\s(.*)//;
}
#code to make diff bettween vectors
- my (@union, @intersection, @difference);
+ my (@intersection, @difference);
my $element;
- @union = @intersection = @difference = ();
+ @intersection = @difference = ();
my %count = ();
foreach $element (@original_list, @actual_list) { $count{$element}++ }
foreach $element (keys %count) {
- # push @union, $element;
push @{ $count{$element} > 1 ? \@intersection : \@difference }, $element;
}
if (scalar(@difference)) {