App-FQStat

 view release on metacpan or  search on metacpan

lib/App/FQStat/Actions.pm  view on Meta::CPAN

  warnenter if ::DEBUG;
  my $lines = shift || 1;
  lock($::DisplayOffset);
  $::DisplayOffset += $lines;
  my $limit = @{$::Records} - $::Termsize[1]+4;
  $::DisplayOffset = $limit if $::DisplayOffset > $limit;
  $::DisplayOffset = 0 if $::DisplayOffset < 0;
}


sub update_user_name {
  warnenter if ::DEBUG;
  my $input = poll_user("User name: ");
  lock($::User);
  if (not defined $input or $input =~ /^\s*$/) {
    $::User = undef;
  }
  else {
    $::User = $input;
  }
  update_display(1);

lib/App/FQStat/Actions.pm  view on Meta::CPAN

    update_display(1);
    return;
  } # end if $key is 'c'
  else {
    die "Invalid key which stopped selection mode. (Sanity check)";
  }
  return 1;
}


sub update_highlighted_user_name {
  warnenter if ::DEBUG;
  my $input = poll_user("User name to highlight: ");
  if (not defined $input or $input =~ /^\s*$/) {
    $::HighlightUser = undef;
    update_display(1);
    return;
  }
  
  my $regex;
  eval { $regex = qr/$input/; };

lib/App/FQStat/Drawing.pm  view on Meta::CPAN

    $line .= ' ' unless $colno == 2 and $summary_mode;
    if (exists $highlight{$colno}) { $line .= $high.sprintf("\%-".$c->{width}."s", $c->{name}).$norm }
    else                           { $line .= sprintf("\%-".$c->{width}."s", $c->{name}) }
  }
  printline($line);
  print RESET;
}


my $last_update;
sub update_display {
  warnenter if ::DEBUG;
  my $force = shift;
  $last_update ||= time();
  my $time = time();

  if ($force or $time-$last_update > $::Interval) {
    $last_update = $time;
    $::ProgressIndicator++;
    $::ProgressIndicator = 0
      if $::ProgressIndicator >= scalar(@{::PROGRESS_INDICATORS()});



( run in 0.313 second using v1.01-cache-2.11-cpan-95122f20152 )