There's no point to use qr here, as these are mostly strings which are substituted into other regular expressions.
Also, please try and avoid lines over 80 characters. -R Jared Johnson wrote: > > Robin Bowes wrote: > > Any reason this, and most/all the other regex definitions are not qr{...} ? > > Good idea! Attached a new patch. Tested with normal address syntax > and u...@[ip] syntax, with $Qpsmtpd::Address::address_literal_expr set > and unset... it might need some closer review for any other cases of > syntax that I don't really understand. > > This patch also includes a showstopper fix I made in testing that > didn't make into my first patch: > > - my ($localpart, $domainpart) = ($path =~ /^(.*)\@(${domain_expr})$/); > + my ($localpart, $domainpart) = ($path =~ /^(.*)\@(${domain})$/); > > Enjoy! > > -Jared >