An advantage is that this makes the calls similar to 4-arg splice.
[-ClassHierarchies::ProhibitExplicitISA]
-# I find that using lvalue substr much clearer than adding another arg to
-# substr. So skip this one.
-[-BuiltinFunctions::ProhibitLvalueSubstr]
-
# There is one complex regex in Tokenizer.pm for scanning numbers. It is
# well commented and easy to read, and any changes would make it harder
# to read. But rather than deactivate this policy, I have adjusted the
# unless the word is __END__ or __DATA__ and is the only word on
# the line.
&& ( !defined( $is_END_DATA{$tok_kw} )
- || $input_line !~ /^\s*__(END|DATA)__\s*$/ )
+ || $input_line !~ /^\s*__(?:END|DATA)__\s*$/ )
)
{
$self->do_QUOTED_BAREWORD();
if ( $excess > 0 ) {
$pos_chr = substr( $pos_chr, 0, length($pos_chr) - $excess );
}
- substr( $underline, $pos, length($pos_chr) ) = $pos_chr;
+ substr( $underline, $pos, length($pos_chr), $pos_chr );
return ($underline);
} ## end sub write_on_underline
int( $leading_space_count / $rOpts_entab_leading_whitespace );
my $leading_string = "\t" x $tab_count . SPACE x $space_count;
if ( $line =~ /^\s{$leading_space_count,$leading_space_count}/ ) {
- substr( $line, 0, $leading_space_count ) = $leading_string;
+ substr( $line, 0, $leading_space_count, $leading_string );
}
else {
$leading_string .= ( SPACE x $space_count );
}
if ( $line =~ /^\s{$leading_space_count,$leading_space_count}/ ) {
- substr( $line, 0, $leading_space_count ) = $leading_string;
+ substr( $line, 0, $leading_space_count, $leading_string );
}
else {