in reply to Re: Re: Problem with My New Perl Object
in thread Problem with My New Perl Object

To make even neater write:
return bless {}, ref $pkg || $pkg;

This technique has been the basis of at least one recent "cargo cult" discussion. There are mixed opinions over whether overloading a class constructor is a prudent thing to do.

In this post, merlyn points out a cleaner way to get the same effect, without overloading your class constructor.