package Whatever::Object::DBDAgnostic;
use strict;
use warnings;
sub import {
# only set this once
return if scalar @Whatever::Object::DBDAgnostic::ISA;
my (undef, $base_class) = @_;
die "You must define a DBD-type" unless $base_class;
push @Whatever::Object::DBDAgnostic::ISA => $base_class;
}
1;
####
package Foo;
use strict;
use base qw/Whatever::Object::DBDAgnostic/;
# decorator methods go here
1;
####
use Whatever::Object::DBDAgnostic qw(Whatever::Object::MySQL);