From: Peter Rabbitson Date: Sat, 7 Dec 2013 11:32:20 +0000 (+0100) Subject: Further namespace cleansing X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e9267d98325ff046c6cd040da0cd36679d082cd;p=dbsrgits%2FDBIx-Class.git Further namespace cleansing --- diff --git a/lib/DBIx/Class/PerlRenderer.pm b/lib/DBIx/Class/PerlRenderer.pm index 051a3c5..cea8952 100644 --- a/lib/DBIx/Class/PerlRenderer.pm +++ b/lib/DBIx/Class/PerlRenderer.pm @@ -2,6 +2,7 @@ package DBIx::Class::PerlRenderer; use B qw(perlstring); use Moo; +use namespace::clean; extends 'Data::Query::Renderer::Perl'; diff --git a/lib/DBIx/Class/PerlRenderer/MangleStrings.pm b/lib/DBIx/Class/PerlRenderer/MangleStrings.pm index 7396b9e..7337de7 100644 --- a/lib/DBIx/Class/PerlRenderer/MangleStrings.pm +++ b/lib/DBIx/Class/PerlRenderer/MangleStrings.pm @@ -1,6 +1,7 @@ package DBIx::Class::PerlRenderer::MangleStrings; use Moo; +use namespace::clean; extends 'DBIx::Class::PerlRenderer'; diff --git a/lib/DBIx/Class/ResultSet/Role/DQMethods.pm b/lib/DBIx/Class/ResultSet/Role/DQMethods.pm index b7745a9..716d025 100644 --- a/lib/DBIx/Class/ResultSet/Role/DQMethods.pm +++ b/lib/DBIx/Class/ResultSet/Role/DQMethods.pm @@ -3,6 +3,7 @@ package DBIx::Class::ResultSet::Role::DQMethods; use Data::Query::ExprHelpers; use Safe::Isa; use Moo::Role; +use namespace::clean; sub _dq_converter { shift->result_source->schema->storage->sql_maker->converter; diff --git a/t/55namespaces_cleaned.t b/t/55namespaces_cleaned.t index 92d1dfe..af2ee4d 100644 --- a/t/55namespaces_cleaned.t +++ b/t/55namespaces_cleaned.t @@ -84,11 +84,9 @@ my $skip_idx = { map { $_ => 1 } ( 'DBIx::Class::ResultSource::RowParser::Util', 'DBIx::Class::_Util', - # skip for the moment - XXX fixme - 'DBIx::Class::ResultSet::Role::DQMethods', + # FIXME - this can't be right - Role::Tiny's with() seems to + # import Role::Tiny::does_role() at a dones() slot... wtf? 'DBIx::Class::ResultSet::WithDQMethods', - 'DBIx::Class::PerlRenderer', - 'DBIx::Class::PerlRenderer::MangleStrings', ) }; my $has_moose = eval { require Moose::Util };