Subject: | OpenFrame::Cookies->new()->set() fails with CGI >= 3.51 |
Since CGI 3.51, CGI::Cookie->new() without key and value returns undef:
Version 3.51, Jan 5, 2011
[BUG FIXES]
- CGI::Cookie->new() now follows the documentation and returns undef
if the -name and -value args aren't provided. This new behavior is
also consistent with the docs and code of CGI::Simple::Cookie.
(Mark Stosberg)
This construction is used in lib/OpenFrame/Cookies.pm:
my $cookie = OpenFrame::Cookie->new();
$cookie->name( $key );
and that causes dies Perl:
$ perl -Ilib -MOpenFrame::Cookies -le 'my $cookie =
OpenFrame::Cookies->new(); $cookie->set("a" => "b");'
Can't call method "name" on an undefined value at
lib/OpenFrame/Cookies.pm line 47.