Repository: lucy-clownfish Updated Branches: refs/heads/0.4 3480c6687 -> 3a5b5e17b
Fix for Clownfish include dirs Ah, the well-known issue when a "my" variable is declared conditionally. I consider it a bug in Perl :) Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/3a5b5e17 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/3a5b5e17 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/3a5b5e17 Branch: refs/heads/0.4 Commit: 3a5b5e17b906b71354435e9c0d2d0a324383c56b Parents: 3480c66 Author: Nick Wellnhofer <[email protected]> Authored: Mon Nov 10 18:29:58 2014 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Nov 10 18:35:39 2014 +0100 ---------------------------------------------------------------------- compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3a5b5e17/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 68953d8..5cb7eeb 100644 --- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm +++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm @@ -101,7 +101,8 @@ sub cf_include_dirs { my $self = shift; my $cf_include = $self->clownfish_params('include'); - my @dirs = ref($cf_include) ? @$cf_include : ( $cf_include ) + my @dirs; + @dirs = ref($cf_include) ? @$cf_include : ( $cf_include ) if defined($cf_include); # Add include dirs from CLOWNFISH_INCLUDE environment variable. @@ -125,7 +126,8 @@ sub cf_c_include_dirs { my $self = shift; my $include_dirs = $self->include_dirs; - my @dirs = ref($include_dirs) ? @$include_dirs : ( $include_dirs ) + my @dirs; + @dirs = ref($include_dirs) ? @$include_dirs : ( $include_dirs ) if defined($include_dirs); push( @dirs,
