>So this:

>       my $class = "My::Class";
>       print("$class");

>is:

>       main::print("My::Class");

Oh, I don't know.  *If* you assume that f(x) is always x->f(), then, 
it would invoke some STRING::print method--being there as one would
be in an all-the-world's-an-object world.  I suppose maybe
that's STRING->print("My::Class") or maybe SCALAR->... instead.

Currently, of course, there is no "main::print".  And whether
CORE::print is a real function is quite open to debate.

>but this:

>       my $class = "My::Class";
>       print($class);

>is:

>       My::Class->print();

Likewise, if there are no function calls, and f(x) is x->f, then
print($class) is really $class->print(), then yes, that's
My::Class->print("My::Class"), or barring inheritance,
My::Class::print("My::Class").

I'm truly not clear on  what you're yucking there.  That an invocant
that is not a class or object should end up calling a general print
function?  Would you be any happier if one were to permit UNIVERSAL
methods on "invalid" invocants, making that UNIVERSAL::print instead
of CORE::print?

--tom

Reply via email to