You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2012/10/22 23:27:56 UTC

[lucy-commits] git commit: refs/heads/master - Fix exporting of Perl symbols

Updated Branches:
  refs/heads/master 27fa48e18 -> bf6174ced


Fix exporting of Perl symbols

The correct idiom to use Exporter without polluting @ISA is:

    use Exporter 'import';

TestUtils had 'use base qw(Exporter)' which looks OK, but for some reason
causes build failures here on MacOS 10.8 with a stock Perl 5.12.4. The
failures only happen with './Build test', not with 'prove -rb t'. I have
no idea why, but this commit makes the test suite pass.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/bf6174ce
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/bf6174ce
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/bf6174ce

Branch: refs/heads/master
Commit: bf6174ced0a288af66ffeca21942878da47ce8d7
Parents: 27fa48e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Oct 22 23:13:27 2012 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Oct 22 23:13:27 2012 +0200

----------------------------------------------------------------------
 perl/buildlib/Lucy/Redacted.pm       |    8 +++-----
 perl/buildlib/Lucy/Test/TestUtils.pm |    2 +-
 perl/lib/Lucy.pm                     |    9 ++++++---
 3 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/bf6174ce/perl/buildlib/Lucy/Redacted.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Redacted.pm b/perl/buildlib/Lucy/Redacted.pm
index 54de732..2e780c2 100644
--- a/perl/buildlib/Lucy/Redacted.pm
+++ b/perl/buildlib/Lucy/Redacted.pm
@@ -17,15 +17,13 @@ use strict;
 use warnings;
 
 package Lucy::Redacted;
-use Exporter;
-BEGIN {
-    our @ISA       = qw( Exporter );
-    our @EXPORT_OK = qw( list );
-}
 
 our $VERSION = '0.003000';
 $VERSION = eval $VERSION;
 
+use Exporter 'import';
+our @EXPORT_OK = qw( list );
+
 # Return a partial list of Lucy classes which were once public but are
 # now either deprecated, removed, or moved.
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/bf6174ce/perl/buildlib/Lucy/Test/TestUtils.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Test/TestUtils.pm b/perl/buildlib/Lucy/Test/TestUtils.pm
index 2516d12..acf4d3f 100644
--- a/perl/buildlib/Lucy/Test/TestUtils.pm
+++ b/perl/buildlib/Lucy/Test/TestUtils.pm
@@ -17,11 +17,11 @@ use strict;
 use warnings;
 
 package Lucy::Test::TestUtils;
-use base qw( Exporter );
 
 our $VERSION = '0.003000';
 $VERSION = eval $VERSION;
 
+use Exporter 'import';
 our @EXPORT_OK = qw(
     working_dir
     create_working_dir

http://git-wip-us.apache.org/repos/asf/lucy/blob/bf6174ce/perl/lib/Lucy.pm
----------------------------------------------------------------------
diff --git a/perl/lib/Lucy.pm b/perl/lib/Lucy.pm
index e8b222c..d536ee1 100644
--- a/perl/lib/Lucy.pm
+++ b/perl/lib/Lucy.pm
@@ -19,11 +19,15 @@ use warnings;
 package Lucy;
 
 use 5.008003;
-use Exporter;
 
 our $VERSION = '0.003000';
 $VERSION = eval $VERSION;
 
+use Exporter 'import';
+BEGIN {
+    our @EXPORT_OK = qw( to_clownfish to_perl kdump );
+}
+
 # On most UNIX variants, this flag makes DynaLoader pass RTLD_GLOBAL to
 # dl_open, so extensions can resolve the needed symbols without explicitly
 # linking against the DSO.
@@ -31,11 +35,10 @@ sub dl_load_flags { 1 }
 
 BEGIN {
     require DynaLoader;
-    our @ISA = qw( DynaLoader Exporter );
+    our @ISA = qw( DynaLoader );
     # This loads a large number of disparate subs.
     bootstrap Lucy '0.3.0';
     _init_autobindings();
-    our @EXPORT_OK = qw( to_clownfish to_perl kdump );
 }
 
 sub kdump {