----- Original Message -----
From: Paul D. Smith <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 5:56 PM
Subject: Re: ISA inheritance vs. DBI?


> %% "M.W. Koskamp" <[EMAIL PROTECTED]> writes:
>
>   mwk> sub connect{
>   mwk>     my $class = shift;
>   mwk>     my $class = ref($class) || $class;
>   mwk>     return bless $class->SUPER::connect(@_), $class;
>   mwk> }
>
> I don't see how either of these are any different from what I said I
> already tried in my original message:
>
>   sub connect {
>
>     #... figure connect info $data_source, $username, $password
>
>     my $this = $class->SUPER::connect($data_source, $username, $password);
>
>     return bless($this, $class);
>   }
>
This is what i saw in your original message:

use DBI;

  @ISA = qw(DBI);

  sub connect {
    my $self = shift;
    my $class = ref($self) || $self;

    #... figure connect info $data_source, $username, $password

    return $class->SUPER::connect($data_source, $username, $password);
  }

I dont see the bless statement here. so it returned a DBI object and not an
object of your subclass....

Reply via email to