mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Remove a couple of symbolic reference abuses: the texi2html developers
had left one that made Perl 5.00503 very unhappy. Create and use filehandles The Right Way(tm) instead of using the 'no strict refs' bandaid. Prompted by: kris
This commit is contained in:
parent
24a534b457
commit
571f16bbe3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=95710
51
textproc/texi2html/files/patch-texi2html.pl
Normal file
51
textproc/texi2html/files/patch-texi2html.pl
Normal file
@ -0,0 +1,51 @@
|
||||
--- texi2html.pl.old Sat Dec 13 07:39:45 2003
|
||||
+++ texi2html.pl Sat Dec 13 07:40:11 2003
|
||||
@@ -174,7 +174,6 @@
|
||||
$ext
|
||||
$extensions
|
||||
$failed
|
||||
- $fh_name
|
||||
$file
|
||||
$first_index_chapter
|
||||
$first_line
|
||||
@@ -4127,25 +4126,22 @@
|
||||
sub open
|
||||
{
|
||||
my($name) = @_;
|
||||
+ local *FH;
|
||||
|
||||
- ++$fh_name;
|
||||
- no strict "refs";
|
||||
- if (open($fh_name, $name))
|
||||
+ if (open(*FH, $name))
|
||||
{
|
||||
- unshift(@fhs, $fh_name);
|
||||
+ unshift(@fhs, *FH);
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "$ERROR Can't read file $name: $!\n";
|
||||
}
|
||||
- use strict "refs";
|
||||
}
|
||||
|
||||
sub init_input
|
||||
{
|
||||
@fhs = (); # hold the file handles to read
|
||||
@input_spool = (); # spooled lines to read
|
||||
- $fh_name = 'FH000';
|
||||
&open($docu);
|
||||
}
|
||||
|
||||
@@ -4420,9 +4416,8 @@
|
||||
if ($style =~ /^\&/)
|
||||
{ # custom
|
||||
$style = $';
|
||||
- no strict "refs";
|
||||
- $text = &$style($text, $texi_style);
|
||||
- use strict "refs";
|
||||
+ eval "\$text = &$style(\$text, \$texi_style)";
|
||||
+ die $@ if $@;
|
||||
}
|
||||
elsif ($style)
|
||||
{ # good style
|
Loading…
Reference in New Issue
Block a user