Skip to content

Commit

Permalink
avoid reusing $1
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 10, 2015
1 parent 85abcdb commit 5e2db27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Util.pm
Expand Up @@ -387,10 +387,10 @@ sub _header {

my (@tree, @token);
while ($str =~ /\G[,;\s]*([^=;, ]+)\s*/gc) {
push @token, $1, undef;
push @token, my $name = $1, undef;

# Special "expires" value
if ($cookie && lc $1 eq 'expires' && $str =~ /\G=\s*$EXPIRES_RE/gco) {
if ($cookie && lc $name eq 'expires' && $str =~ /\G=\s*$EXPIRES_RE/gco) {
$token[-1] = $1;
}

Expand Down

0 comments on commit 5e2db27

Please sign in to comment.