develooper Front page | perl.perl5.porters | Postings from July 2007

parent.pm (was Re: use base problems)

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
July 31, 2007 14:56
Subject:
parent.pm (was Re: use base problems)
I was thinking about this last night and came up with "parent" myself.  "isa"
is too tied to the underlying details.


As for the details...
* The $VERSION thing, I'm not even sure why base.pm does it.  It goes.
* Anything to do with fields goes.
* The attempts to work around global $SIG{__DIE__} goes.
* The ability to inherit from a non-file superclass is a nice feature.

I'm going to dig my heels in on one thing: import.  Whether or not
superclasses should export is one thing, but how many times do you want it?  1
in 100?  1000?  10000?  Its pretty damn low and there's a perfectly sensible
work around:

	use parent 'Foo';
	use Foo;

Getting the syntax right for importing from the parent *and* supporting
arguments *and* supporting MI will rapidly get messy, consume 90% of the
complexity, add bugs and mess up an otherwise squeaky clean interface.


I think I'm going to write this right now.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About