Skip Menu |

This queue is for tickets about the App-FatPacker CPAN distribution.

Report information
The Basics
Id: 112221
Status: open
Priority: 0/
Queue: App-FatPacker

People
Owner: Nobody in particular
Requestors: qgarnier [...] centreon.com
Cc:
AdminCc:

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



Subject: Cannot use pod_where/pod2usage with my fatpacked modules
Date: Sat, 20 Feb 2016 13:00:01 +0100
To: bug-App-FatPacker [...] rt.cpan.org
From: Quentin Garnier <qgarnier [...] centreon.com>
Hi, I use pod2usage function (also pod_where) to display a help to stdout. The pod is in my module.pm file. After i have created my single file with fatpacker, it doesn't work anymore. Do you have a solution to keep it working (even if i have to change the pod2usage or pod_where call arguments) ? Thanks -- *Quentin GarnierSolutions Architect / Centreon* Email: qgarnier@centreon.com <rlemerlus@merethis.com> Mob: +33 (0) 6 64 81 16 48 <http://+33%20%280%29%206%2085%2005%2002%2082/> Fax: +33 (0) 1 78 12 00 28 <http://+33%20%280%29%201%2078%2012%2000%2028/>
I have found a way. I looked in %INC table: my $pp = $_->{package} . ".pm"; $pp =~ s{::}{/}g; my $content_class = $INC{$pp}->{$pp}; open my $str_fh, '<', \$content_class; local *STDOUT; open STDOUT, '>', \$stdout; pod2usage(-exitval => 'NOEXIT', -input => $str_fh, -verbose => 99, -sections => $_->{sections}); close $str_fh; On Sat Feb 20 07:00:13 2016, qgarnier@centreon.com wrote: Show quoted text
> Hi, > > I use pod2usage function (also pod_where) to display a help to stdout. The > pod is in my module.pm file. > After i have created my single file with fatpacker, it doesn't work > anymore. Do you have a solution to keep it working (even if i have to > change the pod2usage or pod_where call arguments) ? > > Thanks >