I have a generic and recursive function but why it is not authorized in perl

```
sub pv($) {
    my ($vars) = @_;
    if(ref($vars) eq 'SNMP::Varbind') {
        return $vars->tag() . (defined($vars->iid()) ? '.' . $vars->iid() : '');
    } elsif (ref($vars) eq 'SNMP::VarList') {
        return join(', ', map { pv($_) } @$vars);
    } elsif(ref($vars) eq 'ARRAY') {
        return join('.', @{$vars});
    } else {
        return $vars;
    }
}

```

This error code "pv() called too early to check prototype" for this line return join(', ', map { pv($\_) } @$vars);