in reply to Passing object attributes around

It's a private init method and the code is right next to the new (probably): just set em - what else is an init for?

Adding a pile of common code to the constructor so it performs half the initialization just seems silly, especially if there are multiple constructors for the object and the init provides the common work.

You're not hiding stuff away (the "action at a distance" concern) because you've said up front that the init routine is going to init stuff - that's what an init routine is for after all. Any maintainer who can't figure out that a routine called init is going to update the object in interesting ways probably is in for a bunch of trouble (or is about to create a bunch of trouble) anyway.


Perl is environmentally friendly - it saves trees