You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2005/06/12 11:38:31 UTC

svn commit: r190232 - in /perl/modperl/trunk: Changes lib/Apache2/Status.pm t/modules/apache_status.t

Author: stas
Date: Sun Jun 12 02:38:29 2005
New Revision: 190232

URL: http://svn.apache.org/viewcvs?rev=190232&view=rev
Log:
B::Terse has problems with XS code, so adjust Apache::Status to eval
{} the code doing Syntax Tree Dump: syntax and execution order options


Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/lib/Apache2/Status.pm
    perl/modperl/trunk/t/modules/apache_status.t

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=190232&r1=190231&r2=190232&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Sun Jun 12 02:38:29 2005
@@ -12,6 +12,10 @@
 
 =item 2.0.1-dev
 
+B::Terse has problems with XS code, so adjust Apache::Status to eval
+{} the code doing Syntax Tree Dump: syntax and execution order options
+[Stas]
+
 Fix a broken regexp in Apache2::Build::dir() on win32 that would
 incorrectly attempt to fully-qualify paths like c:/some/path
 [Nick *** <do...@abv.bg>]

Modified: perl/modperl/trunk/lib/Apache2/Status.pm
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/Apache2/Status.pm?rev=190232&r1=190231&r2=190232&view=diff
==============================================================================
--- perl/modperl/trunk/lib/Apache2/Status.pm (original)
+++ perl/modperl/trunk/lib/Apache2/Status.pm Sun Jun 12 02:38:29 2005
@@ -497,7 +497,11 @@
 
     # XXX: blead perl dumps things to STDERR, though the same version
     # works fine with 1.27
-    B::Terse::compile($arg, $name)->();
+    # B::Concise couldn't parse XS code before perl patch 24681 (perl 5.9.3)
+    eval { B::Terse::compile($arg, $name)->() };
+    if ($@) {
+        $r->print("B::Terse has failed: $@");
+    }
 }
 
 sub b_terse_size_link {

Modified: perl/modperl/trunk/t/modules/apache_status.t
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/modules/apache_status.t?rev=190232&r1=190231&r2=190232&view=diff
==============================================================================
--- perl/modperl/trunk/t/modules/apache_status.t (original)
+++ perl/modperl/trunk/t/modules/apache_status.t Sun Jun 12 02:38:29 2005
@@ -10,7 +10,7 @@
 my @opts = qw(script myconfig rgysubs section_config env isa_tree
               symdump inc inh_tree sig);
 
-plan tests => @opts + 3, need 'HTML::HeadParser',
+plan tests => @opts + 5, need 'HTML::HeadParser',
     { "CGI.pm (2.93 or higher) or Apache2::Request is needed" =>
           !!(eval { require CGI && $CGI::VERSION >= 2.93 } ||
              eval { require Apache2::Request })};
@@ -40,4 +40,14 @@
 for my $opt (@opts) {
     my $url = "$base_url?$opt";
     ok GET_BODY_ASSERT $url;
+}
+
+# B::Terse has an issue with XS, but Apache::Status shouldn't crash on
+# that
+{
+    # Syntax Tree Dump: syntax and execution order options
+    for (qw(slow exec)) {
+        my $url = "$base_url/$_/Apache2::Const::OK?noh_b_terse";
+        ok GET_OK $url;
+    }
 }