sub auth { my ($uname, $passwd, $dbsecret, $salt); $uname = shift; $passwd = shift; ... } #### sub auth { my ($self, $uname, $passwd) = @_; my ($dbsecret, $salt); ... } #### ref new Foo or warn "example 1 is not an object\n"; ref new Foo->foo or warn "example 2 is not an object\n"; package Foo; sub new { bless {} } sub foo { "foo" }