package SDL::Cdrom;
use strict;
+use warnings;
+use Carp;
BEGIN {
use Exporter();
my $self;
my $number = shift;
$self = \SDL::CDOpen($number);
- die SDL::GetError() if ( SDL::CD_ERROR() eq SDL::CDStatus($$self));
+ croak SDL::GetError() if ( SDL::CD_ERROR() eq SDL::CDStatus($$self));
bless $self,$class;
return $self;
}
SDL::CDClose($$self);
}
-sub CD_NUM_DRIVES {
+sub cd_num_drives {
return SDL::CDNumDrives();
}
=item *
-C<CD_NUM_DRIVES>.
+C<cd_num_drives>.
=back
=head1 METHODS
-=head2 CD_NUM_DRIVES()
+=head2 cd_num_drives()
Returns the number of CD-ROM drives present.