9 use blib 't/Sub-Op-LexicalSub';
12 die "Usage: $0 'code involving f() and g()'" unless defined $code;
14 my $cb = eval <<"CODE";
15 use Sub::Op::LexicalSub f => sub { say 'f(' . join(', ', \@_) . ')'; \@_ };
16 use Sub::Op::LexicalSub g => sub { say 'g(' . join(', ', \@_) . ')'; \@_ };
21 print "--- run ---\n";
23 warn "exception: $@" if $@;
25 print "--- deparse ---\n";
27 print B::Deparse->new->coderef2text($cb), "\n";
29 print "--- concise ---\n";
31 B::Concise::compile($cb)->();
33 print "--- concise(exec) ---\n";
34 B::Concise::compile('-exec', $cb)->();