comparison 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
comparison
equal deleted inserted replaced
148:e6447ad85cb4 149:b04e978d6d5a
82 } 82 }
83 83
84 sub cookie { 84 sub cookie {
85 my ($this,$name,$rx) = @_; 85 my ($this,$name,$rx) = @_;
86 86
87 $this->_launder( $this->query->cookie($name), $rx ); 87 $this->_launder(scalar( $this->query->cookie($name) ), $rx );
88 } 88 }
89 89
90 sub param { 90 sub param {
91 my ($this,$name,$rx) = @_; 91 my ($this,$name,$rx) = @_;
92 92
97 my ($this,$value,$rx) = @_; 97 my ($this,$value,$rx) = @_;
98 98
99 if ( $value ) { 99 if ( $value ) {
100 if ($rx) { 100 if ($rx) {
101 if ( my @result = ($value =~ m/$rx/) ) { 101 if ( my @result = ($value =~ m/$rx/) ) {
102 return @result > 1 ? \@result : \@result; 102 return @result > 1 ? \@result : $result[0];
103 } else { 103 } else {
104 return undef; 104 return undef;
105 } 105 }
106 } else { 106 } else {
107 return $value; 107 return $value;