[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14441: [PATCH 7/8] Automake::Rule: consistently prepend underscore t
From: |
Stefano Lattarini |
Subject: |
bug#14441: [PATCH 7/8] Automake::Rule: consistently prepend underscore to private variables |
Date: |
Tue, 28 May 2013 11:45:39 +0200 |
* 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 <address@hidden>
---
lib/Automake/Rule.pm | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm
index b162865..ac4b71a 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>
--
1.8.3.rc3.8.g5e49f30
- bug#14441: bug in new file extensions, Felix Salfelder, 2013/05/22
- bug#14441: bug in new file extensions, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 0/8] Fix automake bug#14441, and related minor refactorings, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 3/8] suffix rules: better distinction between builtin and user-derived, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 1/8] tests: expose automake bug#14441, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 2/8] Automake::Rule: expose suffix rules as a function, not a scalar, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 4/8] Automake::Rule: make private variables lexically scoped, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 6/8] Automake::Rule: rename: suffix_rule() -> next_in_suffix_chain(), Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 5/8] Automake::Rule: adjust comments and POD according to previous changes, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 8/8] NEWS: document fix for bug#14441, Stefano Lattarini, 2013/05/28
- bug#14441: [PATCH 7/8] Automake::Rule: consistently prepend underscore to private variables,
Stefano Lattarini <=
- bug#14441: [PATCH 0/8] Fix automake bug#14441, and related minor refactorings, Stefano Lattarini, 2013/05/29
- Message not available