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
In reply to Re: $class = ref $class || $class
by herveus
in thread Constructor/Factory Orthodoxy
by mojotoad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |