summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-01-23 09:15:58 +0000
committerNicholas Clark <nick@ccl4.org>2011-01-23 09:19:17 +0000
commitbb5cff7d658d1934f2c79f668c3b916bd9abbcbb (patch)
tree29b8aa7835f5a65f611e88b49f46d94b65ab26e3 /regen
parentc5f63f38b0ae222873c4deed7d506d491e9bc3a8 (diff)
downloadperl-bb5cff7d658d1934f2c79f668c3b916bd9abbcbb.tar.gz
In regen_lib.pl use a meaningful key for storing the file's name.
regen_lib.pl is actually using the hash slot of the typeglob, not the scalar slot. Typeglob syntax is particularly confusing and prone to errors, although in this case it doesn't make any behaviour difference.
Diffstat (limited to 'regen')
-rw-r--r--regen/regen_lib.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/regen/regen_lib.pl b/regen/regen_lib.pl
index 4ea2cf6514..b4d9f86c1e 100644
--- a/regen/regen_lib.pl
+++ b/regen/regen_lib.pl
@@ -65,14 +65,14 @@ sub safer_open {
my $name = shift;
my $fh = gensym;
open $fh, ">$name" or die "Can't create $name: $!";
- *{$fh}->{SCALAR} = $name;
+ *{$fh}->{name} = $name;
binmode $fh;
$fh;
}
sub safer_close {
my $fh = shift;
- close $fh or die 'Error closing ' . *{$fh}->{SCALAR} . ": $!";
+ close $fh or die 'Error closing ' . *{$fh}->{name} . ": $!";
}
sub read_only_top {