Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-Printer CPAN distribution.

Report information
The Basics
Id: 103206
Status: resolved
Priority: 0/
Queue: Data-Printer

People
Owner: Nobody in particular
Requestors: OSCHWALD [...] cpan.org
Cc:
AdminCc:

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



Subject: Data::Printer warns on import if $ENV{HOME} isn't set
One of our cron script started warning with: Use of uninitialized value in subroutine entry at /opt/perl5.16.3/lib/site_perl/5.16.3/Data/Printer.pm line 967. It looks like the code assumes File::HomeDir->my_home will always return a valid value, which isn't necessarily the case.
From: fschlich [...] zedat.fu-berlin.de
perhaps use a patch like my $file = exists $args->{rc_file} ? $args->{rc_file} : exists $ENV{DATAPRINTERRC} ? $ENV{DATAPRINTERRC} - : File::Spec->catfile(File::HomeDir->my_home,'.dataprinter'); + : File::Spec->catfile(File::HomeDir->my_home//'','.dataprinter'); return unless -e $file; or something less ugly formatted...
RT-Send-CC: fschlich [...] zedat.fu-berlin.de
Hi guys! Thank you very much for using Data::Printer and for taking the time to file this issue and work on it - I really appreciate it. Also, apologies for the very long wait. I have failed to check RT after moving the issue tracker to Github. The newest version of Data::Printer on github master (on CPAN as 0.99_X) does not appear to have this issue anymore: $ unset HOME $ perl -Ilib -Mstrict -Mwarnings -E 'use DDP; my $f = 123; p $f' 123 This version will soon be released as 1.0 stable on CPAN. Thanks again! garu On Wed Jul 08 18:16:06 2015, fschlich wrote: Show quoted text
> perhaps use a patch like > > > my $file = exists $args->{rc_file} ? $args->{rc_file} > : exists $ENV{DATAPRINTERRC} ? $ENV{DATAPRINTERRC} > - : File::Spec->catfile(File::HomeDir-
> >my_home,'.dataprinter');
> + : File::Spec->catfile(File::HomeDir-
> >my_home//'','.dataprinter');
> > return unless -e $file; > > > or something less ugly formatted...