Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Re: Re (tilly) 2: Paradigm Shift - Dual Use Constructors

by demerphq (Chancellor)
on Feb 20, 2002 at 09:59 UTC ( #146537=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re (tilly) 2: Paradigm Shift - Dual Use Constructors
in thread Paradigm Shift - Don't use strict

Hmm. Interesting angle. But ircc (its on my home computer) the code went more like
sub new { my $proto=shift; my $class=$proto || ref $proto; my $self=bless {},$class; if ($class eq $proto) { #class call $self->init_rand(); } elsif (@_) { $self->init_cross($proto,shift); } else { $self->init_mutate($proto); } return $self }
So the dreaded line was/is present. But you are correct I did/would comment this.

Yves / DeMerphq
--
When to use Prototypes?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146537]
help
Chatterbox?
[stevieb]: Coding circles around Python devs, showing how unit tests should be done, enabling easy access to everything, learning basic C to wrap for direct hardware access... I am thankful.
[stevieb]: I'm in an appreciative mood. Thank you fellow Monks, for all I know, and for the knowledge which I can pass on

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-02-25 01:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (364 votes). Check out past polls.