diff options
author | Guilhem Moulin <guilhem.moulin@fripost.org> | 2013-01-20 03:04:17 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@fripost.org> | 2013-01-20 03:04:17 +0100 |
commit | 35c4ad13a52bdcaab251358e4b7df99dd852c76d (patch) | |
tree | 8fcafeae85ae97332a6a5e9d0ff2abcd178e537b /lib/Fripost/Schema/Util.pm | |
parent | f7701a60f217ab154fe53a5d13bbd223f6182150 (diff) |
New domains.
Diffstat (limited to 'lib/Fripost/Schema/Util.pm')
-rw-r--r-- | lib/Fripost/Schema/Util.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Fripost/Schema/Util.pm b/lib/Fripost/Schema/Util.pm index b26214b..2692421 100644 --- a/lib/Fripost/Schema/Util.pm +++ b/lib/Fripost/Schema/Util.pm @@ -116,7 +116,10 @@ sub email_valid { -fqdn => 1 ); my $match = defined $addr; $match &&= $addr eq $in if $options{'-exact'}; - die $mesg." ‘".$i."’\n" unless $match; + unless ($match) { + return if $options{'-nodie'}; + die $mesg." ‘".$i."’\n"; + } $addr =~ s/^$options{'-prefix'}// if defined $options{'-prefix'}; return $addr; } |