A Deparse TODO test which tries to deparse lexical subs, produce a bunch of
"unexpected OP_CLONE" etc on STDERR (since it doesn't handle those new ops
yet). Capture and skip those warnings for now.
Also, add 'no warnings "experimental::lexical_subs"'
to stop a warning about using an experimental feature.
# SKIP ?$] < 5.017004 && "lexical subs not implemented on this Perl version"
# TODO unimplemented in B::Deparse; RT #116553
# lexical subroutine
+
+# XXX remove this __WARN__ once the ops are correctly implemented
+BEGIN {
+ $SIG{__WARN__} = sub {
+ return if $_[0] =~ /unexpected OP_(CLONE|INTRO|PAD)CV/;
+ print STDERR @_;
+ }
+}
+
use feature 'lexical_subs';
+no warnings "experimental::lexical_subs";
my sub f {}
print f();