summaryrefslogtreecommitdiff
path: root/lib/Automake/Rule.pm
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-28 10:56:30 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-28 11:22:02 +0200
commitf98ca06830cbb484476b0aa9f79f79907538db4b (patch)
tree34f29bf3a967802c44e2adc11ff374114760379c /lib/Automake/Rule.pm
parent986ca6c0a3e8c0b34f0981a8eb938906fb8ebfbc (diff)
downloadautomake-f98ca06830cbb484476b0aa9f79f79907538db4b.tar.gz
Automake::Rule: consistently prepend underscore to private variables
* lib/Automake/Rule.pm (%suffix_rules): Rename ... (%_suffix_rules): ... like this. (%suffix_rules_builtin): Rename ... (%_suffix_rules_builtin): ... like this. (reset, next_in_suffix_chain, register_suffix_rule, suffix_rules_count): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/Automake/Rule.pm')
-rw-r--r--lib/Automake/Rule.pm30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index b162865e3..ac4b71afd 100644
--- a/lib/Automake/Rule.pm
+++ b/lib/Automake/Rule.pm
@@ -103,6 +103,14 @@ my @_suffixes = ();
my @_known_extensions_list = ();
my %_rule_dict = ();
+# See comments in the implementation of the 'next_in_suffix_chain()'
+# variable for details.
+my %_suffix_rules;
+
+# Same as $suffix_rules, but records only the default rules
+# supplied by the languages Automake supports.
+my %_suffix_rules_builtin;
+
=item C<%dependencies>
Holds the dependencies of targets which dependencies are factored.
@@ -124,14 +132,6 @@ only when keys exists in C<%dependencies>.
use vars '%actions';
-# See comments in the implementation of the 'next_in_suffix_chain()'
-# variable for details.
-my %suffix_rules;
-
-# Same as $suffix_rules, but records only the default rules
-# supplied by the languages Automake supports.
-my %suffix_rules_builtin;
-
=item C<$KNOWN_EXTENSIONS_PATTERN>
Pattern that matches all know input extensions (i.e. extensions used
@@ -291,7 +291,7 @@ sub reset()
{
%_rule_dict = ();
@_suffixes = ();
- %suffix_rules = %suffix_rules_builtin;
+ %_suffix_rules = %_suffix_rules_builtin;
%dependencies =
(
@@ -359,9 +359,9 @@ from C<$ext1>, or C<undef> if no such rule exists.
sub next_in_suffix_chain ($$)
{
my ($ext1, $ext2) = @_;
- return undef unless (exists $suffix_rules{$ext1} and
- exists $suffix_rules{$ext1}{$ext2});
- return $suffix_rules{$ext1}{$ext2}[0];
+ return undef unless (exists $_suffix_rules{$ext1} and
+ exists $_suffix_rules{$ext1}{$ext2});
+ return $_suffix_rules{$ext1}{$ext2}[0];
}
=item C<register_suffix_rule ($where, $src, $dest)>
@@ -374,8 +374,8 @@ files ending in C<$src> into files ending in C<$dest>.
sub register_suffix_rule ($$$)
{
my ($where, $src, $dest) = @_;
- my $suffix_rules = $where->{'position'} ? \%suffix_rules
- : \%suffix_rules_builtin;
+ my $suffix_rules = $where->{'position'} ? \%_suffix_rules
+ : \%_suffix_rules_builtin;
verb "Sources ending in $src become $dest";
push @_suffixes, $src, $dest;
@@ -474,7 +474,7 @@ F<Makefile> (excluding predefined suffix rules).
sub suffix_rules_count ()
{
- return (scalar keys %suffix_rules) - (scalar keys %suffix_rules_builtin);
+ return (scalar keys %_suffix_rules) - (scalar keys %_suffix_rules_builtin);
}
=item C<@list = suffixes>