<?xml version="1.0" encoding="windows-1252"?>
<node id="277431" title="Follow the Interface?" created="2003-07-24 01:16:21" updated="2005-08-09 12:19:24">
<type id="120">
perlmeditation</type>
<author id="272239">
liz</author>
<data>
<field name="doctext">
Perl is by many considered to be a glue language.  Glue with an external library, for instance.  Which then becomes one or more modules on the Perl side of things.
&lt;P&gt;
Whenever you start development of such a (set of) module(s), you need to make a lot of choices.  And some of them are very basic.
&lt;P&gt;
The most basic one, I think, whether the modules that you develop will be Perl-centric or external library-centric.  The latter will (probably) give you complete control of all of the functionality of the library (which you may or may not be interested in).  The former will give nice extra functionality in Perl.  But it may be suffering from the "thick rubber glove" syndrome, i.e. you don't have a feeling anymore for what in fact is happening behind the scenes, and you may not have all the functionality of the external library at your disposal.
&lt;P&gt;
Personally, I would develop a Perl-centric interface. I have two reasons for that:
&lt;OL&gt;
&lt;LI&gt;It is what you're used to when programming Perl.
&lt;LI&gt;If it is a good interface, it might be transferrable to other external libraries.
&lt;/OL&gt;
&lt;P&gt;
I was wondering whether the Perl Monks have anything to say about these choices, and why one should do it one way or the other.
&lt;P&gt;
Liz</field>
</data>
</node>
