On Fri, Sep 01, 2000 at 12:35:24PM -0700, David E. Wheeler wrote: > Well then, that makes this example rather wasteful, doesn't it? It wasn't an example of how my Dog $spot should be used. I was explaining to Nate what his code was doing. > my Dog $spot; > if ($input eq 'Collie') { > $spot = Collie->new; > } elsif ($input eq 'Dalmation') { > $spot = Dalmation->new; > } > > Becuase we're creating two objects when we really only want one. Yes. That my Dog $spot should be either my $spot or my $spot : isa(Foo) (which I just recently made up) in this case. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com --
- Re: RFC 171 (v2) my Dog $spot s... Piers Cawley
- Re: RFC 171 (v2) my Dog $spot s... Nathan Wiger
- Re: RFC 171 (v2) my Dog $spot should call a cons... Nathan Wiger
- Re: RFC 171 (v2) my Dog $spot should call a ... Piers Cawley
- Re: RFC 171 (v2) my Dog $spot should cal... Nathan Wiger
- Re: RFC 171 (v2) my Dog $spot shoul... Piers Cawley
- Re: RFC 171 (v2) my Dog $spot should call a ... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot should cal... David E. Wheeler
- Re: RFC 171 (v2) my Dog $spot shoul... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot s... David E. Wheeler
- Re: RFC 171 (v2) my Dog $spot s... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot s... Bart Lateur
- Re: RFC 171 (v2) my Dog $spot s... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot s... Piers Cawley
- Re: RFC 171 (v2) my Dog $spot should call a cons... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot should call a ... Piers Cawley
- Re: RFC 171 (v2) my Dog $spot should cal... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot should call a constructor i... Slaven Rezic
- Re: RFC 171 (v2) my Dog $spot should call a construc... Michael Fowler
- Re: RFC 171 (v2) my Dog $spot should call a cons... Piers Cawley
- Re: RFC 171 (v2) my Dog $spot should call a constructor i... Michael Fowler