X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fstash.t;h=8ea829baa1d0fde3932d3be1324a1eded53e9b99;hb=d47e1c27dd43d7b79216c58864a5e539f612e974;hp=57c8659ac00678c3ebaa6775f6047930fe4e0a4c;hpb=d5114285ea0d40a354b962dd1686fb71e1d1c707;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/stash.t b/t/op/stash.t index 57c8659..8ea829b 100644 --- a/t/op/stash.t +++ b/t/op/stash.t @@ -25,14 +25,17 @@ fresh_perl_is( q(Insert a non-GV in a stash, under warnings 'once'), ); -ok( !defined %oedipa::maas::, q(stashes aren't defined if not used) ); -ok( !defined %{"oedipa::maas::"}, q(- work with hard refs too) ); +{ + no warnings 'deprecated'; + ok( !defined %oedipa::maas::, q(stashes aren't defined if not used) ); + ok( !defined %{"oedipa::maas::"}, q(- work with hard refs too) ); -ok( defined %tyrone::slothrop::, q(stashes are defined if seen at compile time) ); -ok( defined %{"tyrone::slothrop::"}, q(- work with hard refs too) ); + ok( defined %tyrone::slothrop::, q(stashes are defined if seen at compile time) ); + ok( defined %{"tyrone::slothrop::"}, q(- work with hard refs too) ); -ok( defined %bongo::shaftsbury::, q(stashes are defined if a var is seen at compile time) ); -ok( defined %{"bongo::shaftsbury::"}, q(- work with hard refs too) ); + ok( defined %bongo::shaftsbury::, q(stashes are defined if a var is seen at compile time) ); + ok( defined %{"bongo::shaftsbury::"}, q(- work with hard refs too) ); +} package tyrone::slothrop; $bongo::shaftsbury::scalar = 1; @@ -53,13 +56,14 @@ package main; # now tests in eval -ok( !eval { defined %achtfaden:: }, 'works in eval{}' ); -ok( !eval q{ defined %schoenmaker:: }, 'works in eval("")' ); +ok( !eval { no warnings 'deprecated'; defined %achtfaden:: }, 'works in eval{}' ); +ok( !eval q{ no warnings 'deprecated'; defined %schoenmaker:: }, 'works in eval("")' ); # now tests with strictures { use strict; + no warnings 'deprecated'; ok( !defined %pig::, q(referencing a non-existent stash doesn't produce stricture errors) ); ok( !exists $pig::{bodine}, q(referencing a non-existent stash element doesn't produce stricture errors) ); }