Skip Menu |

This queue is for tickets about the Net-Stomp CPAN distribution.

Report information
The Basics
Id: 68583
Status: resolved
Priority: 0/
Queue: Net-Stomp

People
Owner: JTANG [...] cpan.org
Requestors: TJC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.41
Fixed in: 0.45



Subject: "Use of uninitialized value" warning in as_string()
I have some code which, somehow, ends up undef values in the headers of a frame. This then triggers many "Use of uninitialized value" warnings, emitted from the following code in as_string() while ( my ( $key, $value ) = each %{ $headers || {} } ) { $frame .= $key . ':' . $value . "\n"; } I note that $headers dumps like so: $VAR1 = { 'message-id' => undef }; Perhaps the code above should look like this instead? while ( my ( $key, $value ) = each %{ $headers || {} } ) { $frame .= $key . ':' . (defined $value ? $value : '') . "\n"; }
On Wed Jun 01 07:11:00 2011, TJC wrote: Show quoted text
> Perhaps the code above should look like this instead? > > > while ( my ( $key, $value ) = each %{ $headers || {} } ) { > $frame .= $key . ':' . (defined $value ? $value : '') . "\n"; > }
This is one bug I'd love to see resolved - spamming my console and logs for no good reason, and so easy to fix
fixed in 0.45