Hi hackers!

I've encountered need to extend functionality of PostgresNode class
from the TAP test framework. What I want can easily be done via perl
object inheritation. 

But documentation in the PostgresNode.pm recommends to use get_new_node
function rather than call PostgresNode constructor directly.

I see following ways to solve this problem:

1. Ignore this recommendation and write new class which calls
SUPER->new() from the constructor and call its constructor directly

2. Get the PostgresNode object from get_new_node function and bless it
into new class

3. Use delegation instead of inheritance. This would require some black
magic with AutoLoader module to avoid writing wrapper for each
PostgresNode method.

Which approach would people recommend to take?

-- 
                                   Victor Wagner <vi...@wagner.pp.ru>


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to