Subject: | uninitialized warnings |
Date: | Sun, 06 Jan 2013 23:36:17 +0100 |
To: | bug-Mojolicious-Plugin-MailException [...] rt.cpan.org |
From: | Renée Bäcker <reb [...] perl-services.de> |
Use of uninitialized value in sprintf at
/usr/local/share/perl/5.12.4/Mojolicious/Plugin/MailException.pm line
116, <DATA> line 1000.
Use of uninitialized value in sprintf at
/usr/local/share/perl/5.12.4/Mojolicious/Plugin/MailException.pm line
116, <DATA> line 1000.
Use of uninitialized value in sprintf at
/usr/local/share/perl/5.12.4/Mojolicious/Plugin/MailException.pm line
116, <DATA> line 1000.
Use of uninitialized value in sprintf at
/usr/local/share/perl/5.12.4/Mojolicious/Plugin/MailException.pm line
116, <DATA> line 1000.
=>
You should check the lines. Mojolicious::Exception uses this in its
'to_string' method:
| ||# Line|
| ||$string| |.= (||$self||->line->[0] . ||': '| |.
||$self||->line->[1] . ||"\n"||)|
| ||if| |$self||->line->[0];
|
So your code could look like:
| ||$text| |.= ||sprintf| |" %*d %s\n"||, ||$maxl||, @{||$_||}[0,1]
||for| |@{ ||$e||->lines_before };|
| ||$text| |.= ||sprintf| |" * %*d %s\n"||, ||$maxl||, @{
||$e||->line }[0,1] if $e->line->[0];|
| ||$text| |.= ||sprintf| |" %*d %s\n"||, ||$maxl||, @{||$_||}[0,1]
||for| |@{ ||$e||->lines_after };|
- Renée
--
Perl-Services.de Renée Bäcker
Renée Bäcker
Bergfeldstr. 23
64560 Riedstadt
Telefon: 0180-300 221 048 94
Ust-ID: DE274867092