X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F55namespaces_cleaned.t;h=2205ded26646fdfc246efa3f8a6dc195befeb6fd;hb=9b871b00;hp=6706966de24b9d7600578c61b3f8fe3e13c5de88;hpb=45638aed4f500330d6b63cecdcad25356026f392;p=dbsrgits%2FDBIx-Class.git diff --git a/t/55namespaces_cleaned.t b/t/55namespaces_cleaned.t index 6706966..2205ded 100644 --- a/t/55namespaces_cleaned.t +++ b/t/55namespaces_cleaned.t @@ -35,6 +35,9 @@ use warnings; use Test::More; +use lib 't/lib'; +use DBICTest; + use File::Find; use File::Spec; use B qw/svref_2object/; @@ -45,7 +48,7 @@ use DBIx::Class; use DBIx::Class::Carp; my @modules = grep { - my $mod = $_; + my ($mod) = $_ =~ /(.+)/; # not all modules are loadable at all times do { @@ -76,6 +79,12 @@ my $skip_idx = { map { $_ => 1 } ( # this subclass is expected to inherit whatever crap comes # from the parent 'DBIx::Class::ResultSet::Pager', + + # this is not part of the inheritance tree (plus is a temporary fix anyway) + 'DBIx::Class::GlobalDestruction', + + # Moo does not name its generated methods, fix pending + 'DBIx::Class::Storage::BlockRunner', ) }; my $has_cmop = eval { require Class::MOP }; @@ -115,7 +124,11 @@ for my $mod (@modules) { my $origin = $gv->STASH->NAME; TODO: { - local $TODO = 'CAG does not clean its BEGIN constants' if $name =~ /^__CAG_/; + local $TODO; + if ($name =~ /^__CAG_/) { + $TODO = 'CAG does not clean its BEGIN constants'; + } + is ($gv->NAME, $name, "Properly named $name method at $origin" . ($origin eq $mod ? '' : " (inherited by $mod)"