> Are you saying they don't look Perlish now?
> 
> And no, all you guys, I'm not trying to shoot down a monadic,
> object-returning open.  Please don't assume that.

As funny as it sounds, yes. Mind you, they're not really too weird. But
compared to how most other functions have turned out working, well, yes.
At least a little.
 
> What I *would* like to shoot down is this nutty assumption that
> these quasi-constructors be named new().  Choose something in the
> proper domain.  Is that a new client or a new server?  Is it
> preconnected or not?  etc.
> 
> Avoid new().  Use something descriptive of what's happening.

Right, I agree. I used new() in the examples as of *existing* code and
modules and how things are done now. You're right, new() is something
from C++ that makes Perl look similar on the surface, but ends up being
self-defeating in a way because it works so differently in reality.

I would say one use of new() that I think is a good one is when you
return a $ref that is simply a clone of the class, with no initialized
values or special features. But I agree that Apache->request gives you a
better idea of what you're getting.

-Nate

Reply via email to