[Bps-public-commit] Plack-Middleware-Test-StashWarnings branch, master, updated. 0.05-2-gf3a4cca

Alex Vandiver alexmv at bestpractical.com
Wed Mar 21 19:29:10 EDT 2012


The branch, master has been updated
       via  f3a4ccac09de6ce01d4248fec409a7abed2467ac (commit)
       via  7fd72b6c63cb9b67533fcfc7abbbd18858eef748 (commit)
      from  87781722730251fb0a1316b6e8ac51d8421f1801 (commit)

Summary of changes:
 Changes                                    |    3 +++
 lib/Plack/Middleware/Test/StashWarnings.pm |    9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 7fd72b6c63cb9b67533fcfc7abbbd18858eef748
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Mar 21 19:18:14 2012 -0400

    Add an API for adding explicit warnings, given the middleware object

diff --git a/lib/Plack/Middleware/Test/StashWarnings.pm b/lib/Plack/Middleware/Test/StashWarnings.pm
index 65d61b2..436171f 100644
--- a/lib/Plack/Middleware/Test/StashWarnings.pm
+++ b/lib/Plack/Middleware/Test/StashWarnings.pm
@@ -35,13 +35,18 @@ sub _stash_warnings_for {
 
     my $old_warn = $SIG{__WARN__} || sub { warn @_ };
     local $SIG{__WARN__} = sub {
-        push @{ $self->{stashed_warnings} }, @_;
+        $self->add_warning(@_);
         $old_warn->(@_) if $ENV{TEST_VERBOSE};
     };
 
     return $code->(@_);
 }
 
+sub add_warning {
+    my $self = shift;
+    push @{ $self->{stashed_warnings} }, @_;
+}
+
 sub dump_warnings {
     my $self = shift;
 

commit f3a4ccac09de6ce01d4248fec409a7abed2467ac
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Mar 21 19:28:51 2012 -0400

    0.06 and its changes

diff --git a/Changes b/Changes
index 48ec7e7..dc07542 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension Plack::Middleware::Test::StashWarnings
 
+0.06  2012-03-21
+        - Added a method to add a warning by hand
+
 0.05  2011-06-08
         - improved documentation
         - try harder to use $SIG{__WARN__} if it's there
diff --git a/lib/Plack/Middleware/Test/StashWarnings.pm b/lib/Plack/Middleware/Test/StashWarnings.pm
index 436171f..ee1962a 100644
--- a/lib/Plack/Middleware/Test/StashWarnings.pm
+++ b/lib/Plack/Middleware/Test/StashWarnings.pm
@@ -2,7 +2,7 @@ package Plack::Middleware::Test::StashWarnings;
 
 use strict;
 use 5.008_001;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 use parent qw(Plack::Middleware);
 use Carp ();

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list