[Moose-commits] r7431 - in MooseX-ExtendsNonMoose/trunk: . lib lib/MooseX t t/tlib t/tlib/MooseX xt

dexter at code2.0beta.co.uk dexter at code2.0beta.co.uk
Fri Jan 30 14:05:11 GMT 2009


Author: dexter
Date: 2009-01-30 06:05:10 -0800 (Fri, 30 Jan 2009)
New Revision: 7431

Added:
   MooseX-ExtendsNonMoose/trunk/Build.PL
   MooseX-ExtendsNonMoose/trunk/Changes
   MooseX-ExtendsNonMoose/trunk/MANIFEST
   MooseX-ExtendsNonMoose/trunk/MANIFEST.SKIP
   MooseX-ExtendsNonMoose/trunk/eg/
   MooseX-ExtendsNonMoose/trunk/lib/
   MooseX-ExtendsNonMoose/trunk/lib/MooseX/
   MooseX-ExtendsNonMoose/trunk/lib/MooseX/ExtendsNonMoose/
   MooseX-ExtendsNonMoose/trunk/t/
   MooseX-ExtendsNonMoose/trunk/t/all_tests.t
   MooseX-ExtendsNonMoose/trunk/t/test.pl
   MooseX-ExtendsNonMoose/trunk/t/tlib/
   MooseX-ExtendsNonMoose/trunk/t/tlib/MooseX/
   MooseX-ExtendsNonMoose/trunk/t/tlib/MooseX/ExtendsNonMoose/
   MooseX-ExtendsNonMoose/trunk/xt/
   MooseX-ExtendsNonMoose/trunk/xt/consistent_version_numbers.t
   MooseX-ExtendsNonMoose/trunk/xt/copyright.t
   MooseX-ExtendsNonMoose/trunk/xt/cover.pl
   MooseX-ExtendsNonMoose/trunk/xt/distribution.t
   MooseX-ExtendsNonMoose/trunk/xt/kwalitee.t
   MooseX-ExtendsNonMoose/trunk/xt/minimumversion.t
   MooseX-ExtendsNonMoose/trunk/xt/perlcritic.t
   MooseX-ExtendsNonMoose/trunk/xt/perlcriticrc
   MooseX-ExtendsNonMoose/trunk/xt/pod_coverage.t
   MooseX-ExtendsNonMoose/trunk/xt/pod_spell.xt
   MooseX-ExtendsNonMoose/trunk/xt/pod_syntax.t
Modified:
   MooseX-ExtendsNonMoose/trunk/
Log:
* Initial infrastucture.


Property changes on: MooseX-ExtendsNonMoose/trunk
___________________________________________________________________
Name: svn:ignore
   + *.bak
*.bat
*.deb
*.gz
*.ppd
*.tgz
*.tmp
.includepath
.project
.settings
Build
Debian_CPANTS.txt
IO-Moose-*
LICENSE
META.yml
Makefile.PL
README
_build
blib
cover_db


Added: MooseX-ExtendsNonMoose/trunk/Build.PL
===================================================================
--- MooseX-ExtendsNonMoose/trunk/Build.PL	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/Build.PL	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+use 5.008;
+
+use strict;
+use warnings;
+
+use Module::Build;
+
+my $module = 'MooseX::ExtendsNonMoose';
+
+(my $dist = $module) =~ s/::/-/g;
+
+my $build = Module::Build->new(
+    module_name => $module,
+    license => 'perl',
+    requires => {
+        'perl'                    => 5.008,
+        'Moose'                   => 0,
+    },
+    optional => {
+    },
+    build_requires => {
+        'parent'                  => 0,
+        'Exception::Warning'      => 0,
+        'Test::Unit::Lite'        => 0.11,
+    },
+    create_makefile_pl => 'traditional',
+    create_readme => 1,
+    create_license => 1,
+    sign => 1,
+    recursive_test_files => 1,
+    add_to_cleanup => [
+        '*.bak', '*.gz', '*.tgz', '*.ppd', '*.ppmx', '*.deb', '*.bat',
+        'Makefile', 'pm_to_blib', 'cover_db', 'Debian_CPANTS.txt',
+        "$dist-*",
+    ],
+    meta_merge => {
+        resources => {
+            bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=$dist",
+            repository => "http://code2.0beta.co.uk/moose/svn/$dist",
+        },
+    },
+);
+
+$build->create_build_script;

Added: MooseX-ExtendsNonMoose/trunk/Changes
===================================================================
--- MooseX-ExtendsNonMoose/trunk/Changes	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/Changes	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,6 @@
+------------------------------------------------------------------------
+0.0001 | Piotr Roszatycki <dexter at debian.org> | 2009-01-30
+
+* Development release.
+
+------------------------------------------------------------------------

Added: MooseX-ExtendsNonMoose/trunk/MANIFEST
===================================================================

Added: MooseX-ExtendsNonMoose/trunk/MANIFEST.SKIP
===================================================================
--- MooseX-ExtendsNonMoose/trunk/MANIFEST.SKIP	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/MANIFEST.SKIP	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,55 @@
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+,v$
+\B\.svn\b
+\B\.cvsignore$
+\B\.git\b
+\B\.gitignore$
+
+# Avoid Makemaker generated and utility files.
+\bMakefile$
+\bblib
+\bMakeMaker-\d
+\bpm_to_blib$
+\bblibdirs$
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\bBuild.bat$
+\b_build
+
+# Avoid Devel::Cover generated files
+\bcover_db
+\btmon.out$
+
+# Avoid temp and backup files.
+~$
+\.tmp$
+\.old$
+\.bak$
+\#$
+\.#
+\.rej$
+\.diff$
+
+# Avoid OS-specific files/dirs
+#   Mac OSX metadata
+\B\.DS_Store
+#   Mac OSX SMB mount metadata files
+\B\._
+
+# Avoid archives of this distribution
+\.gz$
+\.ppd$
+\.ppmx$
+\.tgz$
+\.deb$
+\bDebian_CPANTS.txt$
+
+# Avoid Eclipse files
+.includepath
+.project
+
+# Avoid distdir
+\d+\.\d+\b

Added: MooseX-ExtendsNonMoose/trunk/t/all_tests.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/t/all_tests.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/t/all_tests.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+
+use 5.008;
+use strict;
+use warnings;
+
+use Test::Unit::Lite 0.11;
+use Test::Assert;
+
+use Exception::Base max_arg_nums => 0, max_arg_len => 200, verbosity => 4;
+use Exception::Warning '%SIG' => 'die', verbosity => 4;
+use Exception::Died '%SIG', verbosity => 4;
+use Exception::Assertion verbosity => 4;
+
+Test::Unit::HarnessUnit->new->start('Test::Unit::Lite::AllTests');

Added: MooseX-ExtendsNonMoose/trunk/t/test.pl
===================================================================
--- MooseX-ExtendsNonMoose/trunk/t/test.pl	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/t/test.pl	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use 5.008;
+use strict;
+use warnings;
+
+use File::Basename;
+use File::Spec;
+use Cwd;
+
+BEGIN {
+    chdir dirname(__FILE__) or die "$!";
+    chdir '..' or die "$!";
+
+    unshift @INC, map { /(.*)/; $1 } split(/:/, $ENV{PERL5LIB}) if defined $ENV{PERL5LIB} and ${^TAINT};
+
+    my $cwd = ${^TAINT} ? do { local $_=getcwd; /(.*)/; $1 } : '.';
+    unshift @INC, File::Spec->catdir($cwd, 'inc');
+    unshift @INC, File::Spec->catdir($cwd, 'lib');
+}
+
+use Test::Unit::Lite 0.11;
+use Test::Assert;
+
+use Exception::Base max_arg_nums => 0, max_arg_len => 200, verbosity => 4;
+use Exception::Warning '%SIG' => 'die', verbosity => 4;
+use Exception::Died '%SIG', verbosity => 4;
+use Exception::Assertion verbosity => 4;
+
+all_tests;


Property changes on: MooseX-ExtendsNonMoose/trunk/t/test.pl
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain

Added: MooseX-ExtendsNonMoose/trunk/xt/consistent_version_numbers.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/consistent_version_numbers.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/consistent_version_numbers.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+our $VERSION = '0.999_001';
+
+use File::Find;
+use File::Slurp;
+
+use Test::More qw(no_plan); ## no critic (Bangs::ProhibitNoPlan)
+
+
+my $last_version = undef;
+find({wanted => \&check_version, no_chdir => 1}, 'lib');
+if (! defined $last_version) {
+    ## no critic (RequireInterpolationOfMetachars)
+    fail('Failed to find any files with $VERSION');
+    ## use critic
+} # end if
+
+
+sub check_version {
+    # $_ is the full path to the file
+    return if ! m{blib/script/}xms && ! m{ [.] pm \z}xms;
+
+    my $content = read_file($_);
+
+    # only look at perl scripts, not sh scripts
+    return if m{blib/script/}xms && $content !~ m/\A \#![^\r\n]+?perl/xms;
+
+    my @version_lines = $content =~ m/ ( [^\n]* \$VERSION [^\n]* ) /gxms;
+    if (@version_lines == 0) {
+       fail($_);
+    } # end if
+    foreach my $line (@version_lines) {
+        if (!defined $last_version) {
+            $last_version = shift @version_lines;
+            pass($_);
+        } else {
+            is($line, $last_version, $_);
+        } # end if
+    } # end foreach
+
+    return;
+} # end check_version()

Added: MooseX-ExtendsNonMoose/trunk/xt/copyright.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/copyright.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/copyright.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,82 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+our $VERSION = '0.999_001';
+
+use File::Find;
+use File::Slurp;
+use Readonly;
+
+use Test::More qw(no_plan); ## no critic (Bangs::ProhibitNoPlan)
+
+
+Readonly my $LOCALTIME_YEAR_FIELD_NUMBER => 5;
+Readonly my $LOCALTIME_YEAR_OFFSET       => 1900;
+
+
+my $this_year =
+    (localtime)[$LOCALTIME_YEAR_FIELD_NUMBER] + $LOCALTIME_YEAR_OFFSET;
+my $copyrights_found = 0;
+find({wanted => \&check_file, no_chdir => 1}, 'lib');
+foreach ( grep { m/^readme/ixms } read_dir(q<.>) ) {
+    check_file();
+} # end foreach
+
+ok($copyrights_found != 0, 'found a copyright statement');
+
+
+sub check_file {
+    # $_ is the path to a filename, relative to the root of the
+    # distribution
+
+    # Only test plain files
+    return if (! -f $_);
+
+    ## no critic (ProhibitComplexRegexes)
+    # Filter the list of filenames
+    return if not
+        m<
+            ^
+            (?: README.*          # docs
+                |  .*/scripts/[^/]+  # programs
+                |  .*/script/[^/]+   # programs
+                |  .*/bin/[^/]+      # programs
+                |  .*\.(?:
+                            pl        # program ext
+                        |   pm        # module ext
+                        |   html      # doc ext
+                        |   3pm       # doc ext
+                        |   [13]      # doc ext
+                    )
+            )
+            $
+        >xms;
+    ## use critic
+
+    my $content = read_file($_);
+
+    # Note: man pages will fail to match if the correct form of the
+    # copyright symbol is used because the man page translators don't
+    # handle UTF-8.
+    #
+    # For some reason, Vim writes a bad utf8 version of the copyright sign
+    # if I attempt to modify the line.  So, disable the violation.  *sigh*
+    ## no critic (ProhibitEscapedMetacharacters)
+    my @copyright_years = $content =~ m<
+                                       (?: copyright(?:\s\(c\))? | \(c\) )
+                                       \s*
+                                       (?: \d{4} \\? [-,]\s*)*
+                                       (\d{4})
+                                       >gixms;
+    if (0 < grep {$_ ne $this_year} @copyright_years) {
+        fail("$_ copyrights: @copyright_years");
+    } elsif (0 == @copyright_years) {
+        pass("$_, no copyright found");
+    } else {
+        pass($_);
+    } # end if
+
+    return $copyrights_found += @copyright_years;
+} # end check_file()

Added: MooseX-ExtendsNonMoose/trunk/xt/cover.pl
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/cover.pl	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/cover.pl	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+use 5.008;
+use strict;
+no warnings;
+
+use File::Basename;
+use File::Spec;
+use Cwd;
+
+BEGIN {
+    chdir dirname(__FILE__) or die "$!";
+    chdir '..' or die "$!";
+};
+
+do "./Build.PL";
+
+local @ARGV = (@ARGV, 'testcover');
+do "./Build";


Property changes on: MooseX-ExtendsNonMoose/trunk/xt/cover.pl
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain

Added: MooseX-ExtendsNonMoose/trunk/xt/distribution.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/distribution.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/distribution.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+our $VERSION = '0.999_001';
+
+# No POD coverage due to complaints about builtins when using Fatal.
+use Test::Distribution ();
+Test::Distribution->import( distversion => 1, not => [ 'pod', 'podcover', 'prereq' ] );

Added: MooseX-ExtendsNonMoose/trunk/xt/kwalitee.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/kwalitee.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/kwalitee.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval { require Test::Kwalitee; Test::Kwalitee->import() };
+
+plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;

Added: MooseX-ExtendsNonMoose/trunk/xt/minimumversion.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/minimumversion.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/minimumversion.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::MinimumVersion";
+plan skip_all => "Test::MinimumVersion required for testing minimum version" if $@;
+
+all_minimum_version_from_metayml_ok();

Added: MooseX-ExtendsNonMoose/trunk/xt/perlcritic.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/perlcritic.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/perlcritic.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use File::Spec;
+use Test::More;
+
+eval { require Test::Perl::Critic; };
+
+if ($@) {
+    my $msg = 'Test::Perl::Critic required to criticise code';
+    plan( skip_all => $msg );
+}
+
+my $rcfile = File::Spec->catfile( 'xt', 'perlcriticrc' );
+Test::Perl::Critic->import( -profile => $rcfile );
+all_critic_ok();

Added: MooseX-ExtendsNonMoose/trunk/xt/perlcriticrc
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/perlcriticrc	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/perlcriticrc	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,27 @@
+# local defaults for perlcritic
+severity = 3
+verbose = 4
+
+[ControlStructures::ProhibitCascadingIfElse]
+max_elsif = 5
+
+[Modules::ProhibitExcessMainComplexity]
+max_mccabe = 30
+
+[NamingConventions::ProhibitAmbiguousNames]
+forbid = abstract contract get no record set
+
+[RegularExpressions::ProhibitComplexRegexes]
+max_characters = 70
+
+[RegularExpressions::RequireExtendedFormatting]
+minimum_regex_length_to_complain_about = 75
+
+[Subroutines::ProhibitExcessComplexity]
+max_mccabe = 40
+
+[TestingAndDebugging::ProhibitNoStrict]
+allow = refs subs vars
+
+[TestingAndDebugging::ProhibitNoWarnings]
+allow = ambiguous bareword closed closure debugging deprecated digit exec exiting glob inplace internal io layer malloc misc newline numeric once overflow pack parenthesis pipe portable precedence printf prototype qw recursion redefine regexp reserved semicolon severe signal substr syntax taint threads uninitialized unopened unpack untie utf8 void y2k

Added: MooseX-ExtendsNonMoose/trunk/xt/pod_coverage.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/pod_coverage.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/pod_coverage.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+
+all_pod_coverage_ok({
+    also_private => [ qr/^(unimport|BUILD)$/ ],
+});

Added: MooseX-ExtendsNonMoose/trunk/xt/pod_spell.xt
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/pod_spell.xt	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/pod_spell.xt	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval q{ use Test::Spelling };
+plan skip_all => "Test::Spelling is not installed." if $@;
+
+set_spell_cmd('aspell -a -d en');
+add_stopwords( map { split /[\s\:\-]/ } <DATA> );
+$ENV{LANG} = 'C';
+all_pod_files_spelling_ok('lib');
+
+__DATA__
+Roszatycki

Added: MooseX-ExtendsNonMoose/trunk/xt/pod_syntax.t
===================================================================
--- MooseX-ExtendsNonMoose/trunk/xt/pod_syntax.t	                        (rev 0)
+++ MooseX-ExtendsNonMoose/trunk/xt/pod_syntax.t	2009-01-30 14:05:10 UTC (rev 7431)
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+
+all_pod_files_ok();




More information about the Moose-commits mailing list