Alien-Xmake
view release on metacpan or search on metacpan
use v5.40;
use lib 'builder';
use Alien::Xmake::Builder;
Alien::Xmake::Builder->new->Build_PL();
builder/Alien/Xmake/Builder.pm view on Meta::CPAN
method Build_PL() {
die "Pure perl Affix? Ha! You wish.\n" if $pureperl;
say sprintf 'Creating new Build script for %s %s', $meta->name, $meta->version;
# We must capture the current INC to ensure the builder finds itself
# when running the generated script.
my $inc_str = join( ' ', map {"-I$_"} @INC );
$self->write_file( 'Build', sprintf <<'', $^X, $inc_str, __PACKAGE__, __PACKAGE__ );
#!%s %s
use lib 'builder';
use %s;
%s->new( @ARGV && $ARGV[0] =~ /\A\w+\z/ ? ( action => shift @ARGV ) : (),
map { /^--/ ? ( shift(@ARGV) =~ s[^--][]r => 1 ) : /^-/ ? ( shift(@ARGV) =~ s[^-][]r => shift @ARGV ) : () } @ARGV )->Build();
make_executable('Build');
my @env = defined $ENV{PERL_MB_OPT} ? split_like_shell( $ENV{PERL_MB_OPT} ) : ();
$self->write_file( '_build_params', encode_json( [ \@env, \@ARGV ] ) );
if ( my $dynamic = $meta->custom('x_dynamic_prereqs') ) {
my %meta_struct = ( %{ $meta->as_struct }, dynamic_config => 1 );
require CPAN::Requirements::Dynamic;
t/02_xrepo.t view on Meta::CPAN
use v5.40;
use Test2::V0 '!subtest', -no_srand => 1;
use Test2::Util::Importer 'Test2::Tools::Subtest' => ( subtest_streamed => { -as => 'subtest' } );
use lib 'lib', '../lib', 'blib/lib', '../blib/lib';
use Alien::Xmake;
use Alien::Xrepo;
#
ok $Alien::Xrepo::VERSION, 'Alien::Xrepo::VERSION';
#
my $repo = Alien::Xrepo->new( verbose => 0 );
my $xmake = Alien::Xmake->new;
my $exe = $xmake->exe;
diag `$exe --help`;
diag $exe;
( run in 0.803 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )