Repository: lucy-clownfish
Updated Branches:
  refs/heads/0.6 6555ea20b -> d5a9a6868


Fix Perl build if "." is not in @INC

Perl 5.26 doesn't put "." in @INC anymore. Add "." to a localized @INC
when loading Charmony.pm and the binding .pm files.

Fixes CLOWNFISH-119.


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

Branch: refs/heads/0.6
Commit: 59d5cac1ce71f575d255144895c6860fa22a9895
Parents: 6555ea2
Author: Nick Wellnhofer <[email protected]>
Authored: Fri Nov 24 14:43:28 2017 +0100
Committer: Nick Wellnhofer <[email protected]>
Committed: Fri Nov 24 14:43:28 2017 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC/Perl/Build.pm           | 1 +
 compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59d5cac1/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm 
b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index a4ac266..f4d6971 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -227,6 +227,7 @@ sub _compile_clownfish {
     $hierarchy->read_host_data_json;
 
     # Process all Binding classes in buildlib.
+    local @INC = ( @INC, '.' );
     my $pm_filepaths = $self->rscan_dir( $BUILDLIB_DIR, qr/\.pm$/ );
     for my $pm_filepath (@$pm_filepaths) {
         next unless $pm_filepath =~ /Binding/;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59d5cac1/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm 
b/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
index 35c0e22..343f768 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
@@ -131,6 +131,7 @@ my $config;
 sub charmony {
     my ( undef, $key ) = @_;
     if (!$config) {
+        local @INC = ( @INC, '.' );
         eval { require 'Charmony.pm'; };
         if ( !$@ ) {
             $config = Charmony->config;

Reply via email to