chiller has asked for the wisdom of the Perl Monks concerning the following question:

Attempting to install the Email::Valid (0.13) module on my Win2k box, I noticed (oh my!) it won't run on Win32.

So, having read all the discussions/arguments about how to validate email addresses (which generally just conclude "use Email::Valid"), what should I do now?

Replies are listed 'Best First'.
Re: Email::Valid on Win32
by shotgunefx (Parson) on Apr 11, 2002 at 09:12 UTC
    Do you have Net::DNS installed?
    From pod:
    BUGS
    Email::Valid should work with Perl for Win32. In my experience, however, Net::DNS queries seem to take an extremely long time when a record cannot be found.

    If you still have problems installing and don't need the DNS check, just copy the .pm, hack out the parts of the module that do what you want and save it to a different module. Don't forget to change the package. Alternatively you could also reference the chkaddr as cited in the pod for Email::Valid.

    -Lee

    "To be civilized is to deny one's nature."
      When I say it "won't work, I mean (lifted from the 'bug report' @ CPAN:
      This was tested on two machines The problem I found is that when executing the command: Email::Valid->address($address) returns true when $address = 'whatever@whatever.com{' or 'whatever@whatever.com}' or 'whatever@whatever.com*' or 'whatever@whatever.com$' or 'whatever@whatever.com#' That is all that I tested, but I don't think that those addresses shou +ld return true. Mitch Freed ICServ Inc. mitch@icserv.net
      So, I am not sure what to take out. I don't need the DNS check.
        I see what you mean. The regex lets that pass on my win box (5.005, Hacked it out into a seperate file). I went looking for the problem but the regex is huge. I spent an hour trying to figure it out but it's beyond my meager regex experience.

        -Lee

        "To be civilized is to deny one's nature."
Re: Email::Valid on Win32
by MZSanford (Curate) on Apr 11, 2002 at 09:58 UTC
    When you say 'it won't run ', what do you mean ? Do you get an error ? If so, maybe you can make a patch to fix this, and submit it to the author. Post the error message, or a description of what happens, and maybe we can fix this and prevent others fromm the frustration. As always, just my €0.02
    from the frivolous to the serious
      See my reply to shotgunefx...

      Alternatively, ActiveState's ppd won't let me download it (says 'not intended for this platform' or something--probably cause of the bug). I *could* just build it myself but if there's something hideously wrong with it, then maybe I shouldn't.

      thanks

Re: Email::Valid on Win32
by legLess (Hermit) on Apr 11, 2002 at 16:47 UTC
    I know this isn't your question, chiller, but I'm going to get on my soapbox anyway. IMHO, Email::Valid, while a truly amazing regex, is a bad idea. Rather than repost, take a look at a previous post of mine on this topic.

    In short - Email::Valid checks for syntactic validity, and AFAIR can do domain lookups as well, but doesn't at all address the core issue: "Will this address connect me to this person?"
    --
    man with no legs, inc.
      Thanks. I will probably follow yr advice and just use some stupid regexp. I have implemented one of those validation systems that sends a msg to the email address you entered, so I guess if someone puts in a bad email address, yes, they should be more careful.