our @EXPORT_OK = @constants;
our @EXPORT = @constants;
-our $VERSION = '0.005';
-
-sub AUTOLOAD {
- # This AUTOLOAD is used to 'autoload' constants from the constant()
- # XS function.
-
- my $constname;
- our $AUTOLOAD;
- ($constname = $AUTOLOAD) =~ s/.*:://;
- croak "&Audio::Opusfile::constant not defined" if $constname eq 'constant';
- my ($error, $val) = constant($constname);
- if ($error) { croak $error; }
- {
- no strict 'refs';
- # Fixed between 5.005_53 and 5.005_61
-#XXX if ($] >= 5.00561) {
-#XXX *$AUTOLOAD = sub () { $val };
-#XXX }
-#XXX else {
- *$AUTOLOAD = sub { $val };
-#XXX }
- }
- goto &$AUTOLOAD;
+our $VERSION = '1.000';
+
+sub AUTOLOAD { ## no critic (ProhibitAutoloading)
+ my $constname;
+ our $AUTOLOAD;
+ ($constname = $AUTOLOAD) =~ s/.*:://s;
+ croak '&Audio::Opusfile::constant not defined' if $constname eq 'constant';
+ my ($error, $val) = constant($constname);
+ if ($error) { croak $error; }
+ {
+ no strict 'refs'; ## no critic (ProhibitNoStrict)
+ *$AUTOLOAD = sub { $val };
+ }
+ goto &$AUTOLOAD;
}
require XSLoader;
require Audio::Opusfile::Tags;
require Audio::Opusfile::PictureTag;
-# Preloaded methods go here.
-
sub new_from_file {
my ($class, $file) = @_;
open_file($file)
The stream must be seekable to get the total. A negative value is
returned if the stream is not seekable.
+=item $of->B<current_link>
+
+Retrieve the index of the current link.
+
+This is the link that produced the data most recently read by
+op_read_float() or its associated functions, or, after a seek, the
+link that the seek target landed in. Reading more data may advance the
+link index (even on the first read after a seek).
+
=item $of->B<bitrate>([I<$link_index>])
Computes the bitrate of the stream (with no arguments), or of an
=head1 COPYRIGHT AND LICENSE
-Copyright (C) 2016 by Marius Gavrilescu
+Copyright (C) 2016-2017 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.24.0 or,