in reply to Compile-time checking for undef subroutines?

There is a check-at-runtime feature in the UNIVERSAL namespace called can. You can ask a blessed object if it can(domethod), for example, which has slight benefits over asking the object if it isa(MyClass).

But this won't get you very far to checking your code for correctness, which generally needs to happen at compiletime. This can be difficult for the reasons the other folks have already explained: in Perl, compile time is anytime.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re: Compile-time checking for undef subroutines?
by Abigail-II (Bishop) on May 06, 2003 at 00:13 UTC
    This can be difficult for the reasons the other folks have already explained: in Perl, compile time is anytime.

    It's not difficult - otherwise we wouldn't have the "used only once" warning. It's not useful because of AUTOLOAD, and not having to declare subroutines. It's the usefulness which makes there's no warning, not whether it's difficult.

    Abigail