in reply to $class = ref $class || $class
in thread Constructor/Factory Orthodoxy
I usually take 'ref $class || $class' to allow me to use an extant object to call the constructor instead of uaing a class name.
Of course, we always check the documentation before assuming we know how the module works, right? And we module authors make clear how one is expected to call the constructor (and any other methods) in our docs, right?
yours,
Michael
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: $class = ref $class || $class
by rir (Vicar) on Feb 27, 2003 at 21:56 UTC | |
by herveus (Prior) on Feb 28, 2003 at 13:06 UTC | |
by Abigail-II (Bishop) on Feb 28, 2003 at 13:24 UTC | |
by rir (Vicar) on Feb 28, 2003 at 15:52 UTC | |
by herveus (Prior) on Feb 28, 2003 at 17:13 UTC | |
by rir (Vicar) on Feb 28, 2003 at 21:49 UTC | |
|