Subject: | Duplicate my in &method method |
The method &method contains the following code:
sub method
{
my $self=shift;
my $method = shift;
my $method = uc($method);
$self->{method} = $method;
}
Naturally this generates warnings as method is "my"d twice. Not only is this an error, but it's a lot more complex than it needs to be.
sub method
{
my $self=shift;
my $method = shift;
$self->{method} = uc($method);
}
Would be simpler, and no doubt it can be made simpler still, though that may obfuscate the code.