projects
/
p5sagit/Devel-BeginLift.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
accept B::OP objects from lifted subs
[p5sagit/Devel-BeginLift.git]
/
t
/
generate.t
1
use strict;
2
use warnings;
3
use Test::More;
4
5
BEGIN {
6
plan skip_all => "B::Generate required" unless eval { require B::Generate };
7
plan 'no_plan';
8
}
9
10
sub foo {
11
B::SVOP->new("const", 0, 42);
12
}
13
14
use Devel::BeginLift qw(foo);
15
16
sub bar { 7 + foo() }
17
18
is( bar(), 49, "optree injected" );
19