@@ -1934,6 +1934,8 @@ sub init_INST {
19341934 $self -> {INST_ARCHAUTODIR } = $self -> catdir(' $(INST_ARCHLIB)' , ' auto' ,
19351935 ' $(FULLEXT)' );
19361936
1937+ $self -> {INST_SHARE } ||= $self -> catdir(' $(INST_LIB)' , ' auto' , ' share' );
1938+
19371939 $self -> {INST_SCRIPT } ||= $self -> catdir($Curdir ,' blib' ,' script' );
19381940
19391941 $self -> {INST_MAN1DIR } ||= $self -> catdir($Curdir ,' blib' ,' man1' );
@@ -2973,25 +2975,25 @@ sub sharedir {
29732975 return ' ' unless %share ;
29742976
29752977 my %files ;
2976- _sharedir_find_files(\%files , $share {dist }, File::Spec -> catdir( ' $(INST_LIB) ' , qw( auto share dist) , ' $(DISTNAME)' ) , \%share ) if $share {dist };
2978+ $self -> _sharedir_find_files(\%files , $share {dist }, [ qw/ $(INST_SHARE) dist $(DISTNAME) / ] , \%share ) if $share {dist };
29772979 for my $module (keys %{ $share {module } || {} }) {
2978- my $destination = File::Spec -> catdir( ' $(INST_LIB) ' , qw( auto share module) , $module ) ;
2979- _sharedir_find_files(\%files , $share {module }{$module }, $destination , \%share );
2980+ my $destination = [ qw/ $(INST_SHARE) module/ , $module ] ;
2981+ $self -> _sharedir_find_files(\%files , $share {module }{$module }, $destination , \%share );
29802982 }
29812983 my $pm_to_blib = $self -> oneliner(q{ pm_to_blib({@ARGV}, '$(INST_LIB)')} , [' -MExtUtils::Install' ]);
29822984 return " \n pure_all :: sharedir\n\n sharedir : \n " . join ' ' , map { " \t\$ (NOECHO) $_ \n " } $self -> split_command($pm_to_blib , %files );
29832985}
29842986
29852987sub _sharedir_find_files {
2986- my ($files , $source , $sink , $options ) = @_ ;
2988+ my ($self , $ files , $source , $sink , $options ) = @_ ;
29872989 File::Find::find({
29882990 wanted => sub {
29892991 if (-d ) {
29902992 $File::Find::prune = 1 if $options -> {skip_dotdir } && / ^\. / ;
29912993 return ;
29922994 }
29932995 return if $options -> {skip_dotfile } && / ^\. / ;
2994- $files -> {$_ } = File::Spec -> catfile($sink , $_ );
2996+ $files -> {$_ } = $self -> catfile(@{ $sink } , $_ );
29952997 },
29962998 no_chdir => 1,
29972999 }, $source );
0 commit comments