I see. You mean in the Cookie.pm Module?
sub new {
my ($class, $r, %attrs) = @_;
my ($name) = grep {defined} delete $attrs{name} , delete $attrs{-name};
my ($value) = grep {defined} delete $attrs{value}, delete
$attrs{-value};
*return unless defined $name and defined $value;*
my $cookie = $class->make($r->pool, $name, $class->freeze($value));
while(my ($k, $v) = each %attrs) {
$k =~ s/^-//;
$cookie->$k($v);
}
return $cookie;
}
On Mon, Apr 4, 2016 at 11:56 AM, Hiram Gibbard <[email protected]> wrote:
> Thanks. I see what you are saying now. The "value" through me off, because
> its the same name as the var "value". I was just thinking value.
>
> Line 18? Not understanding where you see that line.
>
> On Thu, Mar 31, 2016 at 9:03 PM, Mark Grimes <[email protected]> wrote:
>
>> > Can't call method "bake" on an undefined value at
>> /opt/cloudhost/apache/www/dworks/lib/DWorks/User.pm line 234, <> line 1.
>> >
>> >
>> >
>> > # Currently, we're storing our user state in cookies.
>> >
>> > Apache2::Cookie->new(
>> > $m->apache_req,
>> > name => $name,
>> > value => $value,
>> > expires => ($expires || ''), # Default: when browser is
>> closed.
>> > path => '/',
>> > secure => ($data->{cookie}->{secure} ? 1 : 0),
>> > )->bake;
>>
>> Apache2::Cookie->new() is returning undef instead of an object. Looking
>> at the source, I see it does that when name or value are undefined (line
>> 18). I would check $name and $value.
>>
>
>
>
> --
> Hiram Gibbard
> [email protected]
> http://hiramgibbard.com
>
>
--
Hiram Gibbard
[email protected]
http://hiramgibbard.com
------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users