in reply to Perl semi-object without a constructor
Hi, it seems to me that in your first example, the connect method is part of a package that also defines a class. If this is the case then all methods within that package are being passed silently the object reference as the first parameter. This is why you only need 3 parameters to call the method.
What is called $pkg here is usually called $self.
I hope this helps.