Re: Some questions on CDBI code

[prev] [thread] [next] [Date index for 2005/07/05]

From: Tony Bowden
Subject: Re: Some questions on CDBI code
Date: 07:35 on 05 Jul 2005
On Tue, Jul 05, 2005 at 05:25:40PM +1000, leif.eriksen@xxx.xxx.xx wrote:
> OK, I've leave the $me alone, would you rather I did a 
> $them->can('construct') test ? That is more constrained than a 
> $them->isa('Class::DBI'). 

That's fine.

> I know a class could support this via an 
> AUTOLOADER, and hence can() will fail, but I guess the aim is to check 
> that the supplied class supports the required interface, rather than 
> force a particular inheritance.

I wouldn't too much about AUTOLOADER. If someon really has such an
unlikely set up they can always stub the sub.

> Code would be
> sub new {
> 	my ($me, $them, $data, @mapper) = @_;
> 	return unless $them->can('construct'); # supports required i/f

I presume the real code will be more than a 'return' here...


Thanks,

Tony

Some questions on CDBI code
leif.eriksen 03:25 on 05 Jul 2005

Re: Some questions on CDBI code
Tony Bowden 06:59 on 05 Jul 2005

Re: Some questions on CDBI code
leif.eriksen 07:25 on 05 Jul 2005

Re: Some questions on CDBI code
Tony Bowden 07:35 on 05 Jul 2005

Generated at 16:36 on 28 Jul 2005 by mariachi v0.52