Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 106228 - Unrecognised line from perl module Valid.pm
Unrecognised line from perl module Valid.pm
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-10-03 15:53 EDT by Neil Watson
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version: ALL
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-11 18:40:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Neil Watson 2003-10-03 15:53:15 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728
Mozilla Firebird/0.6.1

Description of problem:
Running Perl 5.8.0 Email::Valid v 0.15 and Email::Valid::Loose 0.02 on Redhat 9.

Test code:


use strict;
use warnings;

use Email::Valid::Loose;

my ($add, @adds);

my $addrfile = $ARGV[0] || die "filename not given";

open (EMAILS, "$addrfile");

#remove troublesome windows /r characters
#and whitespace
 while (<EMAILS>){
    chomp $_;
    $_ =~ s/\015//;
    $_ =~ s/\s//g;
    push @adds, $_;
close (EMAILS);

foreach $add (@adds){

    #if email is invalid move on
    if (!defined(Email::Valid::Loose->address($add))){
        print $add." is a bad address\n"; #address is bad
        print $add." is a good address\n"; #address is good

Test file:


The error:

Unrecognised line: user1@foo.com at /usr/lib/perl5/site_perl/5.8.0/Email/Valid.pm
line 232

This code does work on Mandrake 8.1 (perl 5.6.1) Gentoo 1.4 (same versions as
above) and Redhat 6.2.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See sample code in description    

Additional info:
Comment 1 Paulo Matos 2004-04-28 07:00:00 EDT
Another description of the problem on an entire different setup:

Just for the record, the cause and solution:

Mail::Address->parse($email) caused an the error (croaks):

Unrecognised line: 'foo@mydomain.com'

Well, it seems that perl 5.8.0-5.8.? has several problems with utf8.

The internal representation of perl strings has an UTF-8 flag associated 
that can be turned off via Encode::_utf8_off($string), so a way to solve 
some issues like this are to use this workaround. (see Encode 
documentation for more details).

I saw postings refering that the problem may be cause by using perl with 
thread support, which is not the case I tested it under perl with and 
without thread support with the same results. (The stock perl shipped
some distros are threaded enabled: e.g. RedHat 9, RHEL, WBEL...)

A generic workaround to cases like this would be to use: 


before calling the problematic function, which in this case is 

This has to be used with caution since it messes with perl internals,
so sometimes you'll have to switch the flag on after calling the function.

Comment 2 Jason Vas Dias 2005-11-11 18:40:34 EST
Very sorry for the long delay in processing this bug report.
This bug is no longer a problem with the perl in any current Red Hat OS.

Note You need to log in before you can comment on or make changes to this bug.