Skip Menu |

This queue is for tickets about the Business-US-USPS-WebTools CPAN distribution.

Report information
The Basics
Id: 22864
Status: resolved
Priority: 0/
Queue: Business-US-USPS-WebTools

People
Owner: bdfoy [...] cpan.org
Requestors: jaybuffington [...] gmail.com
Cc:
AdminCc:

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



Subject: warnings when creating XML request (patch)
The below patch removes this warning when a field isn't defined. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.2/Business/US/USPS/WebTools/AddressStandardization.pm line 117. @@ -114,6 +114,7 @@ foreach my $field ( $self->_fields ) { + next if !$$hash{$field}; $xml .= "<$field>$$hash{$field}</$field>"; }
From: jaybuffington [...] gmail.com
After using the above patch for a bit I realized that you some fields are required, but their values are not. Instead, we should do something like this: foreach my $field ( $self->_fields ) { my $value = $$hash{$field} || ''; $xml .= "<$field>$value</$field>"; } Jay
I've fixed this in 1.09 by turning off warnings for uninitialized values.