]> git.donarmstrong.com Git - term-progressbar-io.git/commitdiff
ignore init in pod documentation master
authorDon Armstrong <don@donarmstrong.com>
Tue, 8 Apr 2014 20:58:39 +0000 (13:58 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 8 Apr 2014 20:58:39 +0000 (13:58 -0700)
add pod documentation

lib/Term/ProgressBar/IO.pm
t/pod-coverage.t

index 0617baf3b63f5a2ecbc06cf88e7457d561d439a5..b95ab6f94bad0a0221e23f641c3eaf124227812d 100644 (file)
@@ -14,6 +14,7 @@ Term::ProgressBar::IO -- Display a progress bar while reading from a seekable fi
   my $pb = Term::ProgressBar::IO->new($fh);
 
   while (<$fh>) {
+      # do something
       $pb->update();
   }
 
@@ -22,6 +23,9 @@ Term::ProgressBar::IO -- Display a progress bar while reading from a seekable fi
 Displays a progress bar using L<Term::ProgressBar> which corresponds
 to reading from a filehandle.
 
+This module inherits from L<Term::ProgressBar> and has all of its
+options.
+
 =head1 BUGS
 
 None known.
@@ -41,6 +45,33 @@ BEGIN{
      $DEBUG = 0 unless defined $DEBUG;
 }
 
+=head1 METHODS
+
+=head2 new
+
+Create and return a new Term::ProgressBar::IO instance.
+
+=over
+
+=item ARGUMENTS
+
+=over
+
+=item count
+
+A valid filehandle or item count. L<IO::Uncompress> filehandles are
+also properly handled.
+
+=item OTHER ARGUMENTS
+
+All other arguments are documented in L<Term::ProgressBar>
+
+=back
+
+=back
+
+=cut
+
 sub init {
     my $self = shift;
     my $count;
@@ -67,6 +98,28 @@ sub init {
     $self->SUPER::init(\%config);
 }
 
+=head2 update
+
+Automatically update the progress bar based on the position of the
+filehandle given at construction time.
+
+=over
+
+=item ARGUMENTS
+
+=over
+
+=item so_far
+
+Current progress point; this defaults to the current position of the
+filehandle. [You probably don't actually want to ever give this.]
+
+=back
+
+=back
+
+=cut
+
 sub update {
     my $self = shift;
     my $count = $self->__determine_count();
index 866fac2b98d9a29d8f6134a83d8a9ac93fdc1985..103b8191adba4c213ec00d3668bfa88b8106508a 100644 (file)
@@ -17,4 +17,5 @@ eval "use Pod::Coverage $min_pc";
 plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
     if $@;
 
-all_pod_coverage_ok();
+all_pod_coverage_ok({also_private => ['init'],
+                    });