@@ -1935,6 +1935,8 @@ sub init_INST {
1935
1935
$self -> {INST_ARCHAUTODIR } = $self -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
1936
1936
' $(FULLEXT)' );
1937
1937
1938
+ $self -> {INST_SHARE } ||= $self -> catdir(' $(INST_LIB)' , ' auto' , ' share' );
1939
+
1938
1940
$self -> {INST_SCRIPT } ||= $self -> catdir($Curdir ,' blib' ,' script' );
1939
1941
1940
1942
$self -> {INST_MAN1DIR } ||= $self -> catdir($Curdir ,' blib' ,' man1' );
@@ -2974,25 +2976,25 @@ sub sharedir {
2974
2976
return ' ' unless %share ;
2975
2977
2976
2978
my %files ;
2977
- _sharedir_find_files(\%files , $share {dist }, File::Spec -> catdir( ' $(INST_LIB) ' , qw( auto share dist) , ' $(DISTNAME)' ) , \%share ) if $share {dist };
2979
+ $self -> _sharedir_find_files(\%files , $share {dist }, [ qw/ $(INST_SHARE) dist $(DISTNAME) / ] , \%share ) if $share {dist };
2978
2980
for my $module (keys %{ $share {module } || {} }) {
2979
- my $destination = File::Spec -> catdir( ' $(INST_LIB) ' , qw( auto share module) , $module ) ;
2980
- _sharedir_find_files(\%files , $share {module }{$module }, $destination , \%share );
2981
+ my $destination = [ qw/ $(INST_SHARE) module/ , $module ] ;
2982
+ $self -> _sharedir_find_files(\%files , $share {module }{$module }, $destination , \%share );
2981
2983
}
2982
2984
my $pm_to_blib = $self -> oneliner(q{ pm_to_blib({@ARGV}, '$(INST_LIB)')} , [' -MExtUtils::Install' ]);
2983
2985
return " \n pure_all :: sharedir\n\n sharedir : \n " . join ' ' , map { " \t\$ (NOECHO) $_ \n " } $self -> split_command($pm_to_blib , %files );
2984
2986
}
2985
2987
2986
2988
sub _sharedir_find_files {
2987
- my ($files , $source , $sink , $options ) = @_ ;
2989
+ my ($self , $ files , $source , $sink , $options ) = @_ ;
2988
2990
File::Find::find({
2989
2991
wanted => sub {
2990
2992
if (-d ) {
2991
2993
$File::Find::prune = 1 if $options -> {skip_dotdir } && / ^\. / ;
2992
2994
return ;
2993
2995
}
2994
2996
return if $options -> {skip_dotfile } && / ^\. / ;
2995
- $files -> {$_ } = File::Spec -> catfile($sink , $_ );
2997
+ $files -> {$_ } = $self -> catfile(@{ $sink } , $_ );
2996
2998
},
2997
2999
no_chdir => 1,
2998
3000
}, $source );
0 commit comments