So, my questions are: Is bless $self, $class being phased out in favour of the my HardCodedClassName $self form? Are there any benefits to this? Will inheritance still work even despite the hard coded class name?

Update: Sorry, I saw that for subclasses, fields still recommends the my $class = shift form. So I don't need to bless $self, class anymore, since fields does that for me, but I don't have to specify the class name in the code.

If you look under the hood, you'll see that fields still uses the two-argument form of bless. It's just hiding it from you. It happens when you call fields::new().

The examples you see in the docs really just passes the first argument to fields::new, although it gives the first argument different names, and then passes that to fields::new() that uses it as the second argument to bless().

It's always seemed to mind-bending for me, so I don't use it. I can do without the black magic. :)

I prefer to not populate my hash during the construction phase, but use a separate method for that. The reason is multiple inheritance. If you do multiple inheritance, it will be that at least one of the constructors isn't called, or that the object from at least one of the constructors (assuming you are using 2 classes - it's worse with more) won't survive. If both constructors return populated objects, the inheriting class needs to break encapsulation, and construct a resulting object by mucking with the internals. It becomes a lot easier if you have a separate method to (initially) populate your objects.

I like to initialize a member attribute field in the blessed hash, even if it is not neccessarily defined during construction. I also like to minimize the number of input parameters in my constructors, but that really is just a personal preference.