Subject: | Tab in email address deletes preceding text |
If an email address contains a tab (x'09') character, all text
preceding the tab is deleted when the email address is processed by the
parse method of Email::Address (version 1.892). See attached test
program and results file for example. I get the same result running
Activestate Perl 5.8.9 on Windows Vista and Perl 5.8.8 on linux.
Subject: | test_email_address_module.pl |
#!/usr/bin/perl
#####################################################################
# Name: test_email_address_module.pl
# Desc: Text preceding TAB character is deleted.
#####################################################################
use strict;
use warnings;
use Email::Address;
my $email = 'address _tab@foo.com';
my @address = Email::Address->parse($email);
print "\n";
printf("%8s: %s\n", $_, $email) for ( qw( original ) );
for my $address (@address) {
printf("%8s: %s\n", $_, ($address->$_ or '')) for (qw( address user host name phrase comment format ));
}
print "\n";
Subject: | test_email_address_module.txt |
original: address _tab@foo.com
address: _tab@foo.com
user: _tab
host: foo.com
name: _tab
phrase:
comment:
format: _tab@foo.com