Skip to content

Commit ce739c7

Browse files
committed
::Doc use parse_string_document - #545
1 parent 21f1758 commit ce739c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/PDL/Doc.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,11 @@ returning a hash of the functions found therein.
842842
843843
sub scantext {
844844
my ($text, $filename, $verbose) = @_;
845-
open my $infile, '<', \$text;
846845
my $parser = PDL::PodParser->new;
847846
$parser->{verbose} = $verbose;
848847
open my $outfile, '>', \(my $outfile_text);
849-
eval { $parser->parse_from_filehandle($infile,$outfile) };
848+
$parser->output_fh($outfile);
849+
eval { $parser->parse_string_document($text) };
850850
warn "cannot parse: $@" if $@ and $@ ne "no function defined\n";
851851
my %hash;
852852
$_->{File} = $filename for values %{ $parser->{SYMHASH} };

0 commit comments

Comments
 (0)