plan
skip_all
=>
"Current implementation can't pass these tests."
;
{
sub
new {
bless
({},
shift
) }
sub
bar {
'tanaka'
}
}
{
my
$foo
= A->new;
my
$code
=
sub
{
defined
(
$foo
->bar(
'ja'
))
};
if
(1) { concise_code(
$code
) }
my
$cv
= B::svref_2object(
$code
);
my
@padsv
= op_grep {
$_
->name eq
'padsv'
}
$cv
->ROOT;
is 0+
@padsv
, 1;
my
@buf
;
for
my
$op
(
@padsv
) {
tap(
$op
,
$cv
->ROOT, \
@buf
);
}
my
$deparse
= B::Deparse->new;
my
$txt
=
eval
{
$deparse
->coderef2text(
$code
);
};
my
$e
= $@;
ok(!
$e
,
'There is no error was occurred'
) or diag
$e
;
like
$txt
,
qr{\$mech}
,
'parsed correctly'
;
is_deeply(
\
@buf
,
[
]
);
if
(1) { concise_code(
$code
) }
}
done_testing;
sub
concise_code {
my
$code
=
shift
;
my
$walker
= B::Concise::compile(
'-terse'
,
''
,
$code
);
B::Concise::walk_output(\
my
$buf
);
$walker
->();
::diag(
$buf
);
}