substr($s, $pos, $len) = $x;
####
substr($s, $pos, $len, $x);
####
int
Perl_magic_getsubstr(pTHX_ SV *sv, MAGIC *mg)
{
STRLEN len;
SV * const lsv = LvTARG(sv);
const char * const tmps = SvPV_const(lsv,len);
I32 offs = LvTARGOFF(sv);
I32 rem = LvTARGLEN(sv);
...
}
int
Perl_magic_setsubstr(pTHX_ SV *sv, MAGIC *mg)
{
dVAR;
STRLEN len;
const char * const tmps = SvPV_const(sv, len);
SV * const lsv = LvTARG(sv);
I32 lvoff = LvTARGOFF(sv);
I32 lvlen = LvTARGLEN(sv);
...
}
####
sub xs_func1 :lvalue;
sub xs_func2 :lvalue;
####
use attributes ();
for (qw( xs_func1 xs_func2 )) {
no strict 'refs';
attributes->import(__PACKAGE__, \&{$_}, 'lvalue');
}
####
my $mmap = $class->new( ..., endianess => ENDIAN_NATIVE );
++( $mmap->uint8(0x1234) );