From: Akim Demaille Date: Sat, 2 Jun 2001 13:00:34 +0000 (+0000) Subject: * autom4te.in (Request::@request): Declare with `vars', not `my', X-Git-Tag: AUTOCONF-2.50a~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32322098aafb3fa7156e457fc44a73bed9f4c7bd;p=thirdparty%2Fautoconf.git * autom4te.in (Request::@request): Declare with `vars', not `my', as it prevents updates via `do FILENAME'. --- diff --git a/ChangeLog b/ChangeLog index 9b6693b4a..5e05f8a4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-02 Akim Demaille + + * autom4te.in (Request::@request): Declare with `vars', not `my', + as it prevents updates via `do FILENAME'. + 2001-06-02 Akim Demaille * configure.in (standards_texi): Remove, dead code. diff --git a/autom4te.in b/autom4te.in index 7abf31375..a89e0dc58 100644 --- a/autom4te.in +++ b/autom4te.in @@ -49,8 +49,12 @@ use Getopt::Long; use IO::File; use strict; -# List of requests -my @request; +# List of requests. +# We can't declare it `my' as the loading, performed via `do', +# would refer to another scope, and @request would not be updated. +# It used to work with `my' vars, and I don't know whether the current +# behavior (5.6) is wanted or not. +use vars qw(@request); struct ( @@ -200,8 +204,11 @@ sub load croak "$me: cannot load a single request\n" if ref ($self); - do "$filename" - or croak "$me: cannot source $filename: $!\n"; + (my $return) = do "$filename"; + + croak "$me: cannot parse $filename: $@\n" if $@; + croak "$me: cannot do $filename: $!\n" if $!; + croak "$me: cannot run $filename\n" unless $return; } @@ -919,6 +926,12 @@ my $req = Request->request ('source' => \@ARGV, 'path' => \@include, 'macro' => [keys %trace, @required_trace]); +if ($verbose) + { + print STDERR "$me: the trace request object is:\n"; + print STDERR $req->marshall; + } + # We need to run M4 if # - for traces # + there is no cache, or diff --git a/bin/autom4te.in b/bin/autom4te.in index 7abf31375..a89e0dc58 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -49,8 +49,12 @@ use Getopt::Long; use IO::File; use strict; -# List of requests -my @request; +# List of requests. +# We can't declare it `my' as the loading, performed via `do', +# would refer to another scope, and @request would not be updated. +# It used to work with `my' vars, and I don't know whether the current +# behavior (5.6) is wanted or not. +use vars qw(@request); struct ( @@ -200,8 +204,11 @@ sub load croak "$me: cannot load a single request\n" if ref ($self); - do "$filename" - or croak "$me: cannot source $filename: $!\n"; + (my $return) = do "$filename"; + + croak "$me: cannot parse $filename: $@\n" if $@; + croak "$me: cannot do $filename: $!\n" if $!; + croak "$me: cannot run $filename\n" unless $return; } @@ -919,6 +926,12 @@ my $req = Request->request ('source' => \@ARGV, 'path' => \@include, 'macro' => [keys %trace, @required_trace]); +if ($verbose) + { + print STDERR "$me: the trace request object is:\n"; + print STDERR $req->marshall; + } + # We need to run M4 if # - for traces # + there is no cache, or