in reply to so simple

The first arg to a subroutine is either a string (a class {package} name) or a reference (an object {blessed reference}) when you use the arrow invocation, or when you fake such.

There's no sure test to determine if the first arg is Perl-provided or caller-provided. Thank goodness for that. So, you'll just have to be consistent, or else you'll end up writing the same kind of scary code that pervades (and slows down) CGI.pm on every call.

-- Randal L. Schwartz, Perl hacker