|Date:||Tue, 06 Jul 2010 10:24:17 +1000|
|To:||bug-Perl-Critic [...] rt.cpan.org|
|From:||Kevin Ryde <user42 [...] zip.com.au>|
The pod of ProhibitLvalueSubstr could note that the 4-arg substr is new in perl 5.005, so you know you might be upping your minimum by switching to it. But as an encouragement to go 4-arg, which is the purpose of the policy :-), it could be worth noting there's a misfeature in the lvalue form when used on magical or overloaded scalars -- they end up kept alive in the function scratchpad when you otherwise thought you'd dropped all references to them. Per my ticketwhich I think has been acknowledged as real, but perhaps not fixed yet.