In perl.git, the branch leont/pl2bat_refactor has been updated <https://perl5.git.perl.org/perl.git/commitdiff/60c700683170de0aedce1e024c177b238656b3ce?hp=bcafea090c1453af91759e824d172f95c957b808>
- Log ----------------------------------------------------------------- commit 60c700683170de0aedce1e024c177b238656b3ce Author: Leon Timmermans <faw...@gmail.com> Date: Fri Apr 26 09:55:43 2019 +0100 WIP commit 3bb5cb237d4f1f8db9e79f473981d3338a706894 Author: Leon Timmermans <faw...@gmail.com> Date: Thu Apr 25 16:40:51 2019 +0200 Force path to ExtUtils::PL2Bat ----------------------------------------------------------------------- Summary of changes: cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm | 2 +- cpan/ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm | 13 ++++++++++++- make_ext.pl | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm index 43c974d5b4..cb027964a7 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm @@ -143,7 +143,7 @@ sub init_tools { $self->{DEV_NULL} ||= '> NUL'; $self->{FIXIN} ||= $self->{PERL_CORE} ? - "\$(PERLRUN) $self->{PERL_SRC}\\win32\\bin\\pl2bat.pl" : + "\$(PERLRUN) -I$self->{PERL_SRC}\\cpan\\ExtUtils-PL2Bat\\lib $self->{PERL_SRC}\\win32\\bin\\pl2bat.pl" : 'pl2bat.bat'; $self->SUPER::init_tools; diff --git a/cpan/ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm b/cpan/ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm index 3dfa2b6003..af77f07ed5 100644 --- a/cpan/ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm +++ b/cpan/ExtUtils-PL2Bat/lib/ExtUtils/PL2Bat.pm @@ -5,7 +5,18 @@ use warnings; use 5.006; -use base 'Exporter'; +sub import { + my ($self, @functions) = @_; + if (@functions) { + require Exporter; + goto &Exporter::import; + } + else { + my $caller = caller; + no strict refs; + *{"$caller\::pl2bat"} = \&pl2bat; + } +} our @EXPORT = qw/pl2bat/; use Config; diff --git a/make_ext.pl b/make_ext.pl index 9bc4718d52..b8995e5568 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -154,7 +154,7 @@ if (IS_WIN32) { $ENV{PATH} = "$topdir;$topdir\\win32\\bin;$ENV{PATH}"; my $pl2bat = "$topdir\\win32\\bin\\pl2bat"; unless (-f "$pl2bat.bat") { - my @args = ($perl, "-I$topdir\\lib", ("$pl2bat.pl") x 2); + my @args = ($perl, "-I$topdir\\cpan\\ExtUtils-PL2Bat\\lib", ("$pl2bat.pl") x 2); print "@args\n" if $verbose; system(@args) unless IS_CROSS; } -- Perl5 Master Repository