actually, this isn't our fault, this is just generic 5.8 brokenness
[gitmo/Package-Stash.git] / t / edge-cases.t
index 1d26176..49f56ed 100755 (executable)
@@ -55,11 +55,8 @@ is(ref($stash->get_or_add_symbol('$glob')), 'SCALAR', "got an empty scalar");
 
 SKIP: {
     skip "PP doesn't support anon stashes before 5.14", 4
-        if $Package::Stash::IMPLEMENTATION eq 'PP'
-        && Package::Stash::BROKEN_GLOB_ASSIGNMENT;
-    local $TODO = ($Package::Stash::IMPLEMENTATION eq 'PP')
-        ? "don't know how to properly inflate a stash entry"
-        : undef;
+        if $] < 5.014 && $Package::Stash::IMPLEMENTATION eq 'PP';
+    local $TODO = "don't know how to properly inflate a stash entry";
 
     my $anon = {}; # not using Package::Anon
     $anon->{foo} = -1;     # stub
@@ -81,4 +78,13 @@ SKIP: {
     );
 }
 
+{
+    my $warning;
+    local $SIG{__WARN__} = sub { $warning = $_[0] };
+    my $stash = Package::Stash->new('Bar');
+    $stash->add_symbol('&foo' => sub { });
+    $stash->add_symbol('&foo' => sub { });
+    is($warning, undef, "no redefinition warnings");
+}
+
 done_testing;