Request for review: std.net.isemail

Jacob Carlborg doob at me.com
Thu Mar 24 01:53:00 PDT 2011


On 2011-03-23 22:20, Dmitry Olshansky wrote:
> On 23.03.2011 1:04, Jacob Carlborg wrote:
>> I've now finished the port of Dominic Sayers' PHP is_email function
>> (http://www.dominicsayers.com/isemail) and sending it for review.
>>
>> A few comments:
>>
>> * Due to limitations in std.regex some unit tests fail and are out
>> commented
>
> I have tried that with my patch for std.regex
> (seehttp://d.puremagic.com/issues/show_bug.cgi?id=5673 ).
> Actually, std.regex future is worth of another NG thread altogether.
> BTW if there anything wrong with that patch, *please* submit any kind of
> feedback.
> All of commented out regex unittests pass except these two.
>
> Line 824:
> assert(`test@[IPv6:::3333:4444:5555:6666:7777:8888]`.isEmail(false,
> EmailStatusCode.On).statusCode == EmailStatusCode.Rfc5321AddressLiteral);
> Line 826: assert(`test@[IPv6:::]`.isEmail(false,
> EmailStatusCode.On).statusCode == EmailStatusCode.Rfc5321AddressLiteral);
>
> Both status message is reportedly "IPv6 address starts with a single
> colon" haven't looked into that deeper.

I haven't tried with your patch yet, sorry.

> Speaking of module itself, overall, I'd say it already has simple and
> convenient interface.
> I concur with others, that none of helper artifacts should slip into the
> docs though, they are just that - an implementation detail for the most
> part.
>
>>
>> * Due to some bugs (4673, 5744) in Phobos this module contains private
>> functions with fixes for these bugs
>>
> Yeah, there are always not enough bugfixes to pull new module it seems ;).
>
>> * The DNS check is not implemented resulting in a few out commented
>> unit tests
>>
>> Github: https://github.com/jacob-carlborg/phobos/tree/isemail
>> Documentation: http://dl.dropbox.com/u/18386187/isemail.html
>>
>
>


-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list