Explorar o código

Merge pull request #375 from Troglodyne-Internet-Widgets/unused-definitions-0.007

Require ProhibitUnusedDefinitions 0.007, and drop the aliases workaround
George S. Baugh hai 6 días
pai
achega
08c2ef89c0
Modificáronse 2 ficheiros con 2 adicións e 5 borrados
  1. 1 4
      .perlcriticrc
  2. 1 1
      Makefile.PL

+ 1 - 4
.perlcriticrc

@@ -127,14 +127,11 @@ allow = re Exporter
 [ProhibitUnusedDefinitions]
 # tCMS:
 #   generic_route, @routes, %aliases  tPSGI reads them out of the router package
-#   aliases (both models)              TCMS::aliases calls $data->aliases, and
-#                                      the policy takes a method call from a sub
-#                                      of the same name for recursion
 #   posts, order                       named by a post type's x-tcms-datasource
 #   enrich                             named by a post type's sidecar
 #   create_statement, log_message      Log::Dispatch calls them
 #   series, users                      a post's callback names them
-allow_subs = TCMS::generic_route Trog::Data::FlatFile::aliases Trog::DataModule::aliases Trog::DataSource::DirIndex::posts Trog::DataSource::DirIndex::order Trog::DataSource::ProvisionedVirt::posts Trog::Enrich::Invoice::enrich Trog::Log::DBI::create_statement Trog::Log::DBI::log_message Trog::Log::Syslog::log_message Trog::Routes::HTML::series Trog::Routes::HTML::users
+allow_subs = TCMS::generic_route Trog::DataSource::DirIndex::posts Trog::DataSource::DirIndex::order Trog::DataSource::ProvisionedVirt::posts Trog::Enrich::Invoice::enrich Trog::Log::DBI::create_statement Trog::Log::DBI::log_message Trog::Log::Syslog::log_message Trog::Routes::HTML::series Trog::Routes::HTML::users
 allow_globals = @TCMS::routes %TCMS::aliases
 # A sub that only one subclass uses, and a sub that two subclasses define where
 # the class above them defines none.  It reads bin/ and lib/ through

+ 1 - 1
Makefile.PL

@@ -73,7 +73,7 @@ WriteMakefile(
                     'Perl::Critic::Policy::Subroutines::ProhibitTailRecursion'                       => '0.001',
                     'Perl::Critic::Policy::RegularExpressions::PreventUselessMetacharacterEscapes'   => '0',
                     'Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter'                    => '0',
-                    'Perl::Critic::Policy::ProhibitUnusedDefinitions'                                => '0',
+                    'Perl::Critic::Policy::ProhibitUnusedDefinitions'                                => '0.007',
                 },
             },
         },