Alien-CSFML

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

# =========================================================================

use 5.008_001;
use strict;

use Module::Build::Tiny 0.035;

use Devel::CheckBin;

check_bin('perl')if 0;
use lib 'inc';
use MBCSFML;
('1');

Build_PL();

examples/csfml.pl  view on Meta::CPAN

#use lib '../../blib';
use strict;
use warnings;
$|++;
{
    use Alien::CSFML;
    use ExtUtils::CBuilder;
    my $SF  = Alien::CSFML->new();
    my $CC  = ExtUtils::CBuilder->new();
    my $SRC = 'hello_world.c';
    open( my $FH, '>', $SRC ) || die '...';

examples/sfml.pl  view on Meta::CPAN

use lib '../../blib';
use strict;
use warnings;
$|++;
{
    use Alien::CSFML;
    use ExtUtils::CBuilder;
    my $SF  = Alien::CSFML->new( 'C++' => 1 );
    my $CC  = ExtUtils::CBuilder->new();
    my $SRC = 'hello_world.cxx';
    open( my $FH, '>', $SRC ) || die '...';

inc/MBCSFML.pm  view on Meta::CPAN

        for grep {defined} @opt{qw/install_base destdir prefix/}, values %{ $opt{install_path} };
    @opt{ 'config', 'meta' } = ( ExtUtils::Config->new( $opt{config} ), get_meta() );
    $actions{$action}->(
        %opt, install_paths => ExtUtils::InstallPaths->new( %opt, dist_name => $opt{meta}->name )
    );
}

sub Build_PL {
    my $meta = get_meta();
    printf "Creating new 'Build' script for '%s' version '%s'\n", $meta->name, $meta->version;
    my $dir = $meta->name eq 'MBCSFML' ? '' : "use lib 'inc';";
    write_file( 'Build', 'raw', "#!perl\n$dir\nuse MBCSFML;\n\$|++;\nBuild();\n" );
    make_executable('Build');
    my @env = defined $ENV{PERL_MB_OPT} ? split_like_shell( $ENV{PERL_MB_OPT} ) : ();
    write_file( '_build_params', 'utf8', encode_json( [ @env, @ARGV ] ) );
    $meta->save(@$_) for ['MYMETA.json'], [ 'MYMETA.yml' => { version => 1.4 } ];
}
1;

=head1 SEE ALSO

minil.toml  view on Meta::CPAN

name = "Alien-CSFML"
badges = ["github-actions/linux.yaml", "github-actions/windows.yaml", "github-actions/osx.yaml", "github-actions/freebsd.yaml", "metacpan"]
module_maker="ModuleBuildTiny"
license="artistic_2"
authority="cpan:SANKO"
requires_external_bin=["perl')if 0;\nuse lib 'inc';\nuse MBCSFML;\n('1"]

[release]
hook=[
    'tidyall -a'
]

t/0001_use.t  view on Meta::CPAN

use strict;
use warnings;
BEGIN { chdir '../' if not -d '_build'; }
use Test::More tests => 1;
use lib qw[blib/lib];
use_ok('Alien::CSFML');

t/0002_c_exe.t  view on Meta::CPAN

use strict;
use warnings;
BEGIN { chdir '../' if not -d '_build'; }
use Test::More;
use File::Temp;
use lib qw[blib/lib];
use Alien::CSFML;
use ExtUtils::CBuilder;
$|++;
my $CC = ExtUtils::CBuilder->new( quiet => 0 );
my $SF = Alien::CSFML->new();
my ( $FH, $SRC ) = File::Temp::tempfile(
    'alien_csfml_t0002_XXXX',
    TMPDIR  => 1,
    UNLINK  => 1,
    SUFFIX  => '.c',

t/0003_cxx_exe.t  view on Meta::CPAN

use strict;
use warnings;
BEGIN { chdir '../' if not -d '_build'; }
use Test::More;
use File::Temp;
use lib qw[blib/lib];
use Alien::CSFML;
use ExtUtils::CBuilder;
$|++;
my $CC = ExtUtils::CBuilder->new( quiet => 0 );
my $SF = Alien::CSFML->new( 'C++' => 1 );
my ( $FH, $SRC ) = File::Temp::tempfile(
    'alien_csfml_t0002_XXXX',
    TMPDIR  => 1,
    UNLINK  => 1,
    SUFFIX  => '.cxx',



( run in 0.610 second using v1.01-cache-2.11-cpan-87723dcf8b7 )