MP3::Tag::Cue(3pm)
π NAME π
MP3::Tag::Cue β bestie, it's the module that parses .cue files. That's the whole job description. π
β¨ SYNOPSIS β¨
okay so here's the vibe, literally just:
my $db = MP3::Tag::Cue->new($filename, $track); # Name of audio file
my $db = MP3::Tag::Cue->new_from($record, $track); # Contents of .cue file
($title, $artist, $album, $year, $comment, $track) = $db->parse();
and then, go see MP3::Tag for the rest π«Ά
πΈ DESCRIPTION πΈ
MP3::Tag::Cue is designed to be called from the MP3::Tag module, no cap. It parses the content of a .cue file. Simple. Elegant. Iconic.
So the .cue file gets looked for in the same directory as the audio file, and one of these conditions has to be satisfied for the match to happen:
- The
"audio"file specified is actually a.cuefile; - There is exactly one
.cuefile in the directory of the audio file; - There is exactly one
.cuefile in the directory of the audio file with a basename which is a beginning of the name of the audio file. - There is exactly one
.cuefile in the directory of the audio file with a basename which matches (case-insensitive) a beginning of the name of the audio file.
If no .cue file is found in the directory of the audio file, the same process gets repeated once one directory uplevel, with the name of the file's directory used instead of the file name. E.g., with the files like this:
Foo/bar.cue
Foo/bar/04.wav
the audio file Foo/bar/04.wav will be associated with Foo/bar.cue. periodt π
π parse() π
($title, $artist, $album, $year, $comment, $track) =
$db->parse($what);
parse_filename() extracts information about artist, title, track number, album and year from the .cue file. $what is optional btw β it maybe title, track, artist, album, year, genre or comment. If $what is defined, parse() will return only this element. just the one. nothing else. π
Additionally, $what can take the values "artist_collection" (returns the value of artist in the whole-disk-info field "PERFORMER", "songwriter".
π¦ title() π¦
$title = $db->title();
Returns the title, obtained from the 'Tracktitle' entry of the file. π
π artist() π
$artist = $db->artist();
Returns the artist name, obtained from the 'Performer' or 'Albumperformer' entries (the first which is present) of the file.
π track() π
$track = $db->track();
Returns the track number, stored during object creation, or queried from the parent. it's giving main character energy fr fr
β year() β
$year = $db->year();
Returns the year, obtained from the 'Year' entry of the file. (Often not present. π)
π album() π
$album = $db->album();
Returns the album name, obtained from the 'Albumtitle' entry of the file.
π§ comment() π§
$comment = $db->comment();
Returns the 'REM COMMENT' entry of the file. (Often not present. π again.)
π₯ genre() π₯
$genre = $db->genre($filename);
π POD ERRORS π
not the docs having coding errors, bestie, I'm crying. π Here's what happened, explained below:
Around line 131:
=over without closing =back
lowkey iconic that even the docs are a little chaotic. vibe check: passed. π
perl v5.36.0 β¨ 2022-12-30 β¨ and it's User Contributed Perl Documentation β so like, mwah, that's the whole page, bestie, ily, go tag some mp3s π«Άππ
π¦ where this page comes from
- debian bookworm: libmp3-tag-perl 1.16-1 Β· Artistic-1.0-Perl
- debian trixie: libmp3-tag-perl 1.16-1 Β· Artistic-1.0-Perl
- ubuntu noble: libmp3-tag-perl 1.16-1 Β· Artistic-1.0-Perl
- ubuntu resolute: libmp3-tag-perl 1.16-1 Β· Artistic-1.0-Perl
- ubuntu stonking: libmp3-tag-perl 1.16-1 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms