diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-01-23 16:25:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-01-23 18:45:58 +0000 |
commit | e8fb9efbf973fedc74b46a30a67b602d07f033e9 (patch) | |
tree | b24aa82580c7aa8aba3ed06355c2a351a51729c0 /regen | |
parent | 0a2b78c5e9fca65a8b30a4191c5a8738548647eb (diff) | |
download | perl-e8fb9efbf973fedc74b46a30a67b602d07f033e9.tar.gz |
Output "read only" editor blocks from regen_perly.pl
Use safer_open() and read_only_bottom_close_and_rename() from regen_lib.pl
Consistently use 3 argument open and lexical file handles.
A side effect of this change is that the generated files are no longer made
read-only on disk - if this is desirable, then probably better to change
regen_lib.pl so that all generated files are made read-only.
Diffstat (limited to 'regen')
-rw-r--r-- | regen/regen_lib.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/regen_lib.pl b/regen/regen_lib.pl index 86d3b6c518..2d4ceac14f 100644 --- a/regen/regen_lib.pl +++ b/regen/regen_lib.pl @@ -71,7 +71,7 @@ sub safer_open { *{$fh}->{name} = $name; if (defined $final_name) { *{$fh}->{final_name} = $final_name; - *{$fh}->{lang} = ($final_name =~ /\.[ch]$/ ? 'C' : 'Perl'); + *{$fh}->{lang} = ($final_name =~ /\.(?:c|h|tab|act)$/ ? 'C' : 'Perl'); } binmode $fh; $fh; |