remove ugly hack
[sdlgit/SDL_perl.git] / lib / SDL / Palette.pm
index 62a58f5..df99f3f 100644 (file)
@@ -34,6 +34,8 @@
 
 package SDL::Palette;
 use strict;
+use warnings;
+use Carp;
 
 # NB: there is no palette destructor because most of the time the 
 # palette will be owned by a surface, so any palettes you create 
@@ -50,7 +52,7 @@ sub new {
        } else { 
                $self = \SDL::NewPalette(256); 
        }
-       die SDL::GetError() unless $$self;
+       croak SDL::GetError() unless $$self;
        bless $self, $class;
        return $self;
 }