in reply to Re: sub classing best practice
in thread sub classing best practice

Interesting suggestion - but that just feels wrong to me. One class to one file - otherwise debugging becomes bizarre if there's an error. Imagine the confusion parsing X.pm looking for a method that's declared in X::Y.pm uder a package X declaration!

Replies are listed 'Best First'.
Re^3: sub classing best practice
by ysth (Canon) on Dec 12, 2006 at 05:36 UTC
    No more wrong than having a method in X return a new X::Y object. So long as you stick to a consistent way to do your factory classes, I don't see a problem.