Applied Magnet's Patch
[sdlgit/SDL_perl.git] / lib / SDL / Music.pm
index 711c321..e12e0b2 100644 (file)
@@ -38,9 +38,9 @@ use SDL;
 sub new {
        my $proto = shift;      
        my $class = ref($proto) || $proto;
-       die SDL::GetError() unless $$self;
        my $filename = shift;
        my $self = \SDL::MixLoadMusic($filename);
+       croak SDL::GetError() unless $$self;
        bless $self,$class;
        return $self;
 }
@@ -52,29 +52,3 @@ sub DESTROY {
 
 1;
 
-__END__;
-
-=pod
-
-=head1 NAME
-
-SDL::Music - a perl extension
-
-=head1 DESCRIPTION
-
-L<SDL::Music> is used to load music files for use with L<SDL::Mixer>.
-To load a music file one simply creates a new object passing the filename 
-to the constructor:
-
-       my $music = new SDL::Music 'my_song.ogg';
-
-
-=head1 AUTHOR
-
-David J. Goehrig
-
-=head1 SEE ALSO
-
-L<perl> L<SDL::Mixer>
-
-=cut