Permalink
Browse files

Renamed builder and fixed it up a little

  • Loading branch information...
1 parent be9bca4 commit 1fd9b1dba16a7981663ee67ba7a3f192297e2072 @Blaizer committed Oct 4, 2011
Showing with 16 additions and 7 deletions.
  1. +2 −2 Build.PL
  2. +14 −5 inc/My/{Module/Build.pm → Builder.pm}
View
@@ -2,14 +2,14 @@
use strict;
use warnings;
use lib 'inc';
-use My::Module::Build;
+use My::Builder;
use Alien::SDL;
use ExtUtils::CBuilder;
my @cflags = ExtUtils::CBuilder->new->split_like_shell( File::Spec->catfile('-I' . Alien::SDL->config('prefix'), 'include') );
my @lflags = ExtUtils::CBuilder->new->split_like_shell( Alien::SDL->config('libs', '-lSDL_mixer') );
-my $build = My::Module::Build->new(
+my $build = My::Builder->new(
module_name => 'Games::Neverhood',
dist_abstract => 'The Neverhood remade in SDL Perl',
license => 'perl',
@@ -1,4 +1,4 @@
-package My::Module::Build;
+package My::Builder;
use strict;
use warnings;
use base 'Module::Build';
@@ -9,19 +9,28 @@ $ENV{SDL_AUDIODRIVER} = 'dummy';
=pod
+=head1 ACTIONS
+
+=over
+
=item uninstall
-[version 0.01]
+[version 0.01] (Blaise Roth, experimental)
-This action will find the .packlist file made when the distribution was installed and attempt to delete all files listed in it. The process of finding the .packlist file requires the module to be installed, so you will need to install the distribution again to reatempt an uninstall.
+This action will find the .packlist file made when the distribution was
+installed and attempt to delete all files listed in it. The process of finding
+the .packlist file requires the module to be installed, so you will need to
+install the distribution again to reatempt an uninstall.
+
+=back
=cut
sub ACTION_uninstall {
- require File::ShareDir;
- require File::Spec;
eval { require Games::Neverhood };
$! and leave("Games::Neverhood wouldn't load: $@. Maybe install before uninstalling?");
+ require File::ShareDir;
+ require File::Spec;
my $dir = File::ShareDir::module_dir('Games::Neverhood');
my $packlist = File::Spec->catfile($dir, '.packlist');
open LIST, ">>$packlist"; #Just makin' sure we can write in it later

0 comments on commit 1fd9b1d

Please sign in to comment.