Jeffrey T. Palmer > SDL > Module::Build::SDL

Download:
SDL-2.540.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: SDL-2.544

NAME ^

Module::Build::SDL - Module::Build subclass for building SDL apps/games [not stable yet]

SYNOPSIS ^

When creating a new SDL application/game you can create Build.PL like this:

 use Module::Build::SDL;
   
 my $builder = Module::Build::SDL->new(
     module_name   => 'Games::Demo',
     dist_version  => '1.00',
     dist_abstract => 'Demo game based on Module::Build::SDL',
     dist_author   => 'coder@cpan.org',
     license       => 'perl',
     requires      => {
         'SDL'     => 0,
     },
     #+ others Module::Build options
 )->create_build_script();

Once you have created a SDL application/game via Module::Build::SDL as described above you can use some extra build targets/actions:

DESCRIPTION ^

Module::Build::SDL is a subclass of Module::Build created to make easy some tasks specific to SDL applications - e.g. packaging SDL application/game into PAR archive.

APPLICATION/GAME LAYOUT ^

Module::Build::SDL expects the following layout in project directory:

 #example: game with the main *.pl script + data files + modules (*.pm)
 Build.PL
 lib/
     Games/
           Demo.pm
 bin/
     game-script.pl
 data/
     whatever_data_files_you_need.jpg

the most simple game should look like:

 #example: simple one-script apllication/game
 Build.PL
 bin/
    game-script.pl

In short - there are 3 expected subdirectories:

RULES TO FOLLOW ^

When creating a SDL application/game based on Module::Build::SDL it is recommended to follow these rules:

syntax highlighting: