Skip Menu |

This queue is for tickets about the Perl-Critic-Dynamic CPAN distribution.

Report information
The Basics
Id: 103382
Status: open
Priority: 0/
Queue: Perl-Critic-Dynamic

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.05
Fixed in: (no value)



Subject: t/20_policies.t tests fail with CGI 4.14
After upgrading CGI from 4.13 to 4.14, t/20_policies.t tests fail: ok 28 - Dynamic::ValidateAgainstSymbolTable - line 329 - at_inc_suffix configuration not ok 29 - Dynamic::ValidateAgainstSymbolTable - line 338 - AUTOLOADers ignored by default # Failed test 'Dynamic::ValidateAgainstSymbolTable - line 338 - AUTOLOADers ignored by default' # at t/20_policies.t line 33. # Expected 0 violations, got 1. Found violations follow... # Found violation: Subroutine "CGI::FooBar" does not appear to be defined at line 4, column 1. (CGI::FooBar();) ok 30 - Dynamic::ValidateAgainstSymbolTable - line 348 - AUTOLOADers inspected on request
From: ppisar [...] redhat.com
Dne St 08.dub.2015 07:50:45, ppisar napsal(a): Show quoted text
> After upgrading CGI from 4.13 to 4.14, t/20_policies.t tests fail: >
CGI-4.14 stopped using AUTOLOAD. Attached patch fixes it. -- Petr
Subject: Perl-Critic-Dynamic-0.05-test_AUTOLOAD_on_private_module.patch
Test AUTOLOAD on private module CGI 4.14 stopped to use AUTOLOAD which caused failing tests. This patch provides private module with AUTOLOAD instead of relying on CGI. CPAN RT#103382 Index: t/Dynamic/ValidateAgainstSymbolTable.run =================================================================== --- t/Dynamic/ValidateAgainstSymbolTable.run (revision 4222) +++ t/Dynamic/ValidateAgainstSymbolTable.run (working copy) @@ -336,23 +336,24 @@ #----------------------------------------------------------------------------- ## name AUTOLOADers ignored by default +## parms { at_inc => 'tlib' } ## failures 0 ## cut -use CGI; # Has 'sub AUTOLOAD {...}' +use TestAutoload; # Has 'sub AUTOLOAD {...}' -CGI::FooBar(); +TestAutoload::FooBar(); #----------------------------------------------------------------------------- ## name AUTOLOADers inspected on request -## parms { inspect_autoloaders => 1 } +## parms { at_inc => 'tlib', inspect_autoloaders => 1 } ## failures 1 ## cut -use CGI; # Has 'sub AUTOLOAD {...}' +use TestAutoload; # Has 'sub AUTOLOAD {...}' -CGI::FooBar(); +TestAutoload::FooBar(); #----------------------------------------------------------------------------- Index: tlib/TestAutoload.pm =================================================================== --- tlib/TestAutoload.pm (revision 0) +++ tlib/TestAutoload.pm (working copy) @@ -0,0 +1,12 @@ +package TestAutoload; + +sub AUTOLOAD { + print "Autoloading <$AUTOLOAD>\n"; + goto &foo; +} + +sub foo { + print "foo() called\n"; +} + +1;
Additionally, CGI.pm is no longer in core, so relying on it without declaring it as a dependency breaks the test as well.