our @EXPORT_OK = @constants;
our @EXPORT = @constants;
-our $VERSION = '0.005001';
-
-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)