From: Wolfram Schneider Date: Wed, 28 Apr 2010 15:47:26 +0000 (+0200) Subject: fix validation tests X-Git-Tag: CPAN-v1.02~76^2~1 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=a5f00f3a4f8a59fb31d83a3b5d4a8d14abda9a3c;p=irspy-moved-to-github.git fix validation tests --- diff --git a/lib/ZOOM/IRSpy/Utils.pm b/lib/ZOOM/IRSpy/Utils.pm index 856e602..4fd7677 100644 --- a/lib/ZOOM/IRSpy/Utils.pm +++ b/lib/ZOOM/IRSpy/Utils.pm @@ -848,7 +848,7 @@ sub validate_record { my @errors = $id; if ($tests{'protocol'}) { - push(@errors, 'protocol number is not valid') if $protocol !~ /^(z39\.50|sru|srw|tcp)$/; + push(@errors, 'protocol number is not valid') if $protocol !~ /^(z39\.50|sru|srw|tcp)$/i; } if ($tests{'port'}) { @@ -861,7 +861,7 @@ sub validate_record { if ($tests{'database'}) { push(@errors, 'database name is not valid') if $dbname =~ m,/,i; - push(@errors, 'database has trailing spaces') if $dbname ne trimField($dbname); + push(@errors, 'database has trailing spaces') if $dbname =~ /^\s+|\s+$/; } if ($tests{'hosturl'}) {