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

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

Thread Previous | Thread Next
Arthur Bergman
November 29, 2003 16:55
Re: [DOCPATCH] BEGIN, CHECK, INIT, END explained more
Message ID:

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? :)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About