Skip to content

Commit

Permalink
slightly more consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 10, 2016
1 parent 175e3bf commit 76a10ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/Headers.pm
Expand Up @@ -20,9 +20,9 @@ my %NORMALCASE = map { lc() => $_ } (
qw(Upgrade User-Agent Vary WWW-Authenticate)
);
for my $header (keys %NORMALCASE) {
my $method = $header;
$method =~ y/-/_/;
monkey_patch __PACKAGE__, $method, sub {
my $name = $header;
$name =~ y/-/_/;
monkey_patch __PACKAGE__, $name, sub {
my $self = shift;
$self->{headers}{$header} = [@_] and return $self if @_;
return undef unless my $headers = $self->{headers}{$header};
Expand Down

0 comments on commit 76a10ae

Please sign in to comment.