This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
isSCRIPT_RUN: Can short cut if not in UTF-8
[perl5.git] / autodoc.pl
index 597607c..cf82639 100644 (file)
@@ -355,7 +355,7 @@ open my $fh, '<', 'MANIFEST'
 while (my $line = <$fh>) {
     next unless my ($file) = $line =~ /^(\S+\.[ch])\t/;
 
-    open F, "< $file" or die "Cannot open $file for docs: $!\n";
+    open F, '<', $file or die "Cannot open $file for docs: $!\n";
     $curheader = "Functions in file $file\n";
     autodoc(\*F,$file);
     close F or die "Error closing $file: $!\n";
@@ -383,6 +383,8 @@ foreach (sort keys %missing) {
 # deprecated.
 my @missing_api = grep $funcflags{$_}{flags} =~ /A/ && $funcflags{$_}{flags} !~ /[MD]/ && !$docs{api}{$_}, keys %funcflags;
 output('perlapi', <<'_EOB_', $docs{api}, \@missing_api, <<'_EOE_');
+=encoding UTF-8
+
 =head1 NAME
 
 perlapi - autogenerated documentation for the perl public API