]> git.vpit.fr Git - perl/modules/Sub-Op.git/blobdiff - t/21-monkeypatch.t
Vivify less packages and symbols in B:: land
[perl/modules/Sub-Op.git] / t / 21-monkeypatch.t
index faaf83a3f558fd1a292c9b67494c892513bd0444..5c08a22c516937f1cbc97c9b4d4ee5772215505b 100644 (file)
@@ -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;