Dougal Campbell writes:
> On Wed, 16 Oct 2002, Dougal Campbell wrote:
>
> > I'm trying to figure out how to dynamically let a module choose whether
> > to use the Exporter module to export functions or present itself as an
> > object with OO methods. How can I do that?
>
> Okay, nevermind. I finally fiddled with enough to figure it out on my
> own. In case anybody is interested, here's some sample code:
>
> The test module is here:
> http://dougal.gunters.org/perl/Adaptable.pm.txt
>
> And two sample programs, one which uses the Adaptable module in Exporter
> mode, and one that uses it in Object Oriented mode:
> http://dougal.gunters.org/perl/exp_adapt.pl.txt
> http://dougal.gunters.org/perl/oo_adapt.pl.txt
I would suggest looking at how CGI.pm (sorry, I can't think of a smaller
module ATM that does this ) allows the use of its function or OO
interface.
HTH
--
Brian Raven
Just put in another goto, and then it'll be readable. :-)
-- Larry Wall in <[EMAIL PROTECTED]>
-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely
for the intended addressee(s). Unauthorised reproduction, disclosure,
modification, and/or distribution of this email may be unlawful. If you
have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message
do not necessarily reflect those of
LIFFE Holdings Plc or any of its subsidiary companies.
-----------------------------------------------------------------------
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs