On Tue, Aug 15, 2000 at 12:33:15PM +0100, Tim Bunce wrote:
> On Mon, Aug 14, 2000 at 11:30:28AM -0500, Jonathan Scott Duff wrote:
> >     use Foo;                        # like CGI.pm, morphs on demand
> > 
> >     use Foo;                        # procedural Foo
> >     use OOFoo;                      # OO Foo
> > 
> >     use Foo ':procedural';          # default if ommitted. 
> >     use Foo ':OO';
> > 
> >     use Foo;                        # equivalent to Foo::procedural
> >     use Foo::procedural;            
> >     use Foo::OO;
> > 
> >     use OOP;                        # sets some magic variable.
> >     use Foo;                        # Now OO rather than procedural

 
> I don't think you can make much valuable progress down that road till
> we know what Larry's thinking about how to support multiple installed
> versions of a module and multiple implementations of the same 'interface'.
> 
> This is a related issue: multiple interfaces to the same code.

Which makes me think of the following.  You don't need to 'use' a seperate
module for a procedural or OO interface.  The module author could simply
provide a constructor in the procedural module that would require the OO
module in the background, and bless the object into that class.  This would
appear largely transparent to the user, right up until they tried to do
isa() or ref() tests on the object.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to