Skip Menu |

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

Report information
The Basics
Id: 6017
Status: resolved
Priority: 0/
Queue: Net-HL7

People
Owner: Nobody in particular
Requestors: jlunn [...] coderyte.com
Cc:
AdminCc:

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



Subject: Incorrect dereferencing of field components in Message::toString
Net:HL7::Message-0.71 This is perl, v5.6.1 built for i386-linux Linux hostname.domain.net 2.4.20-20.7 #1 Mon Aug 18 14:56:30 EDT 2003 i686 unknown Simple fail case: echo 'MSH|^~\&|CodeRyte HL7|CodeRyte HQ|VISION|MISYS|200404061744||DFT^P03|TC-2743|P^T|2.3|||AL|NE||ASCII||| |' | perl -e 'use Net::HL7::Message; $msg = new Net::HL7::Message( join("", <>) ); print $msg->toString(1), "\n"' patch: --- /usr/lib/perl5/site_perl/5.8.0/Net/HL7/Message.pm 2004-03-24 07:23:38.000000000 -0500 +++ Message.pm 2004-04-14 14:29:34.000000000 -0400 @@ -421,12 +421,12 @@ for (my $i = 0; $i < @{ $_ }; $i++) { - if (ref($_[$i]) eq "ARRAY") { + if (ref($_->[$i]) eq "ARRAY") { - $msg .= join($self->{SUBCOMPONENT_SEPARATOR}, @{ $_[$i] }); + $msg .= join($self->{SUBCOMPONENT_SEPARATOR}, @{ $_->[$i] }); } else { - $msg .= $_[$i]; + $msg .= $_->[$i]; } if ($i < (@{ $_ } - 1)) {
Solved (after all those years) in version 0.76