Skip Menu |

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

Report information
The Basics
Id: 71750
Status: resolved
Priority: 0/
Queue: Pod-Perldoc

People
Owner: Nobody in particular
Requestors: Christian.Holland [...] NashTech.Com
Cc:
AdminCc:

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



Subject: second call to sub process fails
Date: Tue, 18 Oct 2011 09:38:06 +0200
To: "bug-Pod-Perldoc [...] rt.cpan.org" <bug-Pod-Perldoc [...] rt.cpan.org>
From: Christian Holland <Christian.Holland [...] NashTech.Com>
Hi all, this is the first time I repoort a bug from a perl module, so I try my best. E.g. PERLDOC=-T perl -e 'use Pod::Perldoc; my $p=Pod::Perldoc->new; $p->{formatter_classes}=[Pod::Perldoc::ToPod]; $p->{args}=[perldoc]; $p->process; $p->process;' My analysis: First time calling "sub process" is ok. Second time it calls as before "sub find_good_formatter_class". In "sub find_good_formatter_class" exists two local hashes "%class_seen" and "%class_loaded". In the "foreach" in "sub find_good_formatter_class": 1. nowhere %class_loaded is set (as I see), but checked. 2. %class_seen is checked "if($class_seen{$c})" and set "$class_seen{$c} = 1" afterwards. So first time the module is loaded (eval "require $c"). But a second call will skip the successful loaded module and try next one. So I recommend to set "$class_loaded{$c} = 1" after successful loading. As far I can see this bug exists in every version of Pod::Perldoc Regards Christian
I need to investigate this, but I will look into it.
On Tue Oct 18 03:38:28 2011, Christian.Holland@NashTech.Com wrote: Show quoted text
> So I recommend to set "$class_loaded{$c} = 1" after successful > loading.
This should be fixed in 3.15_15 which I just uploaded to CPAN. Thanks for the report.