in reply to Re: Perl and common subexpressions
in thread Perl and common subexpressions
It's trivial to tell the difference between a method call and a hash lookup for the perl compile -- you're just having issues with C vs perl syntax. (Getting e, an element of the struct pointed to by p in C is p->e, which looks a lot like calling a method, m, on an object $o in Perl -- $o->m)
On the other hand, when it /is/ a method call, perl can't tell /what/ method is being called, because it doesn't know the type of the object you're calling the method on until runtime. The m method on Foo::Bar might be side-effect free, while the m method on Baz has side-effects.
|
|---|