develooper Front page | perl.perl5.porters | Postings from November 2003

Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more

Thread Previous | Thread Next
From:
Arthur Bergman
Date:
November 29, 2003 16:55
Subject:
Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more
Message ID:
CAB50A92-22CF-11D8-88CF-000A95A2734C@nanisky.com

On Sunday, November 30, 2003, at 12:40  am, Elizabeth Mattijsen wrote:

>> Because CLONE/DESTROY are called on objects, the mere presence of 
>> them does not affect the compilation.
>
> Hmmm... that statement as such is incorrect, I think.  CLONE is called 
> as a _class_ method (I just realized), _not_ as an object method.  As 
> the following shows:
>
>  use threads;
>  sub CLONE { warn "CLONE called with @_\n" }
>  threads->new( sub { 1 } )->join;
>
> gives as output:
>
>  CLONE called with main
>
> This is a point that should be made more clearly.  I just realised 
> that after really grokking the "or inherited" in the following text 
> from perldelta.pod:
>

Yes, sorry, meant called as methods when things happen.

Are there any more magic method names? :)

Arthur


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About