Sub-Auto
view release on metacpan or search on metacpan
lib/Sub/Auto.pm view on Meta::CPAN
}
# Set up the parser scoping hacks that allow us to omit the final
# semicolon
sub scope_injector_call {
my $pkg = __PACKAGE__;
return " BEGIN { ${pkg}::inject_scope }; ";
}
sub inject_scope {
$^H |= 0x120000;
$^H{DD_METHODHANDLERS} = Scope::Guard->new(sub {
my $linestr = Devel::Declare::get_linestr;
my $offset = Devel::Declare::get_linestr_offset;
substr($linestr, $offset, 0) = ';';
Devel::Declare::set_linestr($linestr);
});
}
}
1;
( run in 0.605 second using v1.01-cache-2.11-cpan-49f99fa48dc )