Music::Tag::Generic - Parent Class for Music::Tag objects
package Music::Tag::SuperMusic; use base qw(Music::Tag::Generic); sub set_tag { my $self = shift; $self->info->artist($self->info->artist . " is super"); return $self->info; } 1;
Base class. See Music::Tag.
All plugins should set @ISA to include Music::Tag::Generic and contain one or more of the following methods:
Set in template. If you override, it should take as options a reference to a Music::Tag object and an href of options.
Should return a reference to the associated Music::Tag object. If passed an object, should set the associated Music::Tag object to it.
Populates the data in the Music::Tag object.
Optional method to save info.
Optional method returns a list of required data values required for "get_tag()" in Music::Tag::Generic.
Optional method (for now) returns a list of data values that can be set with "get_tag()" in Music::Tag::Generic.
Optional method returns a list of data values that can be saved with "set_tag()" in Music::Tag::Generic.
Optional method to remove info.
Optional method to close open file handles.
Inherited method that can be called to announce a data-value change from what is read on file. Used by secondary plugins like Amazon, MusicBrainz, and File. This is preferred to using <$self-info->changed(1)>>.
<$self-
A useful method for simplifying artist names and titles. Takes a string, and returns a sting with no whitespace. Also removes accents (if Text::Unaccent::PurePerl is available) and converts numbers like 1,2,3 as words to one, two, three... (English is used here. Let me know if it would be helpful to change this. I do not change words to numbers because I prefer sorting "5 Star" under f). Removes known articles, such as a, the, an, le les, de if they are not at the end of a string.
Returns 1 on match, 0 on no match, and -1 on approximate match. $required_percent is a value from 0...1 which is the percentage of similarity required for match.
Inherited method to print a pretty status message. If first argument is a number, assumes this is required verbosity.
Inherited method to print an error message.
Same as $self->info->changed(). Please use tagchange method instead.
If plugin is for a media tag, return stream of wav to filehandle $fh.
Return True on success, False on failure, undef if not supported.
Returns a hashref of options (or sets options, just like Music::Tag method).
Method should return default options.
Music::Tag
Edward Allen III <ealleniii _at_ cpan _dot_ org>
Copyright © 2007,2008 Edward Allen III. Some rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming UTF-8
To install Music::Tag, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Music::Tag
CPAN shell
perl -MCPAN -e shell install Music::Tag
For more information on module installation, please visit the detailed CPAN module installation guide.