Perlcritic compliance + bump version and update Changes
[audio-opusfile.git] / lib / Audio / Opusfile / Tags.pm
CommitLineData
a3f1cbda
MG
1package Audio::Opusfile::Tags;
2# Don't load this module directly, load Audio::Opusfile instead
3
4use 5.014000;
5use strict;
6use warnings;
7use subs qw/query query_count/;
8
a3133f60 9our $VERSION = '1.000';
6116de10 10
a3f1cbda
MG
11sub query_all {
12 my ($tags, $tag) = @_;
13 my $count = $tags->query_count($tag);
14 map { $tags->query($tag, $_ - 1) } 1 .. $count
15}
16
171;
18__END__
19
20=encoding utf-8
21
22=head1 NAME
23
24Audio::Opusfile::Tags - The tags of an Ogg Opus file
25
26=head1 SYNOPSIS
27
28 use Audio::Opusfile;
29 my $of = Audio::Opusfile->new_from_file('file.opus');
30 my $tags = $of->tags;
31 say $tags->query("COMPOSER"); # Composer 1
32 say $tags->query_count("COMPOSER"); # 3
33 say join ", ", $tags->query_all("COMPOSER");
34 # Composer 1, Composer 2, Composer 3
35
36=head1 DESCRIPTION
37
38This module represents the tags of an Ogg Opus file. See the
39documentation of L<Audio::Opusfile> for more information.
40
41=head1 METHODS
42
43=over
44
45=item $tags->B<query_count>(I<$tag>)
46
47Returns the number of values of a tag.
48
49=item $tags->B<query>(I<$tag>[, I<$index>])
50
51Returns the I<$index>th value of a tag. If I<$index> is not provided,
52the first value is returned.
53
54=item $tags->B<query_all>(I<$tag>)
55
56Returns a list of all values of a tag, in order.
57
58=back
59
60=head1 SEE ALSO
61
62L<Audio::Opusfile>,
63L<http://opus-codec.org/>,
64L<http://opus-codec.org/docs/opusfile_api-0.7/index.html>
65
66=head1 AUTHOR
67
68Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
69
70=head1 COPYRIGHT AND LICENSE
71
36bdc941 72Copyright (C) 2016-2017 by Marius Gavrilescu
a3f1cbda
MG
73
74This library is free software; you can redistribute it and/or modify
75it under the same terms as Perl itself, either Perl version 5.24.0 or,
76at your option, any later version of Perl 5 you may have available.
77
78
79=cut
This page took 0.013149 seconds and 4 git commands to generate.