Dear Uri,

> [...] subs can come into existance any time and be
> handled by AUTOLOAD and such. so there is no easy compile time way to
> check that at the moment. [...]

A sub can, of course, be defined at run-time and then used.  But this
is not the point.

It is the same principle as for any other stricture.  The user is asking
perl to flag some *legal* usage as being unacceptable for her/his purpose.

For the user who does not want dynamically defined routines, it should
be trivial for the compiler to honour a suitable pragma (say, "use
strict sub_definitions") and die if it sees that there are some
subroutine invocations without any compile-time definitions.

An invocation before a declaration is legal Perl, but gets flagged
under "use strict subs".  An invocation without a definition should be
equally easy to flag (although, of course, perl would have to wait
until the end of compilation to do so).

peace,               || Udayachal: a newspaper edited by slum children:
--{kr.pA}            || http://tinyurl.com/57jaf
-- 
This .sig intentionally left blank.
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to