Skip to content

Commit 8742c5e

Browse files
committed
Fix Verilog::Std being empty on fork, bug1394.
1 parent 37addd2 commit 8742c5e

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

Changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ The contributors that suggested a given feature are shown in []. [by ...]
44
indicates the contributor was also the author of the fix; Thanks!
55

66

7+
* Verilog::Language 3.460 2019-01-26
8+
9+
*** Fix Verilog::Std being empty on fork, bug1394. [Corey Teffetalor]
10+
11+
712
* Verilog::Language 3.458 2019-01-24
813

914
*** Add Verilog::Cell::range accessor, bug1393. [Ed Carstens]

Std.pm

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,10 @@ use vars qw($VERSION);
1717
$VERSION = '3.458';
1818

1919
#######################################################################
20-
# ACCESSORS
21-
22-
our %_Std_Data;
23-
24-
sub std {
25-
my $std = shift || Verilog::Language::language_standard();
26-
if (!$_Std_Data{$std}) {
27-
my @out;
28-
foreach (<DATA>) {
29-
last if $_ =~ /^__END__/;
30-
last if $std !~ /^1800/; # Non system verilog, ie 1364 has no std package
31-
push @out, $_;
32-
}
33-
$_Std_Data{$std} = join('',@out);
34-
}
35-
return $_Std_Data{$std};
36-
}
37-
38-
#######################################################################
39-
# It's a PITRA to have pure datafiles get installed properly,
40-
# so we just paste our text into this package.
41-
1;
42-
__DATA__
20+
# It's a PITRA to have pure datafiles get installed properly, so we have
21+
# the std text here in this package.
4322

23+
our $_Std_Text = <<EOF;
4424
`line 1 "Perl_Verilog::Std_module" 0
4525
// Verilog-Perl Verilog::Std
4626
// The basis for this package is described in IEEE 1800-2017 Annex G
@@ -84,7 +64,22 @@ endpackage : std
8464
8565
import std::*;
8666
87-
__END__
67+
EOF
68+
69+
#######################################################################
70+
# ACCESSORS
71+
72+
sub std {
73+
my $std = shift || Verilog::Language::language_standard();
74+
if ($std =~ /^1800/) {
75+
return $_Std_Text;
76+
} else {
77+
return "";
78+
}
79+
}
80+
81+
#######################################################################
82+
1;
8883

8984
=pod
9085

0 commit comments

Comments
 (0)