Changes for Devel-Declare
+0.001005
+ - nasty goto &$func hack to avoid :lvalue+list context weirdness
+ - correct SvGROW invocation
- stop using & prototypes at all
0.001004
retstr = POPpx;
PUTBACK;
if (retstr && strlen(retstr)) {
+ const int old_len = SvCUR(PL_linestr);
#ifdef DD_DEBUG
printf("Got string %s\n", retstr);
#endif
- SvGROW(PL_linestr, strlen(retstr));
+ SvGROW(PL_linestr, (STRLEN)(old_len + strlen(retstr)));
memmove(s+strlen(retstr), s, (PL_bufend - s)+1);
memmove(s, retstr, strlen(retstr));
+ SvCUR_set(PL_linestr, old_len + strlen(retstr));
PL_bufend += strlen(retstr);
#ifdef DD_DEBUG
printf("cur buf: %s\n", s);
use warnings;
use 5.008001;
-our $VERSION = '0.001004';
+our $VERSION = '0.001005';
# mirrored in Declare.xs as DD_HANDLE_*
my \$body;
sub ${name} (${proto}) :lvalue {\n"
.' if (wantarray) {
- my @ret = $body->(@_);
- return @ret;
+ goto &$body;
}
my $ret = $body->(@_);
return $ret;
$setup_for_args{$name} = [
$flags,
sub {
- my ($usepack, $use, $inpack, $name, $proto) = @_;
+ my ($usepack, $use, $inpack, $name, $proto, $shift_hashref) = @_;
my $extra_code = $compile->($name, $proto);
- my $shift_hashref = defined(wantarray);
my $main_handler = sub { shift if $shift_hashref;
("DONE", $run->($name, $proto, @_));
};
return join(', ', ref $self, $what);
};
- @test_list = method { 1 }, sub { 2 }, method () { 3 }, sub { 4 };
+ #@test_list = method { 1 }, sub { 2 }, method () { 3 }, sub { 4 };
}