aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/gui.pm4
-rw-r--r--Rpmdrake/open_db.pm3
-rw-r--r--Rpmdrake/widgets.pm3
3 files changed, 6 insertions, 4 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index be9951a9..fb5193e6 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -726,7 +726,7 @@ sub ctreefy {
sub build_tree {
my ($tree, $tree_model, $elems, $options, $force_rebuild, $compssUsers, $flat, $mode) = @_;
- my $old_mode if 0;
+ state $old_mode;
$mode = $options->{rmodes}{$mode} || $mode;
return if $old_mode eq $mode && !$force_rebuild;
$old_mode = $mode;
@@ -749,7 +749,7 @@ sub build_tree {
} @keys;
if (@keys == 0) {
add_node('', N("(none)"), { nochild => 1 });
- my $explanation_only_once if 0;
+ state $explanation_only_once;
$explanation_only_once or interactive_msg(N("No update"),
N("The list of updates is empty. This means that either there is
no available update for the packages installed on your computer,
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index 864bfb4d..e8ff717b 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -28,6 +28,7 @@ use common;
use rpmdrake;
use URPM;
use urpm;
+use feature 'state';
use Exporter;
our @ISA = qw(Exporter);
@@ -40,7 +41,7 @@ sub open_rpm_db {
my $host;
log::explanations("opening the RPM database");
if ($::rpmdrake_options{parallel} && ((undef, $host) = @{$::rpmdrake_options{parallel}})) {
- my $done if 0;
+ state $done;
my $dblocation = "/var/cache/urpmi/distantdb/$host";
if (!$done || $o_force) {
print "syncing db from $host to $dblocation...";
diff --git a/Rpmdrake/widgets.pm b/Rpmdrake/widgets.pm
index a3f5e56a..a1f689a3 100644
--- a/Rpmdrake/widgets.pm
+++ b/Rpmdrake/widgets.pm
@@ -30,12 +30,13 @@ use lib qw(/usr/lib/libDrakX);
use mygtk2 qw(gtknew); #- do not import anything else, especially gtkadd() which conflicts with ugtk2 one
use ugtk2 qw(:all);
use Time::HiRes;
+use feature 'state';
sub new {
my ($_class) = @_;
my $w = gtknew('TextView', editable => 0);
- my $time if 0;
+ state $time;
$w->signal_connect(size_allocate => sub {
my ($w, $requisition) = @_;
return if !ref($w->{anchors});