sub connect() { my $self = shift; my ($ip, $port) = @_; # more code }