} else {
$fh = IO::File->new('>&STDERR');
}
- $new->debugobj->debugfh($fh);
+ $new->debugfh($fh);
$new->debug(1) if $ENV{DBIX_CLASS_STORAGE_DBI_DEBUG};
return $new;
}
set to be STDERR - although see information on the
L<DBIX_CLASS_STORAGE_DBI_DEBUG> environment variable.
+=cut
+
+sub debugfh {
+ my $self = shift;
+
+ if ($self->debugobj->can('debugfh')) {
+ return $self->debugobj->debugfh(@_);
+ }
+}
+
=head2 debugobj
Sets or retrieves the object used for metric collection. Defaults to an instance
See L<debugobj> for a better way.
=cut
+
sub debugcb {
- my $self = shift();
+ my $self = shift;
- if($self->debugobj()->can('callback')) {
- $self->debugobj()->callback(shift());
+ if ($self->debugobj->can('callback')) {
+ return $self->debugobj->callback(@_);
}
}