Revision 2b8ec027
Von Sven Schöling vor fast 4 Jahren hinzugefügt
SL/Request.pm | ||
---|---|---|
49 | 49 |
} |
50 | 50 |
|
51 | 51 |
sub init_cookies { |
52 |
my $raw_cookie = $ENV{HTTP_COOKIE} || $ENV{COOKIE}; |
|
52 |
my $raw_cookie = $ENV{HTTP_COOKIE} // $ENV{COOKIE}; |
|
53 |
|
|
54 |
return {} unless $raw_cookie; |
|
55 |
|
|
53 | 56 |
my @pairs = split /[;,] ?/, $raw_cookie; |
54 | 57 |
my %results; |
55 | 58 |
for my $pair (@pairs) { |
56 | 59 |
my ($key, $value) = split /=/, trim($pair); |
57 |
$value //= ''; |
|
58 |
$results{$key} = $value; |
|
60 |
$results{$key} = $value // ''; |
|
59 | 61 |
} |
62 |
|
|
60 | 63 |
\%results; |
61 | 64 |
} |
62 | 65 |
|
Auch abrufbar als: Unified diff
CGI aus Abhängigkeiten entfernt und warnings behoben