summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-02-25 13:37:13 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-02-25 13:37:13 +0000
commit96898b2d80be580a7c0f7e4a775dae943fe2c99f (patch)
treecfebc572ca68632f92953fb7f336c7d02da355c3 /perl-install/standalone
parent3ff302b93bbe9d5393b2a4995e87a82c7cbde678 (diff)
downloaddrakx-96898b2d80be580a7c0f7e4a775dae943fe2c99f.tar
drakx-96898b2d80be580a7c0f7e4a775dae943fe2c99f.tar.gz
drakx-96898b2d80be580a7c0f7e4a775dae943fe2c99f.tar.bz2
drakx-96898b2d80be580a7c0f7e4a775dae943fe2c99f.tar.xz
drakx-96898b2d80be580a7c0f7e4a775dae943fe2c99f.zip
perl_checker fixes
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/logdrake16
1 files changed, 8 insertions, 8 deletions
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 1e288e5f6..2ab447a97 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -42,7 +42,7 @@ foreach (@ARGV) {
/^--alert$/ and do { alert_config(); quit() };
}
-my $isTail = 1 if $isFile;
+my $isTail = $isFile ? 1 : 0;
$| = 1 if $isTail;
my $h = chomp_(`hostname -s`);
@@ -79,7 +79,7 @@ my @menu_items = (
{ path => N("/_Help"), item_type => '<LastBranch>' },
{ path => N("/Help/_About...") }
);
-my $_menubar = create_factory_menu($my_win->{rwindow}, @menu_items) unless $::isEmbedded;
+my $_menubar = $::isEmbedded ? create_factory_menu($my_win->{rwindow}, @menu_items) : undef;
######### menus end
@@ -237,7 +237,7 @@ sub parse_file {
if ($cal_mode) {
my (undef, $month, $day) = $cal->get_date;
- $ey = $months[$month]."\\s{1,2}$day\\s.*$ey.*\n";
+ $ey = $months[$month] . "\\s{1,2}$day\\s.*$ey.*\n";
}
my @all = catMaybeCompressed($file);
@@ -257,11 +257,11 @@ sub parse_file {
my $i = 0;
my $test;
if ($en && !$ey) {
- $test = sub { !/$en/ };
+ $test = sub { $_[0] !~ /$en/ };
} elsif ($ey && !$en) {
- $test = sub { /$ey/ };
+ $test = sub { $_[0] =~ /$ey/ };
} else {
- $test = sub { /$ey/ && !/$en/ };
+ $test = sub { $_[0] =~ /$ey/ && $_[0] !~ /$en/ };
}
foreach (@all) {
@@ -271,7 +271,7 @@ sub parse_file {
$win_pb->window->process_updates(1); # no gtkflush() because we do not want to refresh the TextView
}
- logcolorize($_) if $test->();
+ logcolorize($_) if $test->($_);
}
$win_pb->destroy if !$::isEmbedded || !$isExplain;
@@ -279,7 +279,7 @@ sub parse_file {
close $F;
open $F, $file or die "E: $!";
local $_;
- while (<$F>) {}; #to prevent to output the file twice..
+ while (<$F>) {} #to prevent to output the file twice..
# $log_text->set_point($log_text->get_length());
$timer ||= Glib::Timeout->add(1000, sub {
logcolorize($_) while <$F>;