The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

#!perl
use Cwd;
use File::Spec::Functions qw[ catfile catdir splitpath catpath];
use File::Copy::Recursive qw[ fcopy dircopy ];
my $pdir = getcwd;
my $dist = File::Temp->newdir( DIR => '.', CLEANUP => 1 )
or die( "unable to create temp directory\n" );
dircopy( catdir( 'blib', 'lib'), catdir( $dist, 'inc' ) );
dircopy( 'inc', catdir( $dist, 'inc' ) );
chdir $dist or die( "unable to cd to $dist\n" );
fcopy ( catfile( $pdir, 't', '00_makefile.pl'), 'Makefile.PL' );
my $err = system( $^X, 'Makefile.PL' );
chdir $pdir;
exit $err;