diff Lib/IMPL/Web/Application/Action.pm @ 149:b04e978d6d5a

minor changes
author wizard
date Wed, 18 Aug 2010 03:14:57 +0400
parents 60fd224f3e3c
children 4267a2ac3d46
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/Action.pm	Mon Aug 16 08:26:44 2010 +0400
+++ b/Lib/IMPL/Web/Application/Action.pm	Wed Aug 18 03:14:57 2010 +0400
@@ -84,7 +84,7 @@
 sub cookie {
 	my ($this,$name,$rx) = @_;
 	
-	$this->_launder( $this->query->cookie($name), $rx );
+	$this->_launder(scalar( $this->query->cookie($name) ), $rx );
 }
 
 sub param {
@@ -99,7 +99,7 @@
 	if ( $value ) {
 		if ($rx) {
 			if ( my @result = ($value =~ m/$rx/) ) {
-				return @result > 1 ? \@result : \@result;
+				return @result > 1 ? \@result : $result[0];
 			} else {
 				return undef;
 			}