Skip to content

Commit

Permalink
using eval around Pod::Parser method parse_from_filehandle which occa…
Browse files Browse the repository at this point in the history
…sionally dies (observed with PDL/Graphics/Gnuplot.pm on MSWin32)
  • Loading branch information
kmx committed Jan 2, 2015
1 parent 5fead2f commit bb1afb7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Doc/Doc.pm
Expand Up @@ -669,7 +669,9 @@ sub scan {
my $parser = new PDL::PodParser;
$parser->{verbose} = $verbose;
$parser->parse_from_filehandle($infile,$outfile);
eval { $parser->parse_from_filehandle($infile,$outfile) };
warn "cannot parse '$file'" if $@;
$this->{SYMS} = {} unless defined $this->{SYMS};
my $hash = $this->{SYMS};
my @stats = stat $file;
Expand All @@ -693,7 +695,9 @@ sub scan {
$outfile_text = '';
$parser = new PDL::PodParser;
$parser->select('NAME');
$parser->parse_from_filehandle($infile,$outfile);
eval { $parser->parse_from_filehandle($infile,$outfile) };
warn "cannot parse '$file'" if $@;
my @namelines = split("\n",$outfile_text);
my ($name,$does);
for (@namelines) {
Expand Down

0 comments on commit bb1afb7

Please sign in to comment.