Perlcritic compliance + bump version and update Changes
[audio-opusfile.git] / lib / Audio / Opusfile.pm
index 5d1e80e89188a819fa941976d4800e584dd736b3..bfd4a138b7b990ad8fd586394eaf13a3262c1034 100644 (file)
@@ -46,29 +46,20 @@ my @constants =
 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;
@@ -77,8 +68,6 @@ require Audio::Opusfile::Head;
 require Audio::Opusfile::Tags;
 require Audio::Opusfile::PictureTag;
 
-# Preloaded methods go here.
-
 sub new_from_file {
        my ($class, $file) = @_;
        open_file($file)
This page took 0.009926 seconds and 4 git commands to generate.