From: Eden Cardim Date: Fri, 14 May 2010 02:02:41 +0000 (+0000) Subject: added debug option X-Git-Tag: v0.08122~41^2~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ab534c337da591588e559839c9beb4669c47829f;p=dbsrgits%2FDBIx-Class.git added debug option --- diff --git a/lib/DBIx/Class/Admin.pm b/lib/DBIx/Class/Admin.pm index ab8309d..36d8cbc 100644 --- a/lib/DBIx/Class/Admin.pm +++ b/lib/DBIx/Class/Admin.pm @@ -89,7 +89,10 @@ sub _build_schema { my ($self) = @_; require Class::MOP; { - local @INC = (@{$self->include_dirs}, @INC); + my @include_dirs = @{$self->include_dirs}; + $self->_debug("Adding to \@INC:\n".join "\n",@include_dirs) + if $self->debug; + local @INC = (@include_dirs, @INC); Class::MOP::load_class($self->schema_class); } $self->connect_info->[3]->{ignore_version} =1; @@ -293,6 +296,20 @@ has quiet => ( isa => Bool, ); +=head2 debug + +Print debug information + +=cut + +has debug => ( + is => 'rw', + isa => Bool, + default => 0 +); + +sub _debug { shift; print @_ } + has '_confirm' => ( is => 'bare', isa => Bool,