X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F55namespaces_cleaned.t;h=a8a966df73a287f4e60d2dcefad371f72bdd3eb5;hb=8d73fcd44e0441f0252744be32bada6816c5ff6b;hp=875a77d3784ad6d1b134609d543cd929f244b989;hpb=70cf159f21f6f521b6e896b953dfdc425a3d3ce4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/55namespaces_cleaned.t b/t/55namespaces_cleaned.t index 875a77d..a8a966d 100644 --- a/t/55namespaces_cleaned.t +++ b/t/55namespaces_cleaned.t @@ -93,6 +93,8 @@ my $skip_idx = { map { $_ => 1 } ( my $has_moose = eval { require Moose::Util }; +Sub::Defer::undefer_all(); + # can't use Class::Inspector for the mundane parts as it does not # distinguish imports from anything else, what a crock of... # Moose is not always available either - hence just do it ourselves @@ -149,9 +151,18 @@ for my $mod (@modules) { last; } } - fail ("${mod}::${name} appears to have entered inheritance chain by import into " - . ($via || 'UNKNOWN') - ); + + # exception time + if ( + ( $name eq 'import' and $via = 'Exporter' ) + ) { + pass("${mod}::${name} is a valid uncleaned import from ${name}"); + } + else { + fail ("${mod}::${name} appears to have entered inheritance chain by import into " + . ($via || 'UNKNOWN') + ); + } } }