Re: (re Mail::Reporter INIT block ) Re: Mail-Box-2.057 errors
DH <[email protected]> Tue, 21 Sep 2004 02:13:35 -0700 (PDT)
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <[email protected]> |
--- Mark Overmeer <[email protected]> wrote: > * DH ([email protected]) [040921 10:02]: > > > Without INIT block, the code is executed in order of module compilation. > > > This may mean that in some other module an object get's created (probably > > > some signleton) as class variable, before the trace default is set. > > > But > > > that default must be set before the object is created, because it is > > > used in its initiation. > > > > No it doesn't. There's no way that can happen. > > Well, there are ways it can happen, for instance if there are circular > dependencies between modules. It is much nicer to put it in a BEGIN or > INIT block, but... ok... I will remove the encapsulation... No there aren't (Mail::Reporter doesn't have circlar dependencies). Besides, circular dependencies are design flaws. Why do you keep trying to imagine a hypothetical?:) _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com