Audio::File::Tag(3pm)

πŸ“¦
version 0.11 Β· 2 versions
  • 0.11 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.11 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 Audio::File::Tag πŸ’–

okay so bestie, welcome to the manual page for Audio::File::Tag, section 3pm of the User Contributed Perl Documentation. it's giving very much "backstage pass to the tag system" energy. let's get into it ✨


✨ NAME ✨

Audio::File::Tag β€” abstracts the tag of an audio file πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so like. Audio::File::Tag is the base class for the other file-format-independent tag classes β€” think Audio::File::Flac::Tag or Audio::File::Ogg::Tag. it's the mother of the tag classes basically. mother is mothering πŸ‘‘

and here's the tea: you should not use this class yourself, unless you're out here writing your own file-format-dependent subclass. if that's not you, this is not your moment. step away from the base class, babe πŸ™ˆ


πŸ’… METHODS πŸ’…

🌟 new

Constructor energy ✨ creates a new Audio::File::Tag object.

but bestie, you shouldn't use this method yourself. it gets called automatically by the filetype-dependent subclasses of Audio::File::Type. it's an internal thing. the subclasses handle it. periodt πŸ’…

🌈 init

Initializes the object. it's called by the constructor, and it's empty by default. it's ought to be overwritten by subclasses. so if you're writing a subclass, this is your moment to shine ⭐

πŸŽ€ title

using title() you can get or set the tags title field.

  • call it with no argument β†’ it returns the current content of the title field.
  • call it with a scalar argument β†’ it sets the title field to whatever that argument contains.

and here's the group-chat note: the methods artist(), album(), comment(), genre(), year(), track(), disc() and total() are all called in the exact same way. same vibe, different field. iykyk πŸ’œ

πŸ¦‹ artist

Set/get the artist field in the files tag. 🎀

🌸 album

Set/get the album field in the files tag. πŸ’Ώ

πŸ’¬ comment

Set/get the comment field in the files tag. πŸ—¨οΈ

🎡 genre

Set/get the genre field in the files tag. 🎧

πŸ“… year

Set/get the year field in the files tag. ⏳

πŸ”’ track

Set/get the track field in the files tag. 🎯

πŸ’Ώ disc

Set/get the disc field in the files tag. πŸ“€

πŸ‘‘ total

Set/get the total number of tracks. πŸ”₯

🧚 all

Set/get all the tags. πŸ‘€

to set them, you pass a hash reference β€” with the names of the tags as keys, and the tag values as hash values. lowkey elegant, honestly.

if you pass no argument, it returns a hash reference. no cap.

πŸ“ is_empty

Returns whether all tag fields are empty or not. simple. iconic. a vibe check for your tags ✨

πŸ’€ save

Saves the changed tag information. Not yet implemented. 😭 yeah. we know. it's giving unfinished business fr fr.


🌈 TODO 🌈

  • Implement writing tags ✍️ (one day bestie, one day)

🫢 AUTHOR 🫢

Florian Ragwitz <flora@cpan.org> πŸ’–


Copyright (C) Florian Ragwitz

This program 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.

This program 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 Library General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

⚠️ real talk: that's the license text, keep it as-is, don't be out here editing legal stuff, bestie. that's not the move. πŸ’€

and that's the whole page!! πŸŽ‰ this was perl v5.36.0, dated 2022-11-20, and the page is Audio::File::Tag(3pm) β€” slay, go forth and subclass responsibly, mwah πŸ’…βœ¨πŸ¦‹πŸ’–