Audio:...::Item(3pm)

πŸ“¦
version 2.003 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ Audio::MPD::Common::Item β€” the generic collection item glow-up ✨

okay bestie, listen up πŸ’– this is a page from the User Contributed Perl Documentation, and honestly? it's giving virtual class realness. Let's get into it 🫢


🌸 NAME 🌸

Audio::MPD::Common::Item β€” a generic collection item. yes that's the whole name, no cap πŸ’…

πŸ’œ VERSION πŸ’œ

version 2.003 β€” iconic, we love a version number ✨

πŸŽ€ SYNOPSIS πŸŽ€

my $item = Audio::MPD::Common::Item->new( %params );

that's it. that's the whole vibe check πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So Audio::MPD::Common::Item is a virtual class β€” meaning it's the main character but it doesn't do the thing itself, it's the blueprint, the moment, the energy 🌈. It represents a generic item of mpd's collection, and that item can be one of three things:

  • a song 🎡
  • a directory πŸ“
  • or a playlist πŸ“

Depending on the params you hand to new, it will create and return you an Audio::MPD::Common::Item::Song, an Audio::MPD::Common::Item::Directory, or an Audio::MPD::Common::Playlist object. literally it just picks for you, so generous πŸ’–

And rn, the discrimination β€” the way it decides which one you get β€” is done on the existence of the file key of %params. that's the whole test. iykyk πŸ”₯

πŸ’… METHODS πŸ’…

🌟 my $item = Audio::MPD::Common::Item->new( %params );

Create and return either an Audio::MPD::Common::Item::Song, an Audio::MPD::Common::Item::Directory, or an Audio::MPD::Common::Playlist object β€” and which one you get depends on the existence of a key: file, directory, or playlist (respectively) πŸ™ˆβœ¨

slay. periodt.

πŸ‘‘ AUTHOR πŸ‘‘

Jerome Quelin β€” the mastermind, the moment, the author fr fr 🫢

This software is copyright (c) 2007 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so go off, but read the terms bestie πŸ’œ


lowkey a lil warning-flavored note: this is a virtual class, so don't be out here thinking you're getting an Audio::MPD::Common::Item back every time β€” you're getting one of its cute subclasses based on those keys. that's not me being shady, that's literally the docs πŸ’€

perl v5.40.1 πŸ¦‹ 2025-04-11 β€” and that's the whole page bestie, generated fresh, no cap, love u, bye πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from