From 338e5e4cab7cc5fc57af1a91f71abd17443eebfd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 16 Sep 2002 04:50:51 +0000 Subject: [PATCH] Don't use 'our', as it isn't portable to Perl 5.00503. --- lib/Automake/Channels.pm | 50 +++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm index 13adb6b..7b99bbf 100644 --- a/lib/Automake/Channels.pm +++ b/lib/Automake/Channels.pm @@ -1,4 +1,4 @@ -# Copyright 2002 Free Software Foundation, Inc. +# Copyright (C) 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -62,18 +62,19 @@ use Exporter; use Carp; use File::Basename; -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 - US_GLOBAL US_LOCAL - UP_NONE UP_TEXT UP_LOC_TEXT); +use vars qw (@ISA @EXPORT %channels $me); -our %channels; -our $me = basename $0; +@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 + US_GLOBAL US_LOCAL + UP_NONE UP_TEXT UP_LOC_TEXT); + +$me = basename $0; =head2 Global Variables @@ -86,7 +87,8 @@ the C options of C and C channels. =cut -our $exit_code = 0; +use vars qw ($exit_code); +$exit_code = 0; =item C<$warnings_are_errors> @@ -95,7 +97,8 @@ errors (i.e. if they should update C<$exit_code>). =cut -our $warnings_are_errors = 0; +use vars qw ($warnings_are_errors); +$warnings_are_errors = 0; =back @@ -194,8 +197,11 @@ Die with a stack backtrace after displaying the message. =cut +use vars qw (%_default_options %_global_duplicate_messages + %_local_duplicate_messages); + # Default options for a channel. -our %_default_options = +%_default_options = ( type => 'warning', exit_code => 1, @@ -211,8 +217,8 @@ our %_default_options = # Filled with output messages as keys, to detect duplicates. # The value associated to each keys is the number of occurences # filtered out. -our %_local_duplicate_messages = (); -our %_global_duplicate_messages = (); +%_local_duplicate_messages = (); +%_global_duplicate_messages = (); sub _reset_duplicates (\%) { @@ -435,9 +441,12 @@ both print =cut + +use vars qw (@backlog %buffering); + # See buffer_messages() and flush_messages() below. -our %buffering = (); # The map of channel types to buffer. -our @backlog = (); # The buffer of messages. +%buffering = (); # The map of channel types to buffer. +@backlog = (); # The buffer of messages. sub msg ($$;$%) { @@ -524,7 +533,8 @@ entry, while C just deletes it. =cut -our @_saved_channels = (); +use vars qw (@_saved_channels); +@_saved_channels = (); sub dup_channel_setup () { -- 2.7.4