[libterm-sk-perl] 01/03: Imported Upstream version 0.14

Salvatore Bonaccorso carnil at debian.org
Thu Sep 19 18:59:10 UTC 2013


This is an automated email from the git hooks/post-receive script.

carnil pushed a commit to annotated tag debian/0.14-1
in repository libterm-sk-perl.

commit 4ca1adcd113385863145a80b16e18a4c35033c88
Author: Salvatore Bonaccorso <carnil at debian.org>
Date:   Thu Sep 19 20:53:53 2013 +0200

    Imported Upstream version 0.14
---
 Changes        |    5 +++++
 META.json      |    6 +++---
 META.yml       |    6 +++---
 README         |    2 +-
 lib/Term/Sk.pm |   16 +++++++++++++---
 t/0010_test.t  |    4 +++-
 6 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/Changes b/Changes
index 4f7717b..55bc2b5 100644
--- a/Changes
+++ b/Changes
@@ -73,3 +73,8 @@ Revision history for Term-Sk
         >> in it, too. Thanks in advance, Salvatore Bonaccorso, Debian Perl Group
         >> -counter must be instantiated with an in tial value for the token.
         >> +counter must be instantiated with an initial value for the token.
+
+0.14    19 May 2013
+        Add a new sub tok_maybe(), which is similar to token(), except that
+        tok_maybe() calls $self->show_maybe; whereas...
+        token()     calls $self->show;
diff --git a/META.json b/META.json
index f5a8da9..2e2e5af 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.3901, CPAN::Meta::Converter version 2.120630",
+   "generated_by" : "Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921",
    "license" : [
       "perl_5"
    ],
@@ -23,7 +23,7 @@
    "provides" : {
       "Term::Sk" : {
          "file" : "lib/Term/Sk.pm",
-         "version" : "0.13"
+         "version" : "0.14"
       }
    },
    "release_status" : "stable",
@@ -32,5 +32,5 @@
          "http://dev.perl.org/licenses/"
       ]
    },
-   "version" : "0.13"
+   "version" : "0.14"
 }
diff --git a/META.yml b/META.yml
index e65ac7d..5eb4804 100644
--- a/META.yml
+++ b/META.yml
@@ -6,7 +6,7 @@ build_requires: {}
 configure_requires:
   Module::Build: 0.3
 dynamic_config: 1
-generated_by: 'Module::Build version 0.3901, CPAN::Meta::Converter version 2.120630'
+generated_by: 'Module::Build version 0.4003, CPAN::Meta::Converter version 2.120921'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,7 +15,7 @@ name: Term-Sk
 provides:
   Term::Sk:
     file: lib/Term/Sk.pm
-    version: 0.13
+    version: 0.14
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.13
+version: 0.14
diff --git a/README b/README
index d288120..7105792 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Term-Sk Version 0.13
+Term-Sk Version 0.14
 
 This is a Perl extension for displaying a progress indicator on a terminal.
 
diff --git a/lib/Term/Sk.pm b/lib/Term/Sk.pm
index 37afbfb..04afad0 100644
--- a/lib/Term/Sk.pm
+++ b/lib/Term/Sk.pm
@@ -16,7 +16,7 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
 
 our @EXPORT = qw();
 
-our $VERSION = '0.13';
+our $VERSION = '0.14';
 
 our $errcode = 0;
 our $errmsg  = '';
@@ -164,6 +164,13 @@ sub token {
     $self->show;
 }
 
+sub tok_maybe {
+    my $self = shift;
+    my $tk = shift;
+    $self->{token} = ref($tk) eq 'ARRAY' ? $tk : [$tk];
+    $self->show_maybe;
+}
+
 sub DESTROY {
     my $self = shift;
     $self->close;
@@ -545,8 +552,11 @@ You can also have more than one token on a single line. Here is an example:
     };
     $ctr->close;
 
-The C<token> method is used to update the token value. If '%k' is used, then the
-counter must be instantiated with an initial value for the token.
+The C<token> method is used to update the token value immediately on the screen.
+
+The C<tok_maybe> method is used to set the token value, but the screen is not refreshed immediately.
+
+If '%k' is used, then the counter must be instantiated with an initial value for the token.
 
 =item characters '%P'
 
diff --git a/t/0010_test.t b/t/0010_test.t
index 52ceb0a..5e02933 100644
--- a/t/0010_test.t
+++ b/t/0010_test.t
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 70;
+use Test::More tests => 71;
 
 use_ok('Term::Sk');
 
@@ -181,6 +181,8 @@ use_ok('Term::Sk');
     is(content($ctr->get_line), q{Token Spain  Ctr 1},          'Test-0620: first Token displayed correctly');
     $ctr->token('USA');
     is(content($ctr->get_line), q{Token USA    Ctr 1},          'Test-0630: second Token displayed correctly');
+    $ctr->tok_maybe('China');
+    is(content($ctr->get_line), q{Token China  Ctr 1},          'Test-0632: third Token displayed correctly');
 }
 
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libterm-sk-perl.git



More information about the Pkg-perl-cvs-commits mailing list