[Melbourne-pm] OT: Re: FW: Bamboozled by perl

Craig Sanders cas at taz.net.au
Mon Oct 5 03:03:32 PDT 2009


On Mon, Oct 05, 2009 at 03:37:23PM +1100, Toby Corkindale wrote:
> I don't think that "meeting the standard requirements" can be
> equated with "brain damaged", in fact I would say it's good software
> engineering - but apparently that's just a difference of opinion
> between us.

true.

the rule of thumb to use here is, as always, "be liberal in what you
accept, but strict in what you emit".

in this case, "liberal" means if you're going to try matching email
addresses then you have to match every possible valid email address, not
just an arbitrary subset.

fortunately, the RFCs have very precise definitions of what a valid
email address can be, and there are perl modules which can parse any
matching address.

craig

PS: variations of this are bugs that i run across quite frequently -
there are far too many cretinous web site developers who think, for
example, that "+" isn't a valid character in email addresses.  or
they don't think about it at all and are just lazy.

-- 
craig sanders <cas at taz.net.au>


More information about the Melbourne-pm mailing list