Thanks Paul.

Well I know how I could derive from a base class using

e.g.
---------------8<---------------
use base qw(XML::LibXSLT)

## my module code
---------------8<---------------

But the problem is that XML::LibXSLT is a blessed scalar not a array nor a hash, adding and overwriting methods is no problem but you are running into trouble adding new instance-attributes or am I missing something?

Tom

Paul Miller wrote:
Yes it's possible. Pure perl is probably the way to go.

To be honest, I'm not really sure what you're up to --
because I'm not sure what XSLT is, but since nobody else
answered...


You should check out the perlboot, perltoot, perltooc, pages
to see how you can use the @INC to inherit XML::LibXSLT into
your new XML::LibXSLT::Enhanced modules.

Alternatively, you might create a reference to a
XML::LibXSLT in your blessed hash (or whatever).


That's solution I'm using at the moment but it does not satisfies me but to provide the same interface than my parent module I have to reimplement all its methods and that's exactly by I wanted to use inheritance. I know I could use AUTOLOAD but that's to much overhead.


Tom

On Tue, May 11, 2004 at 08:37:58PM +0200, Tom Schindl wrote:

Hi,

I'm fairly new to XS and have no idea how I could derive from another module which is bound to perl via XS.

e.g. I've XML::LibXSLT(XS-Binding to libxslt) and want derive from it XML::LibXSLT::Enhanced which adds new attributes.

Is this possible, using XS or even pure perl?

Tom





Reply via email to