Allow ‘sub x :lvalue’ to apply to XSUBs and stubs
This was disabled in 5.12 (with a warning) by commit
885ef6f5, because
applying the attribute to a Perl sub isn’t effective: it does not mod-
ify the op tree accordingly.
But applying an attribute to an XSUB after the fact is perfectly
fine, and is the only way to do it (either with declarative syntax or
attributes.pm). This commit restores the old behaviour of declarative
for XSUBs. (attributes.pm never stopped working.)
Commit
885ef6f5 also stopped a declaration from applying the flag to
an undefined subroutine if it happens to have been assigned from else-
where. It does not make sense to allow the :method attribute to be
applied to such a sub, but not :lvalue.