Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Pod-Simple CPAN distribution.

Report information
The Basics
Id: 74265
Status: resolved
Priority: 0/
Queue: Pod-Simple

People
Owner: Nobody in particular
Requestors: BOLDRA [...] boldra.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 3.20



Subject: Pod::Simple::PullParser cache
Pod::Simple::PullParser caches first results despite second call to set_source Test Code: perl -E 'use Pod::Simple::PullParser 888; my $parser= Pod::Simple::PullParser->new; $doc1="=head1 NAME\n\nFOO"; $doc2="=head1 NAME\n\nBAR"; $parser->set_source(\$doc1); say $parser->get_title; $parser->set_source(\$doc2); say $parser->get_title' At the very least the second call to set_source should die. A slight improvement would be to require the source in the constructor. Ideally a second call to set_source would save instantiating a new object, but force re-parsing of the POD.
On 2012-01-23 09:39:42, BOLDRA wrote: Show quoted text
> Pod::Simple::PullParser caches first results despite second call to > set_source > > Test Code: > > perl -E 'use Pod::Simple::PullParser 888; my $parser= > Pod::Simple::PullParser->new; $doc1="=head1 NAME\n\nFOO"; $doc2="=head1 > NAME\n\nBAR"; $parser->set_source(\$doc1); say $parser->get_title; > $parser->set_source(\$doc2); say $parser->get_title' > > At the very least the second call to set_source should die. A slight > improvement would be to require the source in the constructor. Ideally > a second call to set_source would save instantiating a new object, but > force re-parsing of the POD. >
Fixed here: https://github.com/theory/pod- simple/commit/a61859ea40682674e9d86dfc49a2ecd4bae818b0 Thank you for the report!