Subject: | Undefined value warning |
Date: | Thu, 8 Dec 2016 11:13:37 +0000 |
To: | bug-Text-Reflow [...] rt.cpan.org |
From: | Gareth Tunley <gjtunley [...] gmail.com> |
Hi,
I am using this module to reflow text from a database to fit into a column
in a spreadsheet and am getting lots of:
Use of unititialized value within @Text::Reflow::from in string eq at
/usr/local/lib/perl/5.18.2/Text/Reflow.pm line 291.
Basically I am calling it as follows:
foreach my $row (@results_from_db) {
$row->{SomeNotesField} = reflow_string(
$row->{SomeNotesField} || '',
maximum => 80,
optimum => 75,
);
}
You can reproduce this as follows:
#!/usr/bin/perl -w
use Text::Reflow qw(reflow_string);
use strict;
use warnings;
print reflow_string('');
exit;
$ perl -v
This is perl 5, version 18, subversion 2 (v5.18.2) built for
x86_64-linux-gnu-thread-multi
(with 44 registered patches. see perl -V for more detail)
$ grep '$Text::Reflow::VERSION' /usr/local/lib/perl/5.18.2/Text/Reflow.pm
$Text::Reflow::VERSION = "1.16";
Thanks
Gareth
--
Gareth Tunley - gjtunley@gmail.com