in reply to •Re: Re: •Re: Re: Re: OO style: Placement of "new"
in thread OO style: Placement of "new"
So the bottom line for this wierd behavior is that modules referenced in indirect method invocations must be compiled before the compilation of the invocation. Given that the vast majority of modules are used this is a problem occurring in fairly rare instances.
It also seems like a problem that could be fixed with some additional smarts added into the compilation phase. If during compilation new modules are discovered after the BEGIN phase -- as in the example discussed below by dws and tye -- simply make a pass over the compiled code again to correct the misinterpretations. Or simpler, issue a warning in such cases.
In any case, I've seen indirect notation used successfully in too many tens of thousands of lines of OO Perl to be convinced that it's "a failed experiment".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re7: OO style: Placement of "new"
by dragonchild (Archbishop) on Apr 08, 2003 at 15:09 UTC | |
by djantzen (Priest) on Apr 08, 2003 at 18:30 UTC | |
by dragonchild (Archbishop) on Apr 08, 2003 at 19:19 UTC |