Net::FreeDB2::Entry - FreeDB/CDDB entry class
See Net::FreeDB2.
The Net::FreeDB2::Entry class contains information on FreeDB/CDDB entries (CDs).
Net::FreeDB2::Entry
Creates a new Net::FreeDB2::Entry object. Calls read () if option fh, fn or array_ref is passed through OPT_HASH_REF. Calls readDev () if option dev is passed.
read ()
fh
fn
array_ref
OPT_HASH_REF
readDev ()
dev
Options for OPT_HASH_REF may include:
IO::Handle to read from.
IO::Handle
File name to read from.
ARRAY reference to read from.
ARRAY
Device to readDev () from.
Reads a FreeDB/CDDB database entry according to the option passed through HASH reference OPT_HASH_REF.
HASH
Throws an Error::Simple exception if the named file connot be opened, on syntax errors or if no read option are specified.
Error::Simple
Reads frame offsets and the disc length using cdparanoia. Throws an Error::Simple exception if the cdparanoia command fails or did not produce any usable output.
cdparanoia
Device for cdparanoia. If not specified, the cdparanoia default device is tried.
Writes a FreeDB/CDDB database entry according to the option passed. Throws an Error::Simple exception if the named file connot be opened or if no write option are specified.
IO::Handle to write to.
File name to write to.
ARRAY reference to write to.
Set the frame offset track attribute. TRACK is the track number and VALUE is the value. Both TRACK and VALUE must be positive integers.
TRACK
VALUE
Returns the frame offset track attribute(s). TRACK is the track number. If not specified, a list of all frame offsets is returned.
Set the disc length attribute. VALUE is the value. Must be a positive integer.
positive
Returns the disc length attribute.
Set the revision attribute. VALUE is the value.
Returns the revision attribute.
Set the client name. VALUE is the value.
Returns the client name attribute.
Set the client version. VALUE is the value.
Returns the client version attribute.
Set the client comment. VALUE is the value.
Returns the client comment attribute.
Set the DISCID attribute. VALUE is the value.
Returns the DISCID attribute.
Makes the DISCID out of the disc's frame offsets and disc length. Stores it through the setDiscID () method.
setDiscID ()
Makes the FreeDB/CDDB qurey for this disc and returns it. Calls mkDiscID () in the process.
mkDiscID ()
Set the artist attribute. VALUE is the value.
Returns the artist attribute.
Set the title attribute. VALUE is the value.
Returns the title attribute.
Set the DYEAR attribute. VALUE is the value.
Returns the DYEAR attribute.
Set the DGENRE attribute. VALUE is the value.
Returns the DGENRE attribute.
Set the TTITLEN track attribute. TRACK is the track number and VALUE is the value. TRACK must be a positive integer.
Returns the TTITLEN track attribute(s). TRACK is the track number. If not specified, a list of all TTITLEN is returned.
Set the EXTD attribute. VALUE is the value.
Returns the EXTD attribute.
Set the EXTTN track attribute. TRACK is the track number and VALUE is the value. TRACK must be a positive integer.
Returns the EXTTN track attribute(s). TRACK is the track number. If not specified, a list of all EXTTN is returned.
Set the database line length attribute. VALUE is the value. Throws an Error::Simple exception if VALUE isn't larger than 10.
Returns the database line length attribute. If empty, returns my variable $DB_LINE_LEN_DEF.
$DB_LINE_LEN_DEF
PRIVATE METHOD. Helper method for write (). Push the specified STRING string, precurred by the PRE string on the ARRAY referenced by ARRAY_REF. A too long a string (longer than getDbLineLen () characters) is chopped up like FreeDB/CDDB requires.
write ()
STRING
PRE
ARRAY_REF
getDbLineLen ()
Helper method for mkDiscID (). Calculate the digit sum.
Net::FreeDB2::Connection::HTTP, Net::FreeDB2::Match and Net::FreeDB2::Response::Read
None known.
First development: September 2002
Vincenzo Zocca <Vincenzo@Zocca.com>
Copyright 2002, Vincenzo Zocca.
This file is part of the Net::FreeDB2 module hierarchy for Perl by Vincenzo Zocca.
Net::FreeDB2
The Net::FreeDB2 module hierarchy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
The Net::FreeDB2 module hierarchy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Net::FreeDB2 module hierarchy; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To install Net::FreeDB2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::FreeDB2
CPAN shell
perl -MCPAN -e shell install Net::FreeDB2
For more information on module installation, please visit the detailed CPAN module installation guide.