Bug#769265: Patch for lib/Marpa/R2.pm

Jeffrey Kegler jeffreykegler at jeffreykegler.com
Sat Nov 22 15:10:01 UTC 2014


I recommend upgrading to the latest Marpa::R2, which includes among other
things, some Debian-targeted fixes.  If that is not possible, and you
really need to patch instead, you can start with the one which follows.  It
fixes some over-engineering on my part, together with an outright screw-up
which causes error messages not to be reported.  I hope it will be at least
a good start toward a solution.

index 1c1404d..74fe683 100644
--- a/cpan/lib/Marpa/R2.pm
+++ b/cpan/lib/Marpa/R2.pm
@@ -20,7 +20,7 @@ use strict;
 use warnings;

 use vars qw($VERSION $STRING_VERSION @ISA $DEBUG);
-$VERSION        = '2.086000';
+$VERSION        = '2.101_000';
 $STRING_VERSION = $VERSION;
 ## no critic (BuiltinFunctions::ProhibitStringyEval)
 $VERSION = eval $VERSION;
@@ -29,6 +29,7 @@ $DEBUG = 0;

 use Carp;
 use English qw( -no_match_vars );
+use XSLoader;

 use Marpa::R2::Version;

@@ -76,18 +77,7 @@ LOAD_EXPLICIT_LIBRARY: {
     $Marpa::R2::LIBMARPA_FILE = $file;
 }

-eval {
-    require XSLoader;
-    XSLoader::load( 'Marpa::R2', $Marpa::R2::STRING_VERSION );
-    1;
-} or eval {
-    require DynaLoader;
-## no critic(ClassHierarchies::ProhibitExplicitISA)
-    push @ISA, 'DynaLoader';
-    Dynaloader::bootstrap Marpa::R2 $Marpa::R2::STRING_VERSION;
-    1;
-} or Carp::croak("Could not load XS version of Marpa::R2: $EVAL_ERROR");
-
+XSLoader::load( 'Marpa::R2', $Marpa::R2::STRING_VERSION );

 if ( not $ENV{'MARPA_AUTHOR_TEST'} ) {
     $Marpa::R2::DEBUG = 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20141122/7948ebbd/attachment.html>


More information about the pkg-perl-maintainers mailing list