as it prevents updates via `do FILENAME'.
+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.
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
(
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;
}
'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
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
(
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;
}
'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