Skip to content

Commit

Permalink
slightly more reliable deprecation workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 14, 2013
1 parent 18a5596 commit 17fecec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -43,8 +43,8 @@ sub DESTROY { shift->_cleanup }

# DEPRECATED in Top Hat!
sub new {
my $self = shift->SUPER::new;
while (my $name = shift) { $self->$name(shift) }
my $self = shift->SUPER::new(@_);
for my $key (keys %$self) { $self->$key(delete $self->{$key}) }
return $self;
}

Expand Down

0 comments on commit 17fecec

Please sign in to comment.