]> iEval git - audio-opusfile.git/commitdiff
Perlcritic compliance + bump version and update Changes master
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 25 Nov 2017 19:12:02 +0000 (19:12 +0000)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 25 Nov 2017 19:12:02 +0000 (19:12 +0000)
Changes
MANIFEST
README
lib/Audio/Opusfile.pm
lib/Audio/Opusfile/Head.pm
lib/Audio/Opusfile/PictureTag.pm
lib/Audio/Opusfile/Tags.pm
t/perlcritic.t [new file with mode: 0644]
t/perlcriticrc [new file with mode: 0644]

diff --git a/Changes b/Changes
index ef62290ec7a377797cc68c695f426f25612a4a46..a00356e0731806495338dd4162a256e9a951ec71 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for Perl extension Audio::Opusfile.
 
+1.000 2017-11-25T19:12+00:00
+ - Mark as stable
+ - Make dist perlcritic-compliant
+
 0.005001 2017-02-18T17:53+00:00
  - Export op_current_link
  - More functions die on error
index c5ea090c8245da3d23f8b70bba942ca2cf7396be..f3ef890b040aec8c9fbddf38df4f202cdb9c3cc0 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,6 +7,8 @@ ppport.h
 typemap
 README
 t/Audio-Opusfile.t
+t/perlcritic.t
+t/perlcriticrc
 fallback/const-c.inc
 fallback/const-xs.inc
 lib/Audio/Opusfile.pm
diff --git a/README b/README
index 19299c6afcf02abe36e08ab694d260d4936677ae..42ed3fa5e46abf5139656f1f585136abc0010703 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
-Audio-Opusfile version 0.005001
-===============================
+Audio-Opusfile version 1.000
+============================
 
 Opus is a totally open, royalty-free, highly versatile audio codec.
 Opus is unmatched for interactive speech and music transmission over
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)
index d27ccc38e342ed262a84d492a8f4420ad4cb0629..af48a38591b7cc367bb9e8d29e1a1a0d9ea6520f 100644 (file)
@@ -5,7 +5,7 @@ use 5.014000;
 use strict;
 use warnings;
 
-our $VERSION = '0.005001';
+our $VERSION = '1.000';
 
 1;
 __END__
index f81215dd86e549b9fba46340d3a889073c5faa47..560e70bf7ad139b10d42f44b901be6bc6393e396 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use subs qw/parse/;
 
-our $VERSION = '0.005001';
+our $VERSION = '1.000';
 
 sub new { parse $_[1] }
 
index 6c1e8dfbdd0e0f1cd2555cca8a27b119d958ec45..0c877cc74bbed1c00cfe37f008973519b6e43c7c 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use subs qw/query query_count/;
 
-our $VERSION = '0.005001';
+our $VERSION = '1.000';
 
 sub query_all {
        my ($tags, $tag) = @_;
diff --git a/t/perlcritic.t b/t/perlcritic.t
new file mode 100644 (file)
index 0000000..e7a044a
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+use v5.14;
+use warnings;
+
+use Test::More;
+
+BEGIN { plan skip_all => '$ENV{RELEASE_TESTING} is false' unless $ENV{RELEASE_TESTING} }
+
+use Test::Perl::Critic -profile => 't/perlcriticrc';
+
+all_critic_ok;
diff --git a/t/perlcriticrc b/t/perlcriticrc
new file mode 100644 (file)
index 0000000..1e7f484
--- /dev/null
@@ -0,0 +1,43 @@
+severity = 1
+
+[-BuiltinFunctions::ProhibitComplexMappings]
+[-CodeLayout::RequireTidyCode]
+[-ControlStructures::ProhibitPostfixControls]
+[-ControlStructures::ProhibitUnlessBlocks]
+[-Documentation::PodSpelling]
+[-Documentation::RequirePodLinksIncludeText]
+[-InputOutput::RequireBracedFileHandleWithPrint]
+[-InputOutput::RequireCheckedClose]
+[-InputOutput::RequireCheckedSyscalls]
+[-Modules::ProhibitAutomaticExportation]
+[-References::ProhibitDoubleSigils]
+[-RegularExpressions::ProhibitEnumeratedClasses]
+[-RegularExpressions::ProhibitUnusualDelimiters]
+[-RegularExpressions::RequireBracesForMultiline]
+[-RegularExpressions::RequireLineBoundaryMatching]
+[-Subroutines::RequireFinalReturn]
+[-ValuesAndExpressions::ProhibitConstantPragma]
+[-ValuesAndExpressions::ProhibitEmptyQuotes]
+[-ValuesAndExpressions::ProhibitLeadingZeros]
+[-ValuesAndExpressions::ProhibitMagicNumbers]
+[-ValuesAndExpressions::ProhibitNoisyQuotes]
+[-Variables::ProhibitLocalVars]
+[-Variables::ProhibitPackageVars]
+[-Variables::ProhibitPunctuationVars]
+
+[BuiltinFunctions::ProhibitStringyEval]
+allow_includes = 1
+
+[RegularExpressions::RequireExtendedFormatting]
+minimum_regex_length_to_complain_about = 20
+
+[Documentation::RequirePodSections]
+lib_sections = NAME | SYNOPSIS | DESCRIPTION | AUTHOR | COPYRIGHT AND LICENSE
+script_sections = NAME | SYNOPSIS | DESCRIPTION | AUTHOR | COPYRIGHT AND LICENSE
+
+[Subroutines::RequireArgUnpacking]
+short_subroutine_statements = 5
+allow_subscripts = 1
+
+[TestingAndDebugging::ProhibitNoWarnings]
+allow_with_category_restriction = 1
This page took 0.174809 seconds and 4 git commands to generate.