---
name: "SDL::CDROM"
section: "3pm"
platform: "linux"
package: "libsdl-perl"
version: "2.548-5+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL::CDROM"
---

# SDL::CDROM(3pm)

## NAME

SDL::CDROM -- SDL Bindings for the CDROM device

## CATEGORY

Core, CDROM

## SYNOPSIS

```
 use SDL ':init';
 use SDL::CDROM;

 SDL::init(SDL_INIT_CDROM);

 print SDL::CDROM::num_drives();

 print SDL::CDROM::name(0);

 SDL::quit();
```

## METHODS

### num\_drives

```
 my $drives = SDL::CDROM::num_drives();
```

Returns number of drives available on the system

### name

```
 my $drive_name = SDL::CDROM::name($drive_num);
```

Returns human readable name for CDROM device

Examples:

- •

  '/dev/cdrom'

- •

  'E:'

- •

  '/dev/disk/ide/1/master'

## See Also

SDL::CD, SDL::CDTrack

## AUTHORS

See "AUTHORS" in SDL.
