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
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;