[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #298

Environment variables not expanded in vhier -f files

Added by John Dickol over 2 years ago. Updated almost 2 years ago.

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