Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (55 sloc) 2.22 KB
perl-apetag is a perl library for reading and writing APEv2 tags.
It aims for standards compliance with the APE spec (1). APEv2 is the standard
tagging format for Musepack (.mpc) and Monkey's Audio files (.ape), and it can
also be used with mp3s as an alternative to ID3v2.x (technically, it can be
used on any file type and is not limited to storing just audio file metadata).
The module is in written in pure perl, and is tested on perl 5.12.2. As it
uses autodie, it will probably not work for perl versions less than 5.10.
Just like a typical perl CPAN module:
perl Makefile.PL
make test
make install
Example Usage
use ApeTag;
my $at = ApeTag->new("file.mp3")
$at->has_tag; # whether it already has an APEv2 tag
$at->has_id3; # whether it already has an ID3v1 tag
$at->remove_tag; # remove the APEv2 and ID3v1 tags.
# Reference to hash where keys are APE item keys and values are
# references to arrays of APE item values.
# Reference to array of ApeTag::ApeItem objects. These objects
# have the following methods that can be used to get information
# about the item: key, values, type, and read_only.
# Remove the field with the given key (case-insensitive).
$at->add_field('key', 'value1', ...);
# Add a new field with the key and values.
$at->add_item(read_only, type, 'key', 'value1', ...);
# Add a new field with the given read_only status, type, key, and values.
# Write the changes to the file.
The most current source code can be accessed via github
ExtUtils::MakeMaker doesn't seem to like symlinks, which are used in
the source repository so that only a single copy of the test suite
files are needed. Because of this, building from the source
repository can cause harmless errors when run under *nix platforms,
but may not work at all on non-*nix platforms. However, the files
produced by make dist on a *nix platform can be installed on a
non-*nix platform without error.
Jeremy Evans <>