From: Rafael Kitover Date: Wed, 7 Jul 2010 00:37:17 +0000 (-0400) Subject: replace namespace::autoclean with namespace::clean to reduce deps, fix extends runtim... X-Git-Tag: 0.07001~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b74a06bb8493df6e4bb15a445bd4bfb370d91c6;p=dbsrgits%2FDBIx-Class-Schema-Loader.git replace namespace::autoclean with namespace::clean to reduce deps, fix extends runtime/compiletime detection for use_moose, fix common tests --- diff --git a/Makefile.PL b/Makefile.PL index 36bd0cc..c0c83ca 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,7 +28,7 @@ requires 'DBIx::Class' => '0.08114'; requires 'Class::Unload' => 0; requires 'File::Slurp' => '9999.13'; requires 'List::MoreUtils' => 0; -requires 'namespace::autoclean' => 0; +requires 'namespace::clean' => 0; requires 'Data::Dumper::Concise' => '1.200'; requires 'Scope::Guard' => 0; requires 'List::MoreUtils' => 0; diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 3ebab77..85b09f3 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -3,7 +3,6 @@ package DBIx::Class::Schema::Loader::Base; use strict; use warnings; use base qw/Class::Accessor::Grouped Class::C3::Componentised/; -use namespace::autoclean; use Class::C3; use Carp::Clan qw/^DBIx::Class/; use DBIx::Class::Schema::Loader::RelBuilder; @@ -22,6 +21,7 @@ use Scalar::Util 'looks_like_number'; use File::Slurp 'slurp'; use DBIx::Class::Schema::Loader::Utils 'split_name'; require DBIx::Class; +use namespace::clean; our $VERSION = '0.07001'; @@ -1236,7 +1236,7 @@ sub _dump_to_dir { $src_text.= qq|use Moose;\nuse MooseX::NonMoose;\nuse namespace::autoclean;|; # these options 'use base' which is compile time - if ($self->left_base_classes || $self->additional_base_classes) { + if (@{ $self->left_base_classes } || @{ $self->additional_base_classes }) { $src_text .= qq|\nBEGIN { extends '$result_base_class' }\n\n|; } else { diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm b/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm index 4cadb68..85fa056 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Informix.pm @@ -4,9 +4,9 @@ use strict; use warnings; use Class::C3; use base qw/DBIx::Class::Schema::Loader::DBI/; -use namespace::autoclean; use Carp::Clan qw/^DBIx::Class/; use Scalar::Util 'looks_like_number'; +use namespace::clean; our $VERSION = '0.07001'; diff --git a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm index 9da57b2..c20bc8d 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -2,11 +2,11 @@ package DBIx::Class::Schema::Loader::DBI::InterBase; use strict; use warnings; -use namespace::autoclean; use Class::C3; use base qw/DBIx::Class::Schema::Loader::DBI/; use Carp::Clan qw/^DBIx::Class/; use List::Util 'first'; +use namespace::clean; our $VERSION = '0.07001'; diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 3cf50e5..1cb1ce2 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -1189,7 +1189,7 @@ sub create { dat2 VARCHAR(32) NOT NULL, set_primary_key INTEGER $self->{null}, dbix_class_testcomponent INTEGER $self->{null}, - meta $self->{null}, + meta INTEGER $self->{null}, UNIQUE (dat2, dat) ) $self->{innodb} },