develooper Front page | perl.perl5.porters | Postings from May 2000

Re: overloading = [a solution]

Thread Previous | Thread Next
Sam Tregar
May 7, 2000 13:38
Re: overloading = [a solution]
Message ID:
On Sun, 7 May 2000, Ilya Zakharevich wrote:

> Applicable to Tk, but not to DB_File.  There *is* a DB_File API, but
> you do not need to know it: all you do is tie()ing.  [Unless you
> consider tie %foo, 'DB_File' to be an API - in some sense it is, in
> some sense it is not.]

Yes, I do consider it to be an API, because it is one.  You have to know
the "magic line," as Simon put it.  

I wrote and maintain a module that provides tie()-based API -
IPC::SharedCache.  Just saying that it uses tie() is not enough for you to
go and start using the module - you must learn the specific API for
IPC::SharedCache which happens to involve tie().

>   use Math::BigInt ':constant';
> would allow you use Math::BigInt without any (further) knowledge of
> the API.  "Similarly" just installing Term::ReadLine::Perl would make
> your scripts more user-friendly, this time without *ANY* knowledge of
> the API.

Counter-point accepted.  I don't think this is the case with tie()-based
modules though.  At the very least, I know that it is not the case with
the tie()-based modules I've written.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About