Skip to content

Commit

Permalink
refactored. this code is more readable and meaningful
Browse files Browse the repository at this point in the history
  • Loading branch information
typester committed Dec 15, 2010
1 parent de4ad51 commit b75d8c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Request.pm
Expand Up @@ -67,7 +67,7 @@ sub cookies {
$self->env->{'plack.cookie.string'} = $self->env->{HTTP_COOKIE};

my %results;
my @pairs = grep { $_ } split "[;,] ?", $self->env->{'plack.cookie.string'};
my @pairs = grep /=/, split "[;,] ?", $self->env->{'plack.cookie.string'};
for my $pair ( @pairs ) {
# trim leading trailing whitespace
$pair =~ s/^\s+//; $pair =~ s/\s+$//;
Expand Down

0 comments on commit b75d8c2

Please sign in to comment.