Issue #298
Environment variables not expanded in vhier -f files
| Status: | Closed | Start date: | 11/01/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
Environment variables are not being expanded when I use them in a file read in with -f. The problem appears to be due to Getopt::Long calling the subroutine associated with "<>" with a object reference, not a string for the unrecognised parameter. (See http://search.cpan.org/~jv/Getopt-Long-2.38/lib/Getopt/Long.pm#Argument_callback ) This object doesn't work as expected in the regular expression in sub file_substitute in Verilog/Getopt.pm.
To fix it: double quote the $param variable before pushing it onto the @opt_files array in vhier (and vppreproc, etc.)
sub parameter {
my $param = shift;
if ($param =~ /^--?/) {
die "%Error: vhier: Unknown parameter: $param\n";
} else {
#push @opt_files, $param;
push @opt_files, "$param";
}
}
History
Updated by Wilson Snyder over 2 years ago
- Status changed from New to Resolved
- Assignee set to Wilson Snyder
Wow, it's amazing I didn't know that getopt issue!
Fixed, and in a bunch of other places too, just to be safe.
In git for 3.305+.
Updated by Wilson Snyder over 2 years ago
In 3.305.
Updated by Wilson Snyder almost 2 years ago
- Status changed from Resolved to Closed
Also available in: Atom
![[logo]](/img/veripool_small.png)