Repository: lucy-clownfish
Updated Branches:
  refs/heads/master e96564cdb -> 15e36c4f7


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/7238ced2
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/7238ced2
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/7238ced2

Branch: refs/heads/master
Commit: 7238ced291cd7e393a7e4ce60995e30bf04a4c03
Parents: e96564c
Author: Nick Wellnhofer <[email protected]>
Authored: Fri Nov 24 14:43:28 2017 +0100
Committer: Nick Wellnhofer <[email protected]>
Committed: Fri Nov 24 15:17:31 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/7238ced2/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 7d1a506..35c6a2a 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/7238ced2/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 bcd9d46..f109e94 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
@@ -138,6 +138,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