Peter Corlett > Device-SCSI-1.004 > Device::SCSI::CDROM

Download:
Device-SCSI-1.004.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.004   Source  

NAME ^

Device::SCSI::CDROM - Perl module to control SCSI CD-ROM devices

VERSION ^

version 1.004

SYNOPSIS ^

 use Device::SCSI::CDROM;
 # use the same way as Device::SCSI but with extra methods.

DESCRIPTION ^

This is an incomplete package that may ultimately provide device-specific support for CD-ROM and other read-only units. The API is poor and may change at any time.

METHODS ^

disc_info

 my($first, $last) = $device->disc_info;

This returns the track numbers of the first and last track on the CD inserted in the drive.

toc

 my $tracks=$device->toc;
 my $first=$tracks->{FIRST};
 my $last=$tracks->{LAST};
 foreach my $track ($first..$last, 'CD') {
     my $trackstart=$tracks->{$track}{START};
     my $trackend=$tracks->{$track}{FINISH};
     # use these values
 }

This reads the Table Of Contents on the CD, and returns a hashref containing information on all thr tracks on the CD. The keys are:

FIRST

The number of the first track on the CD.

LAST

The number of the last track on the CD.

CD

A hashref with keys START and FINISH mapping to the block numbers of the start and end of the CD.

(Numbers 1 ... 99)

A hashref with keys START and FINISH mapping to the block numbers of the start and end of the track with the same number as the key.

AUTHOR ^

Peter Corlett <abuse@cabal.org.uk>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Peter Corlett.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: