definition of subs until runtime by means of the AUTOLOAD
mechanism.
+=item B<regexp-variables>
+
+This option warns whenever one of the regexp variables $', $& or
+$' is used. Any occurrence of any of these variables in your
+program can slow your whole program down. See L<perlre> for
+details.
+
=item B<all>
Turn all warnings on.
BEGIN {
map($valid_check{$_}++,
qw(context implicit_read implicit_write dollar_underscore
- private_names undefined_subs));
+ private_names undefined_subs regexp_variables));
}
# Debugging options
}
}
}
+ if ($check{regexp_variables} && $op->ppaddr eq "pp_gvsv") {
+ my $name = $op->gv->NAME;
+ if ($name =~ /^[&'`]$/) {
+ warning('Use of regexp variable $%s', $name);
+ }
+ }
}
sub B::GV::lintcv {