* autom4te.in (Request::@request): Declare with vars', not my',

as it prevents updates via `do FILENAME'.
This commit is contained in:
Akim Demaille 2001-06-02 13:00:34 +00:00
parent 52a4833e9f
commit 32322098aa
3 changed files with 39 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2001-06-02 Akim Demaille <akim@epita.fr>
* autom4te.in (Request::@request): Declare with `vars', not `my',
as it prevents updates via `do FILENAME'.
2001-06-02 Akim Demaille <akim@epita.fr>
* configure.in (standards_texi): Remove, dead code.

View File

@ -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

View File

@ -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