@@ -1938,6 +1938,8 @@ sub init_INST {
19381938 $self -> {INST_ARCHAUTODIR } = $self -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
19391939 ' $(FULLEXT)' );
19401940
1941+ $self -> {INST_SHARE } ||= $self -> catdir(' $(INST_LIB)' , ' auto' , ' share' );
1942+
19411943 $self -> {INST_SCRIPT } ||= $self -> catdir($Curdir ,' blib' ,' script' );
19421944
19431945 $self -> {INST_MAN1DIR } ||= $self -> catdir($Curdir ,' blib' ,' man1' );
@@ -2957,25 +2959,25 @@ sub sharedir {
29572959 return ' ' unless %share ;
29582960
29592961 my %files ;
2960- _sharedir_find_files(\%files , $share {dist }, File::Spec -> catdir( ' $(INST_LIB) ' , qw( auto share dist) , ' $(DISTNAME)' ) , \%share ) if $share {dist };
2962+ $self -> _sharedir_find_files(\%files , $share {dist }, [ qw/ $(INST_SHARE) dist $(DISTNAME) / ] , \%share ) if $share {dist };
29612963 for my $module (keys %{ $share {module } || {} }) {
2962- my $destination = File::Spec -> catdir( ' $(INST_LIB) ' , qw( auto share module) , $module ) ;
2963- _sharedir_find_files(\%files , $share {module }{$module }, $destination , \%share );
2964+ my $destination = [ qw/ $(INST_SHARE) module/ , $module ] ;
2965+ $self -> _sharedir_find_files(\%files , $share {module }{$module }, $destination , \%share );
29642966 }
29652967 my $pm_to_blib = $self -> oneliner(q{ pm_to_blib({@ARGV}, '$(INST_LIB)')} , [' -MExtUtils::Install' ]);
29662968 return " \n pure_all :: sharedir\n\n sharedir : \n " . join ' ' , map { " \t\$ (NOECHO) $_ \n " } $self -> split_command($pm_to_blib , %files );
29672969}
29682970
29692971sub _sharedir_find_files {
2970- my ($files , $source , $sink , $options ) = @_ ;
2972+ my ($self , $ files , $source , $sink , $options ) = @_ ;
29712973 File::Find::find({
29722974 wanted => sub {
29732975 if (-d ) {
29742976 $File::Find::prune = 1 if $options -> {skip_dotdir } && / ^\. / ;
29752977 return ;
29762978 }
29772979 return if $options -> {skip_dotfile } && / ^\. / ;
2978- $files -> {$_ } = File::Spec -> catfile($sink , $_ );
2980+ $files -> {$_ } = $self -> catfile(@{ $sink } , $_ );
29792981 },
29802982 no_chdir => 1,
29812983 }, $source );
0 commit comments