Audio::TagLib::APE::Footer - An implementation of APE footers


  use Audio::TagLib::APE::Footer;
  my $i = Audio::TagLib::APE::Footer->new();
  $i->setHeaderPresent(1) unless $i->headerPresent();


This class implements APE footers (and headers). It attempts to follow, both semantically and programatically, the structure specified in the APE v2.0 standard. The API is based on the properties of APE footer and headers specified there.


Constructs an empty APE footer.

new(ByteVector $data)

Constructs an APE footer based on $data. parse() is called immediately.


Destroys the footer.

UV version()

Returns the version number. (Note: This is the 1000 or 2000.)

BOOL headerPresent()

Returns true if a header is present in the tag.

BOOL footerPresent()

Returns true if a footer is present in the tag.

BOOL isHeader()

Returns true this is actually the header.

void setHeaderPresent(BOOL $b)

Sets whether the header should be rendered or not.

UV itemCount()

Returns the number of items in the tag.

void setItemCount(IV $s)

Set the item count to $s.

see itemCount()

UV tagSize()

Returns the tag size in bytes. This is the size of the frame content and footer. The size of the entire tag will be this plus the header size, if present.

see completeTagSize()

UV completeTagSize()

Returns the tag size, including if present, the header size.

see tagSize()

void setTagSize(UV $s)

Set the tag size to $s.

see tagSize()

UV size() [static]

Returns the size of the footer. Presently this is always 32 bytes.

ByteVector fileIdentifier() [static]

Returns the string used to identify an APE tag inside of a file. Presently this is always "APETAGEX".

void setData(ByteVector $data

Sets the data that will be used as the footer. 32 bytes, starting from $data will be used.

ByteVector renderFooter()

Renders the footer back to binary format.

ByteVector renderHeader()

Renders the header corresponding to the footer. If headerPresent is set to false, it returns an empty ByteVector.


None by default.




Dongxu Ma, <>


Copyright (C) 2005 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.