On Mon, Jun 04, 2001 at 06:49:28PM -0500, Me wrote:
> Afaict, even with use strict at its most strict, perl 6
> can't (in practice) complain, at compile time, if
>
> $foo.Foun
>
> refers to an undeclared Foun.
>
> Right?
>
> Should there be a strict mode that warns if a
> method name matches a built in property name?
Could have one that requires all inheritance and variable declarations
occur at compile-time, but that will only effect your current scope.
Won't help against classes you inherit from doing run-time things.
And then there's autoloading...
There's also the problem of knowing at compile time what class/type
$foo is. Don't know what's going on with that just yet, do we?
So I'd say no, Perl can't know at compile-time if your method is
declared or not. Only in certain restricted cases, such as if you
don't inherit from anything, or if *all* your parent classes are
declared strictly.
--
Michael G Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One