Skip to content

Commit a0361cb

Browse files
committed
Review Tweaks - take two
Again per pull request #167, move some comments around, and better use Test::Warnings
1 parent 1f0ebe4 commit a0361cb

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

t/bugs/DEMOLISH_warnings.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ use strict;
22
use warnings;
33

44
use lib 't/lib';
5-
use Test::More tests => 2; # Test::Warnings re-tests had_no_warnings implicitly
5+
use Test::More;
66
use Test::Requires qw(Test::Warnings);
7+
Test::Warnings->import(':no_end_test');
78

9+
# Demolition::OnceRemoved has a variable only in scope during the initial `use`
10+
# As it leaves scope, Perl will call DESTROY on it
11+
# (and Moose::Object will then go through its DEMOLISHALL method)
812
use Demolition::OnceRemoved;
913
Test::Warnings::had_no_warnings("No DEMOLISH warnings");
14+
15+
done_testing();

t/lib/Demolition/OnceRemoved.pm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ use strict;
33
use warnings;
44
use Demolition::Demolisher;
55

6-
# This variable is only in scope during the initial `use`
7-
# As it leaves scope, Perl will call DESTROY on it
8-
# (and Moose::Object will then go through its DEMOLISHALL method)
96
my $d = Demolition::Demolisher->new;
107

118
1;

0 commit comments

Comments
 (0)