Skip to content

Commit

Permalink
fixed RT #53100
Browse files Browse the repository at this point in the history
  • Loading branch information
rhesa committed Dec 25, 2009
1 parent b4c90a5 commit 767c21b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for CGI-Application-Plugin-DevPopup

1.04 2009-12-25 Rhesa Rozendaal <rhesa@cpan.org>
- RT #53100 (Serguei Trouchelle)

1.03 2009-10-20 Rhesa Rozendaal <rhesa@cpan.org>
- RT #50096 (Serguei Trouchelle)
- RT #42315 (Lyle Hopkins)
Expand Down
2 changes: 1 addition & 1 deletion dist.ini
@@ -1,5 +1,5 @@
name = CGI-Application-Plugin-DevPopup
version = 1.02
version = 1.03
abstract = Runtime cgiapp info in a popup window
author = Rhesa Rozendaal <rhesa@cpan.org>
license = Perl_5
Expand Down
2 changes: 1 addition & 1 deletion lib/CGI/Application/Plugin/DevPopup/Log.pm
Expand Up @@ -53,7 +53,7 @@ sub devpopup_log_handle

unless (ref $this->{__DEVPOPUP_LOGFH})
{
my $data;
my $data = '';
$this->{__DEVPOPUP_LOGDATA} = \$data;
my $fh = new IO::Scalar \$data;
$this->{__DEVPOPUP_LOGFH} = $fh;
Expand Down
32 changes: 32 additions & 0 deletions t/RT53100.t
@@ -0,0 +1,32 @@

use strict;
use warnings FATAL => 'all';

use Test::More;

use CGI::Application::Plugin::DevPopup::Log ();
eval "use Log::Dispatch::Handle";
plan skip_all => "Log::Dispatch::Handle required for this test" if $@;
eval "use Test::NoWarnings";
plan skip_all => "Test::NoWarnings required for this test" if $@;
plan tests => 2;

my $log = bless {}, 'CGI::Application::Plugin::DevPopup::Log';

like eval
{
my $fh = $log->devpopup_log_handle;
my $handle = Log::Dispatch::Handle->new(
name => 'test RT53100',
min_level => 'debug',
handle => $fh,
);
$handle->log(level => "debug", message => "we live!");

my $report = $log->_log_report;
}, qr/we live!/, "no fatal warnings";

__END__
1..2
ok 1 - no fatal warnings
ok 2 - no warnings

0 comments on commit 767c21b

Please sign in to comment.