diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Autom4te/Channels.pm | 55 | ||||
-rw-r--r-- | lib/Autom4te/Configure_ac.pm | 5 | ||||
-rw-r--r-- | lib/Autom4te/FileUtils.pm | 19 | ||||
-rw-r--r-- | lib/Autom4te/Getopt.pm | 5 | ||||
-rw-r--r-- | lib/Autom4te/XFile.pm | 7 |
5 files changed, 40 insertions, 51 deletions
diff --git a/lib/Autom4te/Channels.pm b/lib/Autom4te/Channels.pm index 279370d2..83090e86 100644 --- a/lib/Autom4te/Channels.pm +++ b/lib/Autom4te/Channels.pm @@ -74,19 +74,19 @@ use Carp; use Exporter; use File::Basename; -use vars qw (@EXPORT @ISA %channels $me); -@ISA = qw (Exporter); -@EXPORT = qw ($exit_code $warnings_are_errors - &reset_local_duplicates &reset_global_duplicates - ®ister_channel &msg &exists_channel &channel_type - &setup_channel &setup_channel_type - &dup_channel_setup &drop_channel_setup - &buffer_messages &flush_messages - &setup_channel_queue &pop_channel_queue - US_GLOBAL US_LOCAL - UP_NONE UP_TEXT UP_LOC_TEXT); - -$me = basename $0; +our @ISA = qw (Exporter); +our @EXPORT = qw ($exit_code $warnings_are_errors + &reset_local_duplicates &reset_global_duplicates + ®ister_channel &msg &exists_channel &channel_type + &setup_channel &setup_channel_type + &dup_channel_setup &drop_channel_setup + &buffer_messages &flush_messages + &setup_channel_queue &pop_channel_queue + US_GLOBAL US_LOCAL + UP_NONE UP_TEXT UP_LOC_TEXT); + +our %channels; +our $me = basename $0; =head2 Global Variables @@ -99,8 +99,7 @@ the C<exit_code> options of C<fatal> and C<error> channels. =cut -use vars qw ($exit_code); -$exit_code = 0; +our $exit_code = 0; =item C<$warnings_are_errors> @@ -109,8 +108,7 @@ errors (i.e. if they should update C<$exit_code>). =cut -use vars qw ($warnings_are_errors); -$warnings_are_errors = 0; +our $warnings_are_errors = 0; =back @@ -260,11 +258,8 @@ be ignored. =cut -use vars qw (%_default_options %_global_duplicate_messages - %_local_duplicate_messages); - # Default options for a channel. -%_default_options = +our %_default_options = ( type => 'warning', exit_code => 1, @@ -284,8 +279,8 @@ use vars qw (%_default_options %_global_duplicate_messages # Filled with output messages as keys, to detect duplicates. # The value associated with each key is the number of occurrences # filtered out. -%_local_duplicate_messages = (); -%_global_duplicate_messages = (); +our %_local_duplicate_messages = (); +our %_global_duplicate_messages = (); sub _reset_duplicates (\%) { @@ -404,8 +399,7 @@ sub _format_sub_message ($$) } # Store partial messages here. (See the 'partial' option.) -use vars qw ($partial); -$partial = ''; +our $partial = ''; # _format_message ($LOCATION, $MESSAGE, %OPTIONS) # ----------------------------------------------- @@ -620,11 +614,9 @@ both print =cut -use vars qw (@backlog %buffering); - # See buffer_messages() and flush_messages() below. -%buffering = (); # The map of channel types to buffer. -@backlog = (); # The buffer of messages. +our %buffering = (); # The map of channel types to buffer. +our @backlog = (); # The buffer of messages. sub msg ($$;$%) { @@ -716,9 +708,8 @@ entry, while C<drop_channel_setup ()> just deletes it. =cut -use vars qw (@_saved_channels @_saved_werrors); -@_saved_channels = (); -@_saved_werrors = (); +our @_saved_channels = (); +our @_saved_werrors = (); sub dup_channel_setup () { diff --git a/lib/Autom4te/Configure_ac.pm b/lib/Autom4te/Configure_ac.pm index d3f095d5..78b161bc 100644 --- a/lib/Autom4te/Configure_ac.pm +++ b/lib/Autom4te/Configure_ac.pm @@ -29,9 +29,8 @@ use Exporter; use Autom4te::ChannelDefs; use Autom4te::Channels; -use vars qw (@EXPORT @ISA); -@ISA = qw (Exporter); -@EXPORT = qw (&find_configure_ac &require_configure_ac); +our @ISA = qw (Exporter); +our @EXPORT = qw (&find_configure_ac &require_configure_ac); =head1 NAME diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm index fcdf48e6..a182031b 100644 --- a/lib/Autom4te/FileUtils.pm +++ b/lib/Autom4te/FileUtils.pm @@ -45,14 +45,13 @@ use IO::File; use Autom4te::Channels; use Autom4te::ChannelDefs; -use vars qw (@EXPORT @ISA); -@ISA = qw (Exporter); -@EXPORT = qw (&contents - &find_file &mtime - &update_file - &xsystem &xsystem_hint &xqx - &dir_has_case_matching_file &reset_dir_cache - &set_dir_cache_file); +our @ISA = qw (Exporter); +our @EXPORT = qw (&contents + &find_file &mtime + &update_file + &xsystem &xsystem_hint &xqx + &dir_has_case_matching_file &reset_dir_cache + &set_dir_cache_file); =over 4 @@ -332,7 +331,7 @@ same file). =cut -use vars '%_directory_cache'; +our %_directory_cache; sub dir_has_case_matching_file ($$) { # Note that print File::Spec->case_tolerant returns 0 even on MacOS @@ -383,4 +382,6 @@ sub set_dir_cache_file ($$) =back +=cut + 1; # for require diff --git a/lib/Autom4te/Getopt.pm b/lib/Autom4te/Getopt.pm index f70a5c58..c32c2cce 100644 --- a/lib/Autom4te/Getopt.pm +++ b/lib/Autom4te/Getopt.pm @@ -40,9 +40,8 @@ use Getopt::Long (); use Autom4te::ChannelDefs qw (fatal); -use vars qw (@EXPORT @ISA); -@ISA = qw (Exporter); -@EXPORT = qw (getopt); +our @ISA = qw (Exporter); +our @EXPORT = qw (getopt); =item C<parse_options (%option)> diff --git a/lib/Autom4te/XFile.pm b/lib/Autom4te/XFile.pm index 143b8b43..fcc0e68b 100644 --- a/lib/Autom4te/XFile.pm +++ b/lib/Autom4te/XFile.pm @@ -81,10 +81,9 @@ use Autom4te::ChannelDefs; use Autom4te::Channels qw (msg); use Autom4te::FileUtils; -use vars qw ($AUTOLOAD @EXPORT @EXPORT_OK @ISA $VERSION); -@ISA = qw(Exporter IO::File); -@EXPORT = @IO::File::EXPORT; -$VERSION = "1.2"; +our @ISA = qw(Exporter IO::File); +our @EXPORT = @IO::File::EXPORT; +our $VERSION = "1.2"; eval { # Make all Fcntl O_XXX and LOCK_XXX constants available for importing |