[Israel.pm] What hurts you most in Perl?

sawyer x xsawyerx at gmail.com
Tue Nov 23 08:32:35 PST 2010

Hi Ronen,

On Tue, Nov 23, 2010 at 5:26 PM, Ronen Angluster <beerholder at gmail.com>wrote:

> *$object->some_,method_that_does_not_exist();*
> the only way i'll find out about the problem is in run time!!!!

Perl indeed doesn't have compile-time checks for methods. This is a design
feature that other languages share (such as Python), which exists to allow
certain behavior.

Take, for example, the Perl Android interface (or even the Python one) and
you'll see that the code is actually a thin layer that uses Autoloader to
catch any method run and send it to the JSON RPC server. This is to allow
you to automatically support _any_ command that is desired without changing
the code, making the code much more sustainable (instead of volatile and
risky). Moose (and many other accessors generators) use this ability to
provide you with automa{t,g}ically-created accessors.

So, it's important to understand why this is happening and that it is on

Of course, your issues are still important and should be confronted and I
don't mean to belittle them in any way (apologies if I gave such an
impression). I guess what it means is that we should improve the static
analysis tools that we have (Perl::Critic, Code::Sniff or some other
PPI-based tool) to be able to spot these issues (if it don't already) and
allow you to at least statically check for such issues. That is an
interesting concept and I'm sure many would enjoy such an ability.

> we're working with on a HUGE OO perl project here, got to a
> few hundred classes already,

As a sidenote, this seems like a problem, regardless of whether Perl gave
you compile time checks for it. Then again, I don't know why you have that,
so I'll try not to be quick to judge. :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20101123/c98ea4e2/attachment.htm 

More information about the Perl mailing list