This class defines the following methods.
-=head2 new
+=head2 BUILDARGS
L<DBIx::Class::Schema> when instantiating it's storage passed itself as the
first argument. So we need to massage the arguments a bit so that all the
=cut
-around 'new' => sub {
- my ($new, $self, $schema, $storage_type_args, @args) = @_;
- return $self->$new(schema=>$schema, %$storage_type_args, @args);
-};
+sub BUILDARGS {
+ my ($class, $schema, $storage_type_args, @args) = @_;
+
+ return {
+ schema=>$schema,
+ %$storage_type_args,
+ @args
+ }
+}
=head2 _build_master
=cut
+use Benchmark;
+
sub execute_reliably {
my ($self, $coderef, @args) = @_;
foreach my $source ($self->all_storages) {
$source->limit_dialect(@_);
}
+ return $self->master->quote_char;
}
=head2 quote_char
foreach my $source ($self->all_storages) {
$source->quote_char(@_);
}
+ return $self->master->quote_char;
}
=head2 name_sep
foreach my $source ($self->all_storages) {
$source->name_sep(@_);
}
+ return $self->master->name_sep;
}
=head2 set_schema
sub debug {
my $self = shift @_;
- foreach my $source ($self->all_storages) {
- $source->debug(@_);
+ if(@_) {
+ foreach my $source ($self->all_storages) {
+ $source->debug(@_);
+ }
}
+ return $self->master->debug;
}
=head2 debugobj
sub debugobj {
my $self = shift @_;
- foreach my $source ($self->all_storages) {
- $source->debugobj(@_);
+ if(@_) {
+ foreach my $source ($self->all_storages) {
+ $source->debugobj(@_);
+ }
}
+ return $self->master->debugobj;
}
=head2 debugfh
sub debugfh {
my $self = shift @_;
- foreach my $source ($self->all_storages) {
- $source->debugfh(@_);
+ if(@_) {
+ foreach my $source ($self->all_storages) {
+ $source->debugfh(@_);
+ }
}
+ return $self->master->debugfh;
}
=head2 debugcb
sub debugcb {
my $self = shift @_;
- foreach my $source ($self->all_storages) {
- $source->debugcb(@_);
+ if(@_) {
+ foreach my $source ($self->all_storages) {
+ $source->debugcb(@_);
+ }
}
+ return $self->master->debugcb;
}
=head2 disconnect
=cut
+__PACKAGE__->meta->make_immutable;
+
1;