X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Op.git;a=blobdiff_plain;f=t%2F21-monkeypatch.t;h=5c08a22c516937f1cbc97c9b4d4ee5772215505b;hp=faaf83a3f558fd1a292c9b67494c892513bd0444;hb=bef3694f4167eacd3fe677e5f72228aa3023686b;hpb=d13eb03da10981aca9ff101bd8d95727c1de4b5e diff --git a/t/21-monkeypatch.t b/t/21-monkeypatch.t index faaf83a..5c08a22 100644 --- a/t/21-monkeypatch.t +++ b/t/21-monkeypatch.t @@ -15,15 +15,19 @@ BEGIN { use Sub::Op; +sub stash_keys { + my ($pkg) = @_; + + no strict 'refs'; + keys %{"${pkg}::"}; +} + BEGIN { - is_deeply [ sort keys %B:: ], [ sort + is_deeply [ sort +stash_keys 'B' ], [ sort qw/OP:: Deparse:: Hooks::/, - qw/OPf_STACKED/, qw/svref_2object/, ], 'No extra symbols in B::'; - is_deeply [ sort keys %B::Deparse:: ], [ sort - qw/null pp_entersub/ - ], 'No extra symbols in B::Deparse'; + is_deeply [ sort +stash_keys 'B::Deparse' ], [ ], 'No symbols in B::Deparse'; } use B;