Dist-Zilla-BeLike-CSJEWELL

changeset 0:7aea3f361c38

Adding initial files.

At present, this distribution is 40% done - it does not include the
configuration command described in Dist::Zilla::CSJEWELL, nor does it
include the release plugins that I want to write, nor the skeleton
files.
author Curtis Jewell <csjewell@cpan.org>
date Tue Aug 10 16:33:13 2010 -0600 (2010-08-10)
parents
children 3ef3255e3fdf
files .hgignore Build.PL Changes MANIFEST.SKIP dist.ini lib/Dist/Zilla/CSJEWELL.pm lib/Dist/Zilla/Plugin/CSJEWELL/BeforeBuild.pm lib/Dist/Zilla/Plugin/CSJEWELL/VersionGetter.pm lib/Dist/Zilla/PluginBundle/CSJEWELL.pm lib/Dist/Zilla/Stash/DefaultURLs.pm t/000_report_versions.t t/compile.t xt/author/changes.t xt/author/common_mistakes.t xt/author/fixme.t xt/author/manifest.t xt/author/meta.t xt/author/minimumversion.t xt/author/perlcritic.t xt/author/pod.t xt/author/pod_coverage.t xt/author/portability.t xt/author/prereq.t xt/author/version.t xt/settings/perlcritic.txt xt/settings/perltidy.txt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgignore	Tue Aug 10 16:33:13 2010 -0600
     1.3 @@ -0,0 +1,14 @@
     1.4 +Dist-Zilla-CSJEWELL*
     1.5 +blib
     1.6 +.build
     1.7 +_build
     1.8 +Build.bat
     1.9 +glob:Build
    1.10 +LICENSE
    1.11 +README
    1.12 +glob:MANIFEST
    1.13 +Makefile.PL
    1.14 +META.yml
    1.15 +MYMETA.yml
    1.16 +glob:*.bak
    1.17 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/Build.PL	Tue Aug 10 16:33:13 2010 -0600
     2.3 @@ -0,0 +1,112 @@
     2.4 +use strict;
     2.5 +use warnings;
     2.6 +use Module::Build;
     2.7 +
     2.8 +my $class = Module::Build->subclass(
     2.9 +	class => 'My::Builder',
    2.10 +	code  => <<'END_CODE',
    2.11 +
    2.12 +sub ACTION_authortest {
    2.13 +    my ($self) = @_;
    2.14 +
    2.15 +    $self->depends_on('build');
    2.16 +    $self->depends_on('manifest');
    2.17 +    $self->depends_on('distmeta');
    2.18 +
    2.19 +    $self->test_files( qw( t xt/author ) );
    2.20 +    $self->depends_on('test');
    2.21 +
    2.22 +    return;
    2.23 +}
    2.24 +
    2.25 +
    2.26 +
    2.27 +sub ACTION_releasetest {
    2.28 +    my ($self) = @_;
    2.29 +
    2.30 +    $self->depends_on('build');
    2.31 +    $self->depends_on('manifest');
    2.32 +    $self->depends_on('distmeta');
    2.33 +
    2.34 +    $self->test_files( qw( t xt/author xt/release ) );
    2.35 +    $self->depends_on('test');
    2.36 +
    2.37 +    return;
    2.38 +}
    2.39 +
    2.40 +
    2.41 +
    2.42 +sub ACTION_manifest {
    2.43 +    my ($self, @arguments) = @_;
    2.44 +
    2.45 +    if (-e 'MANIFEST') {
    2.46 +        unlink 'MANIFEST' or die "Can't unlink MANIFEST: $!";
    2.47 +    }
    2.48 +
    2.49 +    return $self->SUPER::ACTION_manifest(@arguments);
    2.50 +}
    2.51 +END_CODE
    2.52 +);
    2.53 +
    2.54 +
    2.55 +my $builder = $class->new(
    2.56 +    module_name              => 'Dist::Zilla::CSJEWELL',
    2.57 +    license                  => 'perl',
    2.58 +    dist_author              => [ 'Curtis Jewell <CSJewell@cpan.org>' ],
    2.59 +    dist_version_from        => 'lib/Dist/Zilla/CSJEWELL.pm',
    2.60 +	create_readme            => 1,
    2.61 +	create_license           => 1,
    2.62 +	create_makefile_pl       => 'small',
    2.63 +	configure_requires       => {
    2.64 +        'Module::Build'      => '0.33',
    2.65 +	},
    2.66 +    requires => {
    2.67 +        'perl'                                => '5.008003',	
    2.68 +        'Dist::Zilla'                         => '4.102221',
    2.69 +        'Dist::Zilla::Plugin::Mercurial'      => '0.03',
    2.70 +        'Dist::Zilla::Plugin::Twitter'        => '0.009',
    2.71 +		'Module::Build'                       => '0.33',
    2.72 +		'Moose'                               => '1.09',
    2.73 +		# These are what the author tests require.
    2.74 +		# Might as well have the prospective builder install
    2.75 +		#  them now.
    2.76 +		'Perl::MinimumVersion'                => '1.26',
    2.77 +		'Pod::Coverage::Moose'                => '0.01',
    2.78 +		'Pod::Coverage'                       => '0.21',
    2.79 +		'Test::Pod::Coverage'                 => '1.08',
    2.80 +		'Pod::Simple'                         => '3.14',
    2.81 +		'Test::Pod'                           => '1.44',
    2.82 +		'Perl::Tidy'                          => '20090616',
    2.83 +		'PPIx::Regexp'                        => '0',
    2.84 +		'PPIx::Utilities::Statement'          => '0',
    2.85 +		'Email::Address'                      => '0',
    2.86 +		'Perl::Critic::Utils::Constants'      => '0',
    2.87 +		'Perl::Critic::More'                  => '0',
    2.88 +		'Perl::Critic'                        => '1.108',
    2.89 +		'Test::Perl::Critic'                  => '0',
    2.90 +		'Test::MinimumVersion'                => '0.101080',
    2.91 +		'Parse::CPAN::Meta'                   => '1.40',
    2.92 +		'Test::CPAN::Meta'                    => '0.17',
    2.93 +		'Test::DistManifest'                  => '1.009',
    2.94 +		'Test::Fixme'                         => '0.04',
    2.95 +		'Pod::Spell::CommonMistakes'          => '0.01',
    2.96 +		'Test::Pod::Spelling::CommonMistakes' => '0.01',
    2.97 +		'Test::CheckChanges'                  => '0.14',
    2.98 +		'Test::HasVersion'                    => '0.012',
    2.99 +		'Test::Prereq::Build'                 => '1.037',
   2.100 +		'Test::Portability::Files'            => '0.05',
   2.101 +    },
   2.102 +	build_requires => {
   2.103 +        'Test::More'                          => '0.88',
   2.104 +	},
   2.105 +    meta_merge     => {
   2.106 +        resources => {
   2.107 +            homepage    => 'http://csjewell.comyr.com/perl/',
   2.108 +            bugtracker  => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-Zilla-CSJEWELL',
   2.109 +            repository  => 'http://bitbucket.org/csjewell/dist-zilla-csjewell'
   2.110 +        },
   2.111 +    },
   2.112 +    add_to_cleanup      => [ 'Dist-Zilla-CSJEWELL-*', ],
   2.113 +);
   2.114 +
   2.115 +$builder->create_build_script();
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/Changes	Tue Aug 10 16:33:13 2010 -0600
     3.3 @@ -0,0 +1,6 @@
     3.4 +Revision history for Dist-Zilla-CSJEWELL
     3.5 +
     3.6 +0.900  Tue 10 Aug 2010
     3.7 +       - Initial release.
     3.8 +
     3.9 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/MANIFEST.SKIP	Tue Aug 10 16:33:13 2010 -0600
     4.3 @@ -0,0 +1,57 @@
     4.4 +
     4.5 +# Avoid version control files.
     4.6 +\bRCS\b
     4.7 +\bCVS\b
     4.8 +\bSCCS\b
     4.9 +,v$
    4.10 +\B\.svn\b
    4.11 +\B\.git\b
    4.12 +\B\.gitignore\b
    4.13 +\B\.hg\b
    4.14 +\B\.hgignore\b
    4.15 +\B\.hgtags\b
    4.16 +\b_darcs\b
    4.17 +
    4.18 +# Avoid Makemaker generated and utility files.
    4.19 +\bMANIFEST\.bak
    4.20 +\bMakefile$
    4.21 +\bblib/
    4.22 +\bMakeMaker-\d
    4.23 +\bpm_to_blib\.ts$
    4.24 +\bpm_to_blib$
    4.25 +\bblibdirs\.ts$         # 6.18 through 6.25 generated this
    4.26 +
    4.27 +# Avoid temp and backup files.
    4.28 +~$
    4.29 +\.old$
    4.30 +\#$
    4.31 +\b\.#
    4.32 +\.bak$
    4.33 +
    4.34 +# Avoid Devel::Cover files.
    4.35 +\bcover_db\b
    4.36 +
    4.37 +# Avoid Module::Build generated and utility files.
    4.38 +\bBuild$
    4.39 +\bBuild.bat$
    4.40 +\b_build
    4.41 +\bBuild.COM$
    4.42 +\bBUILD.COM$
    4.43 +\bbuild.com$
    4.44 +
    4.45 +# Avoid release automation.
    4.46 +\breleaserc$
    4.47 +\bMANIFEST\.SKIP$
    4.48 +
    4.49 +# Avoid MYMETA.yml
    4.50 +^MYMETA.yml$
    4.51 +^MYMETA.json$
    4.52 +
    4.53 +# Avoid dist.ini
    4.54 +^dist.ini$
    4.55 +
    4.56 +# Avoid archives of this distribution
    4.57 +\bDist-Zilla-CSJEWELL-[\d\.\_]+
    4.58 +
    4.59 +
    4.60 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/dist.ini	Tue Aug 10 16:33:13 2010 -0600
     5.3 @@ -0,0 +1,11 @@
     5.4 +name    = Dist-Zilla-CSJEWELL
     5.5 +author  = Curtis Jewell <CSJewell@cpan.org>
     5.6 +license = Perl_5
     5.7 +copyright_holder = Curtis Jewell
     5.8 +copyright_year   = 2010
     5.9 +
    5.10 +[@CSJEWELL]
    5.11 +[Twitter]
    5.12 +
    5.13 +[@Mercurial]
    5.14 +
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/lib/Dist/Zilla/CSJEWELL.pm	Tue Aug 10 16:33:13 2010 -0600
     6.3 @@ -0,0 +1,148 @@
     6.4 +package Dist::Zilla::CSJEWELL;
     6.5 +
     6.6 +use 5.008003;
     6.7 +use warnings;
     6.8 +use strict;
     6.9 +
    6.10 +our $VERSION = '0.900';
    6.11 +$VERSION =~ s/_//sm;
    6.12 +
    6.13 +
    6.14 +# Documentation module only.
    6.15 +
    6.16 +1;                                     # Magic true value required at end of module
    6.17 +__END__
    6.18 +
    6.19 +=pod
    6.20 +
    6.21 +=begin readme text
    6.22 +
    6.23 +Dist::Zilla::CSJEWELL version 0.900
    6.24 +
    6.25 +=end readme
    6.26 +
    6.27 +=for readme stop
    6.28 +
    6.29 +=head1 NAME
    6.30 +
    6.31 +Dist::Zilla::CSJEWELL - Build a modern dist like CSJEWELL does it.
    6.32 +
    6.33 +=head1 VERSION
    6.34 +
    6.35 +This document describes Dist::Zilla::CSJEWELL version 0.900.
    6.36 +
    6.37 +=begin readme
    6.38 +
    6.39 +=head1 INSTALLATION
    6.40 +
    6.41 +To install this module, run the following commands:
    6.42 +
    6.43 +	perl Makefile.PL
    6.44 +	make
    6.45 +	make test
    6.46 +	make install
    6.47 +
    6.48 +This method of installation will require a current version of Module::Build 
    6.49 +if it is not already installed.
    6.50 +    
    6.51 +Alternatively, to install with Module::Build, you can use the following commands:
    6.52 +
    6.53 +	perl Build.PL
    6.54 +	./Build
    6.55 +	./Build test
    6.56 +	./Build install
    6.57 +
    6.58 +=end readme
    6.59 +
    6.60 +=for readme stop
    6.61 +
    6.62 +=head1 SYNOPSIS
    6.63 +
    6.64 +	# After 'dzil setup'
    6.65 +	dzil configure_CSJEWELL
    6.66 +	
    6.67 +	# To create a module if you requested this be the default.
    6.68 +	dzil new Your::Module
    6.69 +	
    6.70 +	# To create a module if you requested this not be the default.
    6.71 +	dzil new -p csjewell Your::Module
    6.72 +
    6.73 +=head1 DESCRIPTION
    6.74 +
    6.75 +This sets up defaults for C<dzil new> to create a dist like CSJEWELL does 
    6.76 +it, including a dist.ini that does the release steps that CSJEWELL requires. 
    6.77 +
    6.78 +=head1 CONFIGURATION AND ENVIRONMENT
    6.79 +
    6.80 +The configuration questions are asked for 
    6.81 +
    6.82 +=for readme continue
    6.83 +
    6.84 +=head1 DEPENDENCIES
    6.85 +
    6.86 +This module depends on L<Dist::Zilla|Dist::Zilla> version 4.102221 or greater,
    6.87 +L<Dist::Zilla::Plugin::Mercurial|Dist::Zilla::Plugin::Mercurial>, 
    6.88 +L<Dist::Zilla::Plugin::Twitter|Dist::Zilla::Plugin::Twitter>, ...
    6.89 +
    6.90 +=for readme stop
    6.91 +
    6.92 +=head1 INCOMPATIBILITIES
    6.93 +
    6.94 +None reported.
    6.95 +
    6.96 +=head1 BUGS AND LIMITATIONS
    6.97 +
    6.98 +This module does not know how to automatically handle any Mercurial servers 
    6.99 +other than bitbucket.org, or any other VCS or DVCS server at the moment.
   6.100 +
   6.101 +No bugs have been reported.
   6.102 +
   6.103 +Bugs should be reported via: 
   6.104 +
   6.105 +1) The CPAN bug tracker at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dist-Zilla-CSJEWELL>
   6.106 +if you have an account there.
   6.107 +
   6.108 +2) Email to E<lt>bug-Dist-Zilla-CSJEWELL@rt.cpan.orgE<gt> if you do not.
   6.109 +
   6.110 +=head1 AUTHOR
   6.111 +
   6.112 +Curtis Jewell <CSJewell@cpan.org>
   6.113 +
   6.114 +=for readme continue
   6.115 +
   6.116 +=head1 LICENSE AND COPYRIGHT
   6.117 +
   6.118 +Copyright (c) 2010, Curtis Jewell C<< CSJewell@cpan.org >>.
   6.119 +
   6.120 +This module is free software; you can redistribute it and/or
   6.121 +modify it under the same terms as Perl itself, either version
   6.122 +5.8.1 or any later version. See L<perlartistic|perlartistic> 
   6.123 +and L<perlgpl|perlgpl>.
   6.124 +
   6.125 +The full text of the license can be found in the
   6.126 +LICENSE file included with this module.
   6.127 +
   6.128 +=for readme stop
   6.129 +
   6.130 +=head1 DISCLAIMER OF WARRANTY
   6.131 +
   6.132 +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
   6.133 +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
   6.134 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
   6.135 +PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
   6.136 +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   6.137 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
   6.138 +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
   6.139 +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
   6.140 +NECESSARY SERVICING, REPAIR, OR CORRECTION.
   6.141 +
   6.142 +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
   6.143 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
   6.144 +REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
   6.145 +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
   6.146 +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
   6.147 +THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
   6.148 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
   6.149 +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
   6.150 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
   6.151 +SUCH DAMAGES.
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/lib/Dist/Zilla/Plugin/CSJEWELL/BeforeBuild.pm	Tue Aug 10 16:33:13 2010 -0600
     7.3 @@ -0,0 +1,90 @@
     7.4 +package Dist::Zilla::Plugin::CSJEWELL::BeforeBuild;
     7.5 +
     7.6 +use 5.008003;
     7.7 +use Moose;
     7.8 +use Module::Build;
     7.9 +with 'Dist::Zilla::Role::BeforeBuild';
    7.10 +
    7.11 +our $VERSION = '0.900';
    7.12 +$VERSION =~ s/_//sm;
    7.13 +
    7.14 +
    7.15 +sub before_build {
    7.16 +	my ($self) = @_;
    7.17 +
    7.18 +# This has the same effect as "perl Build.PL && Build manifest && Build distmeta", only in code.
    7.19 +	my $builder = Module::Build->new_from_context();
    7.20 +	$builder->ACTION_manifest();
    7.21 +	$builder->ACTION_distmeta();
    7.22 +
    7.23 +	return 1;
    7.24 +}
    7.25 +
    7.26 +__PACKAGE__->meta()->make_immutable();
    7.27 +no Moose;
    7.28 +1;
    7.29 +
    7.30 +__END__
    7.31 +
    7.32 +=pod
    7.33 +
    7.34 +=head1 NAME
    7.35 +
    7.36 +Dist::Zilla::Plugin::CSJEWELL::BeforeBuild - Let Module::Build create the meta files.
    7.37 +
    7.38 +=head1 VERSION
    7.39 +
    7.40 +This document describes Dist::Zilla::Plugin::CSJEWELL::BeforeBuild version 0.900.
    7.41 +
    7.42 +=head1 DESCRIPTION
    7.43 +
    7.44 +This plugin asks Module::Build to generate the Makefile.PL, META.yml, MANIFEST, 
    7.45 +README, and LICENSE files.
    7.46 +
    7.47 +=for Pod::Coverage before_build
    7.48 +
    7.49 +=head1 AUTHOR
    7.50 +
    7.51 +Curtis Jewell <CSJewell@cpan.org>
    7.52 +
    7.53 +=head1 SEE ALSO
    7.54 +
    7.55 +L<Dist::Zilla::CSJEWELL|Dist::Zilla::CSJEWELL>
    7.56 +
    7.57 +=head1 LICENSE AND COPYRIGHT
    7.58 +
    7.59 +Copyright (c) 2010, Curtis Jewell C<< CSJewell@cpan.org >>.
    7.60 +
    7.61 +This module is free software; you can redistribute it and/or
    7.62 +modify it under the same terms as Perl itself, either version
    7.63 +5.8.1 or any later version. See L<perlartistic|perlartistic> 
    7.64 +and L<perlgpl|perlgpl>.
    7.65 +
    7.66 +The full text of the license can be found in the
    7.67 +LICENSE file included with this module.
    7.68 +
    7.69 +=head1 DISCLAIMER OF WARRANTY
    7.70 +
    7.71 +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    7.72 +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
    7.73 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    7.74 +PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
    7.75 +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    7.76 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
    7.77 +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
    7.78 +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
    7.79 +NECESSARY SERVICING, REPAIR, OR CORRECTION.
    7.80 +
    7.81 +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    7.82 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    7.83 +REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
    7.84 +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
    7.85 +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
    7.86 +THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
    7.87 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
    7.88 +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
    7.89 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
    7.90 +SUCH DAMAGES.
    7.91 +
    7.92 +=cut
    7.93 +
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/lib/Dist/Zilla/Plugin/CSJEWELL/VersionGetter.pm	Tue Aug 10 16:33:13 2010 -0600
     8.3 @@ -0,0 +1,91 @@
     8.4 +package Dist::Zilla::Plugin::CSJEWELL::VersionGetter;
     8.5 +
     8.6 +use 5.008003;
     8.7 +use Moose;
     8.8 +use ExtUtils::MakeMaker;
     8.9 +with 'Dist::Zilla::Role::VersionProvider';
    8.10 +
    8.11 +our $VERSION = '0.900';
    8.12 +$VERSION =~ s/_//sm;
    8.13 +
    8.14 +
    8.15 +sub provide_version {
    8.16 +	my ($self) = @_;
    8.17 +
    8.18 +	my $name = $self->zilla->main_module->name;
    8.19 +
    8.20 +	my $version = MM->parse_version($name);
    8.21 +
    8.22 +	$self->log_debug( [ 'providing version %s', $version ] );
    8.23 +
    8.24 +	return $version;
    8.25 +}
    8.26 +
    8.27 +__PACKAGE__->meta()->make_immutable();
    8.28 +no Moose;
    8.29 +1;
    8.30 +
    8.31 +__END__
    8.32 +
    8.33 +=pod
    8.34 +
    8.35 +=head1 NAME
    8.36 +
    8.37 +Dist::Zilla::Plugin::CSJEWELL::VersionGetter - Grab the version from the main file
    8.38 +
    8.39 +=head1 VERSION
    8.40 +
    8.41 +This document describes Dist::Zilla::Plugin::CSJEWELL::VersionGetter version 0.900.
    8.42 +
    8.43 +=head1 DESCRIPTION
    8.44 +
    8.45 +This plugin gets the distribution version from the main distribution module, 
    8.46 +by calling ExtUtils::MakeMaker->parse_version().
    8.47 +
    8.48 +=for Pod::Coverage provide_version
    8.49 +
    8.50 +=head1 AUTHOR
    8.51 +
    8.52 +Curtis Jewell <CSJewell@cpan.org>
    8.53 +
    8.54 +=head1 SEE ALSO
    8.55 +
    8.56 +L<Dist::Zilla::CSJEWELL|Dist::Zilla::CSJEWELL>
    8.57 +
    8.58 +=head1 LICENSE AND COPYRIGHT
    8.59 +
    8.60 +Copyright (c) 2010, Curtis Jewell C<< CSJewell@cpan.org >>.
    8.61 +
    8.62 +This module is free software; you can redistribute it and/or
    8.63 +modify it under the same terms as Perl itself, either version
    8.64 +5.8.1 or any later version. See L<perlartistic|perlartistic> 
    8.65 +and L<perlgpl|perlgpl>.
    8.66 +
    8.67 +The full text of the license can be found in the
    8.68 +LICENSE file included with this module.
    8.69 +
    8.70 +=head1 DISCLAIMER OF WARRANTY
    8.71 +
    8.72 +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    8.73 +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
    8.74 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    8.75 +PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
    8.76 +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    8.77 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
    8.78 +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
    8.79 +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
    8.80 +NECESSARY SERVICING, REPAIR, OR CORRECTION.
    8.81 +
    8.82 +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    8.83 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    8.84 +REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
    8.85 +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
    8.86 +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
    8.87 +THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
    8.88 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
    8.89 +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
    8.90 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
    8.91 +SUCH DAMAGES.
    8.92 +
    8.93 +=cut
    8.94 +
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/lib/Dist/Zilla/PluginBundle/CSJEWELL.pm	Tue Aug 10 16:33:13 2010 -0600
     9.3 @@ -0,0 +1,132 @@
     9.4 +package Dist::Zilla::PluginBundle::CSJEWELL;
     9.5 +
     9.6 +use 5.008003;
     9.7 +use Moose;
     9.8 +with 'Dist::Zilla::Role::PluginBundle::Easy';
     9.9 +
    9.10 +our $VERSION = '0.900';
    9.11 +$VERSION =~ s/_//sm;
    9.12 +
    9.13 +
    9.14 +sub configure {
    9.15 +	my ($self) = @_;
    9.16 +
    9.17 +	$self->add_plugins( qw(
    9.18 +		  CSJEWELL::BeforeBuild
    9.19 +		  GatherDir
    9.20 +		  ManifestSkip
    9.21 +		  CSJEWELL::VersionGetter
    9.22 +
    9.23 +		  TestRelease
    9.24 +		  ConfirmRelease
    9.25 +		  UploadToCPAN
    9.26 +	) );
    9.27 +
    9.28 +	return $self;
    9.29 +} ## end sub configure
    9.30 +
    9.31 +__PACKAGE__->meta()->make_immutable();
    9.32 +no Moose;
    9.33 +1;
    9.34 +
    9.35 +__END__
    9.36 +
    9.37 +=pod
    9.38 +
    9.39 +=head1 NAME
    9.40 +
    9.41 +Dist::Zilla::PluginBundle::CSJEWELL - CSJEWELL's basic plugins to maintain and release CPAN dists
    9.42 +
    9.43 +=head1 VERSION
    9.44 +
    9.45 +This document describes Dist::Zilla::PluginBundle::CSJEWELL version 0.900.
    9.46 +
    9.47 +=head1 DESCRIPTION
    9.48 +
    9.49 +This plugin is meant to be a basic "first step" bundle for using Dist::Zilla.
    9.50 +It won't munge any of your code, but will generate a F<Makefile.PL> and allows
    9.51 +easy, reliable releasing of distributions.
    9.52 +
    9.53 +It includes the following plugins with their default configuration:
    9.54 +
    9.55 +=over 4
    9.56 +
    9.57 +=item *
    9.58 +
    9.59 +L<Dist::Zilla::Plugin::CSJEWELL::BeforeBuild|Dist::Zilla::Plugin::CSJEWELL::BeforeBuild>
    9.60 +
    9.61 +=item *
    9.62 +
    9.63 +L<Dist::Zilla::Plugin::GatherDir|Dist::Zilla::Plugin::GatherDir>
    9.64 +
    9.65 +=item *
    9.66 +
    9.67 +L<Dist::Zilla::Plugin::ManifestSkip|Dist::Zilla::Plugin::ManifestSkip>
    9.68 +
    9.69 +=item *
    9.70 +
    9.71 +L<Dist::Zilla::Plugin::CSJEWELL::VersionGetter|Dist::Zilla::Plugin::CSJEWELL::VersionGetter>
    9.72 +
    9.73 +=item *
    9.74 +
    9.75 +L<Dist::Zilla::Plugin::TestRelease|Dist::Zilla::Plugin::TestRelease>
    9.76 +
    9.77 +=item *
    9.78 +
    9.79 +L<Dist::Zilla::Plugin::ConfirmRelease|Dist::Zilla::Plugin::ConfirmRelease>
    9.80 +
    9.81 +=item *
    9.82 +
    9.83 +L<Dist::Zilla::Plugin::UploadToCPAN|Dist::Zilla::Plugin::UploadToCPAN>
    9.84 +
    9.85 +=back
    9.86 +
    9.87 +=for Pod::Coverage configure
    9.88 +
    9.89 +=head1 AUTHOR
    9.90 +
    9.91 +Curtis Jewell <CSJewell@cpan.org>
    9.92 +
    9.93 +=head1 SEE ALSO
    9.94 +
    9.95 +L<Dist::Zilla::CSJEWELL|Dist::Zilla::CSJEWELL>
    9.96 +
    9.97 +=head1 LICENSE AND COPYRIGHT
    9.98 +
    9.99 +Copyright (c) 2010, Curtis Jewell C<< CSJewell@cpan.org >>.
   9.100 +
   9.101 +This module is free software; you can redistribute it and/or
   9.102 +modify it under the same terms as Perl itself, either version
   9.103 +5.8.1 or any later version. See L<perlartistic|perlartistic> 
   9.104 +and L<perlgpl|perlgpl>.
   9.105 +
   9.106 +The full text of the license can be found in the
   9.107 +LICENSE file included with this module.
   9.108 +
   9.109 +=head1 DISCLAIMER OF WARRANTY
   9.110 +
   9.111 +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
   9.112 +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
   9.113 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
   9.114 +PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
   9.115 +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   9.116 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
   9.117 +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
   9.118 +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
   9.119 +NECESSARY SERVICING, REPAIR, OR CORRECTION.
   9.120 +
   9.121 +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
   9.122 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
   9.123 +REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
   9.124 +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
   9.125 +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
   9.126 +THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
   9.127 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
   9.128 +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
   9.129 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
   9.130 +SUCH DAMAGES.
   9.131 +
   9.132 +=cut
   9.133 +
   9.134 +
   9.135 +
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/lib/Dist/Zilla/Stash/DefaultURLs.pm	Tue Aug 10 16:33:13 2010 -0600
    10.3 @@ -0,0 +1,87 @@
    10.4 +package Dist::Zilla::Stash::DefaultURLs;
    10.5 +
    10.6 +use 5.008003;
    10.7 +use Moose;
    10.8 +
    10.9 +our $VERSION = '0.900';
   10.10 +$VERSION =~ s/_//sm;
   10.11 +
   10.12 +
   10.13 +has repository_location => (
   10.14 +	is       => 'ro',
   10.15 +	isa      => 'Str',
   10.16 +	required => 1,
   10.17 +);
   10.18 +
   10.19 +has homepage => (
   10.20 +	is       => 'ro',
   10.21 +	isa      => 'Str',
   10.22 +	required => 1,
   10.23 +);
   10.24 +
   10.25 +with 'Dist::Zilla::Role::Stash';
   10.26 +1;
   10.27 +
   10.28 +__END__
   10.29 +
   10.30 +=pod
   10.31 +
   10.32 +=head1 NAME
   10.33 +
   10.34 +Dist::Zilla::Stash::DefaultURLs - a stash of default URLs
   10.35 +
   10.36 +=head1 VERSION
   10.37 +
   10.38 +This document describes Dist::Zilla::Stash::DefaultURLs version 0.900.
   10.39 +
   10.40 +=head1 OVERVIEW
   10.41 +
   10.42 +The DefaultURLs stash is a L<stash|Dist::Zilla::Role::Stash> used to
   10.43 +store default URLs used by the skeleton files that 
   10.44 +L<Dist::Zilla::CSJEWELL|Dist::Zilla::CSJEWELL> provides.
   10.45 +
   10.46 +=head1 AUTHOR
   10.47 +
   10.48 +Curtis Jewell <CSJewell@cpan.org>
   10.49 +
   10.50 +=head1 SEE ALSO
   10.51 +
   10.52 +L<Dist::Zilla::CSJEWELL|Dist::Zilla::CSJEWELL>
   10.53 +
   10.54 +=head1 LICENSE AND COPYRIGHT
   10.55 +
   10.56 +Copyright (c) 2010, Curtis Jewell C<< CSJewell@cpan.org >>.
   10.57 +
   10.58 +This module is free software; you can redistribute it and/or
   10.59 +modify it under the same terms as Perl itself, either version
   10.60 +5.8.1 or any later version. See L<perlartistic|perlartistic> 
   10.61 +and L<perlgpl|perlgpl>.
   10.62 +
   10.63 +The full text of the license can be found in the
   10.64 +LICENSE file included with this module.
   10.65 +
   10.66 +=head1 DISCLAIMER OF WARRANTY
   10.67 +
   10.68 +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
   10.69 +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
   10.70 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
   10.71 +PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
   10.72 +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   10.73 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
   10.74 +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
   10.75 +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
   10.76 +NECESSARY SERVICING, REPAIR, OR CORRECTION.
   10.77 +
   10.78 +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
   10.79 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
   10.80 +REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
   10.81 +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
   10.82 +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
   10.83 +THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
   10.84 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
   10.85 +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
   10.86 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
   10.87 +SUCH DAMAGES.
   10.88 +
   10.89 +=cut
   10.90 +
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/t/000_report_versions.t	Tue Aug 10 16:33:13 2010 -0600
    11.3 @@ -0,0 +1,485 @@
    11.4 +#!perl
    11.5 +use warnings;
    11.6 +use strict;
    11.7 +use Test::More 0.88;
    11.8 +use Config;
    11.9 +
   11.10 +# Include a cut-down version of YAML::Tiny so we don't introduce unnecessary
   11.11 +# dependencies ourselves.
   11.12 +
   11.13 +package Local::YAML::Tiny;
   11.14 +
   11.15 +use strict;
   11.16 +use Carp 'croak';
   11.17 +
   11.18 +# UTF Support?
   11.19 +sub HAVE_UTF8 () { $] >= 5.007003 }
   11.20 +
   11.21 +BEGIN {
   11.22 +	if (HAVE_UTF8) {
   11.23 +
   11.24 +		# The string eval helps hide this from Test::MinimumVersion
   11.25 +		eval "require utf8;";
   11.26 +		die "Failed to load UTF-8 support" if $@;
   11.27 +	}
   11.28 +
   11.29 +	# Class structure
   11.30 +	require 5.004;
   11.31 +	$YAML::Tiny::VERSION = '1.40';
   11.32 +
   11.33 +	# Error storage
   11.34 +	$YAML::Tiny::errstr = '';
   11.35 +} ## end BEGIN
   11.36 +
   11.37 +# Printable characters for escapes
   11.38 +my %UNESCAPES = (
   11.39 +	z    => "\x00",
   11.40 +	a    => "\x07",
   11.41 +	t    => "\x09",
   11.42 +	n    => "\x0a",
   11.43 +	v    => "\x0b",
   11.44 +	f    => "\x0c",
   11.45 +	r    => "\x0d",
   11.46 +	e    => "\x1b",
   11.47 +	'\\' => '\\',
   11.48 +);
   11.49 +
   11.50 +
   11.51 +#####################################################################
   11.52 +# Implementation
   11.53 +
   11.54 +# Create an empty YAML::Tiny object
   11.55 +sub new {
   11.56 +	my $class = shift;
   11.57 +	bless [@_], $class;
   11.58 +}
   11.59 +
   11.60 +# Create an object from a file
   11.61 +sub read {
   11.62 +	my $class = ref $_[0] ? ref shift : shift;
   11.63 +
   11.64 +	# Check the file
   11.65 +	my $file = shift
   11.66 +	  or return $class->_error('You did not specify a file name');
   11.67 +	return $class->_error("File '$file' does not exist") unless -e $file;
   11.68 +	return $class->_error("'$file' is a directory, not a file") unless -f _;
   11.69 +	return $class->_error("Insufficient permissions to read '$file'")
   11.70 +	  unless -r _;
   11.71 +
   11.72 +	# Slurp in the file
   11.73 +	local $/ = undef;
   11.74 +	local *CFG;
   11.75 +	unless ( open( CFG, $file ) ) {
   11.76 +		return $class->_error("Failed to open file '$file': $!");
   11.77 +	}
   11.78 +	my $contents = readline(*CFG);
   11.79 +	unless ( close(CFG) ) {
   11.80 +		return $class->_error("Failed to close file '$file': $!");
   11.81 +	}
   11.82 +
   11.83 +	$class->read_string($contents);
   11.84 +} ## end sub read
   11.85 +
   11.86 +# Create an object from a string
   11.87 +sub read_string {
   11.88 +	my $class = ref $_[0] ? ref shift : shift;
   11.89 +	my $self = bless [], $class;
   11.90 +	my $string = $_[0];
   11.91 +	unless ( defined $string ) {
   11.92 +		return $self->_error("Did not provide a string to load");
   11.93 +	}
   11.94 +
   11.95 +	# Byte order marks
   11.96 +	# NOTE: Keeping this here to educate maintainers
   11.97 +	# my %BOM = (
   11.98 +	#     "\357\273\277" => 'UTF-8',
   11.99 +	#     "\376\377"     => 'UTF-16BE',
  11.100 +	#     "\377\376"     => 'UTF-16LE',
  11.101 +	#     "\377\376\0\0" => 'UTF-32LE'
  11.102 +	#     "\0\0\376\377" => 'UTF-32BE',
  11.103 +	# );
  11.104 +	if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
  11.105 +		return $self->_error("Stream has a non UTF-8 BOM");
  11.106 +	} else {
  11.107 +
  11.108 +		# Strip UTF-8 bom if found, we'll just ignore it
  11.109 +		$string =~ s/^\357\273\277//;
  11.110 +	}
  11.111 +
  11.112 +	# Try to decode as utf8
  11.113 +	utf8::decode($string) if HAVE_UTF8;
  11.114 +
  11.115 +	# Check for some special cases
  11.116 +	return $self unless length $string;
  11.117 +	unless ( $string =~ /[\012\015]+\z/ ) {
  11.118 +		return $self->_error("Stream does not end with newline character");
  11.119 +	}
  11.120 +
  11.121 +	# Split the file into lines
  11.122 +	my @lines = grep { !/^\s*(?:\#.*)?\z/ }
  11.123 +	  split /(?:\015{1,2}\012|\015|\012)/, $string;
  11.124 +
  11.125 +	# Strip the initial YAML header
  11.126 +	@lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ and shift @lines;
  11.127 +
  11.128 +	# A nibbling parser
  11.129 +	while (@lines) {
  11.130 +
  11.131 +		# Do we have a document header?
  11.132 +		if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) {
  11.133 +
  11.134 +			# Handle scalar documents
  11.135 +			shift @lines;
  11.136 +			if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) {
  11.137 +				push @$self, $self->_read_scalar( "$1", [undef], \@lines );
  11.138 +				next;
  11.139 +			}
  11.140 +		}
  11.141 +
  11.142 +		if ( !@lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) {
  11.143 +
  11.144 +			# A naked document
  11.145 +			push @$self, undef;
  11.146 +			while ( @lines and $lines[0] !~ /^---/ ) {
  11.147 +				shift @lines;
  11.148 +			}
  11.149 +
  11.150 +		} elsif ( $lines[0] =~ /^\s*\-/ ) {
  11.151 +
  11.152 +			# An array at the root
  11.153 +			my $document = [];
  11.154 +			push @$self, $document;
  11.155 +			$self->_read_array( $document, [0], \@lines );
  11.156 +
  11.157 +		} elsif ( $lines[0] =~ /^(\s*)\S/ ) {
  11.158 +
  11.159 +			# A hash at the root
  11.160 +			my $document = {};
  11.161 +			push @$self, $document;
  11.162 +			$self->_read_hash( $document, [ length($1) ], \@lines );
  11.163 +
  11.164 +		} else {
  11.165 +			croak("YAML::Tiny failed to classify the line '$lines[0]'");
  11.166 +		}
  11.167 +	} ## end while (@lines)
  11.168 +
  11.169 +	$self;
  11.170 +} ## end sub read_string
  11.171 +
  11.172 +# Deparse a scalar string to the actual scalar
  11.173 +sub _read_scalar {
  11.174 +	my ( $self, $string, $indent, $lines ) = @_;
  11.175 +
  11.176 +	# Trim trailing whitespace
  11.177 +	$string =~ s/\s*\z//;
  11.178 +
  11.179 +	# Explitic null/undef
  11.180 +	return undef if $string eq '~';
  11.181 +
  11.182 +	# Quotes
  11.183 +	if ( $string =~ /^\'(.*?)\'\z/ ) {
  11.184 +		return '' unless defined $1;
  11.185 +		$string = $1;
  11.186 +		$string =~ s/\'\'/\'/g;
  11.187 +		return $string;
  11.188 +	}
  11.189 +	if ( $string =~ /^\"((?:\\.|[^\"])*)\"\z/ ) {
  11.190 +
  11.191 +		# Reusing the variable is a little ugly,
  11.192 +		# but avoids a new variable and a string copy.
  11.193 +		$string = $1;
  11.194 +		$string =~ s/\\"/"/g;
  11.195 +		$string =~
  11.196 +s/\\([never\\fartz]|x([0-9a-fA-F]{2}))/(length($1)>1)?pack("H2",$2):$UNESCAPES{$1}/gex;
  11.197 +		return $string;
  11.198 +	}
  11.199 +
  11.200 +	# Special cases
  11.201 +	if ( $string =~ /^[\'\"!&]/ ) {
  11.202 +		croak(
  11.203 +			"YAML::Tiny does not support a feature in line '$lines->[0]'");
  11.204 +	}
  11.205 +	return {} if $string eq '{}';
  11.206 +	return [] if $string eq '[]';
  11.207 +
  11.208 +	# Regular unquoted string
  11.209 +	return $string unless $string =~ /^[>|]/;
  11.210 +
  11.211 +	# Error
  11.212 +	croak("YAML::Tiny failed to find multi-line scalar content")
  11.213 +	  unless @$lines;
  11.214 +
  11.215 +	# Check the indent depth
  11.216 +	$lines->[0] =~ /^(\s*)/;
  11.217 +	$indent->[-1] = length("$1");
  11.218 +	if ( defined $indent->[-2] and $indent->[-1] <= $indent->[-2] ) {
  11.219 +		croak("YAML::Tiny found bad indenting in line '$lines->[0]'");
  11.220 +	}
  11.221 +
  11.222 +	# Pull the lines
  11.223 +	my @multiline = ();
  11.224 +	while (@$lines) {
  11.225 +		$lines->[0] =~ /^(\s*)/;
  11.226 +		last unless length($1) >= $indent->[-1];
  11.227 +		push @multiline, substr( shift(@$lines), length($1) );
  11.228 +	}
  11.229 +
  11.230 +	my $j = ( substr( $string, 0, 1 ) eq '>' ) ? ' ' : "\n";
  11.231 +	my $t = ( substr( $string, 1, 1 ) eq '-' ) ? ''  : "\n";
  11.232 +	return join( $j, @multiline ) . $t;
  11.233 +} ## end sub _read_scalar
  11.234 +
  11.235 +# Parse an array
  11.236 +sub _read_array {
  11.237 +	my ( $self, $array, $indent, $lines ) = @_;
  11.238 +
  11.239 +	while (@$lines) {
  11.240 +
  11.241 +		# Check for a new document
  11.242 +		if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) {
  11.243 +			while ( @$lines and $lines->[0] !~ /^---/ ) {
  11.244 +				shift @$lines;
  11.245 +			}
  11.246 +			return 1;
  11.247 +		}
  11.248 +
  11.249 +		# Check the indent level
  11.250 +		$lines->[0] =~ /^(\s*)/;
  11.251 +		if ( length($1) < $indent->[-1] ) {
  11.252 +			return 1;
  11.253 +		} elsif ( length($1) > $indent->[-1] ) {
  11.254 +			croak("YAML::Tiny found bad indenting in line '$lines->[0]'");
  11.255 +		}
  11.256 +
  11.257 +		if ( $lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/ ) {
  11.258 +
  11.259 +			# Inline nested hash
  11.260 +			my $indent2 = length("$1");
  11.261 +			$lines->[0] =~ s/-/ /;
  11.262 +			push @$array, {};
  11.263 +			$self->_read_hash( $array->[-1], [ @$indent, $indent2 ],
  11.264 +				$lines );
  11.265 +
  11.266 +		} elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) {
  11.267 +
  11.268 +			# Array entry with a value
  11.269 +			shift @$lines;
  11.270 +			push @$array,
  11.271 +			  $self->_read_scalar( "$2", [ @$indent, undef ], $lines );
  11.272 +
  11.273 +		} elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) {
  11.274 +			shift @$lines;
  11.275 +			unless (@$lines) {
  11.276 +				push @$array, undef;
  11.277 +				return 1;
  11.278 +			}
  11.279 +			if ( $lines->[0] =~ /^(\s*)\-/ ) {
  11.280 +				my $indent2 = length("$1");
  11.281 +				if ( $indent->[-1] == $indent2 ) {
  11.282 +
  11.283 +					# Null array entry
  11.284 +					push @$array, undef;
  11.285 +				} else {
  11.286 +
  11.287 +					# Naked indenter
  11.288 +					push @$array, [];
  11.289 +					$self->_read_array( $array->[-1],
  11.290 +						[ @$indent, $indent2 ], $lines );
  11.291 +				}
  11.292 +
  11.293 +			} elsif ( $lines->[0] =~ /^(\s*)\S/ ) {
  11.294 +				push @$array, {};
  11.295 +				$self->_read_hash( $array->[-1], [ @$indent, length("$1") ],
  11.296 +					$lines );
  11.297 +
  11.298 +			} else {
  11.299 +				croak("YAML::Tiny failed to classify line '$lines->[0]'");
  11.300 +			}
  11.301 +
  11.302 +		} elsif ( defined $indent->[-2] and $indent->[-1] == $indent->[-2] )
  11.303 +		{
  11.304 +
  11.305 +			# This is probably a structure like the following...
  11.306 +			# ---
  11.307 +			# foo:
  11.308 +			# - list
  11.309 +			# bar: value
  11.310 +			#
  11.311 +			# ... so lets return and let the hash parser handle it
  11.312 +			return 1;
  11.313 +
  11.314 +		} else {
  11.315 +			croak("YAML::Tiny failed to classify line '$lines->[0]'");
  11.316 +		}
  11.317 +	} ## end while (@$lines)
  11.318 +
  11.319 +	return 1;
  11.320 +} ## end sub _read_array
  11.321 +
  11.322 +# Parse an array
  11.323 +sub _read_hash {
  11.324 +	my ( $self, $hash, $indent, $lines ) = @_;
  11.325 +
  11.326 +	while (@$lines) {
  11.327 +
  11.328 +		# Check for a new document
  11.329 +		if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) {
  11.330 +			while ( @$lines and $lines->[0] !~ /^---/ ) {
  11.331 +				shift @$lines;
  11.332 +			}
  11.333 +			return 1;
  11.334 +		}
  11.335 +
  11.336 +		# Check the indent level
  11.337 +		$lines->[0] =~ /^(\s*)/;
  11.338 +		if ( length($1) < $indent->[-1] ) {
  11.339 +			return 1;
  11.340 +		} elsif ( length($1) > $indent->[-1] ) {
  11.341 +			croak("YAML::Tiny found bad indenting in line '$lines->[0]'");
  11.342 +		}
  11.343 +
  11.344 +		# Get the key
  11.345 +		unless ( $lines->[0] =~ s/^\s*([^\'\" ][^\n]*?)\s*:(\s+|$)// ) {
  11.346 +			if ( $lines->[0] =~ /^\s*[?\'\"]/ ) {
  11.347 +				croak(
  11.348 +"YAML::Tiny does not support a feature in line '$lines->[0]'"
  11.349 +				);
  11.350 +			}
  11.351 +			croak("YAML::Tiny failed to classify line '$lines->[0]'");
  11.352 +		}
  11.353 +		my $key = $1;
  11.354 +
  11.355 +		# Do we have a value?
  11.356 +		if ( length $lines->[0] ) {
  11.357 +
  11.358 +			# Yes
  11.359 +			$hash->{$key} =
  11.360 +			  $self->_read_scalar( shift(@$lines), [ @$indent, undef ],
  11.361 +				$lines );
  11.362 +		} else {
  11.363 +
  11.364 +			# An indent
  11.365 +			shift @$lines;
  11.366 +			unless (@$lines) {
  11.367 +				$hash->{$key} = undef;
  11.368 +				return 1;
  11.369 +			}
  11.370 +			if ( $lines->[0] =~ /^(\s*)-/ ) {
  11.371 +				$hash->{$key} = [];
  11.372 +				$self->_read_array( $hash->{$key}, [ @$indent, length($1) ],
  11.373 +					$lines );
  11.374 +			} elsif ( $lines->[0] =~ /^(\s*)./ ) {
  11.375 +				my $indent2 = length("$1");
  11.376 +				if ( $indent->[-1] >= $indent2 ) {
  11.377 +
  11.378 +					# Null hash entry
  11.379 +					$hash->{$key} = undef;
  11.380 +				} else {
  11.381 +					$hash->{$key} = {};
  11.382 +					$self->_read_hash( $hash->{$key},
  11.383 +						[ @$indent, length($1) ], $lines );
  11.384 +				}
  11.385 +			} ## end elsif ( $lines->[0] =~ /^(\s*)./)
  11.386 +		} ## end else [ if ( length $lines->[0...])]
  11.387 +	} ## end while (@$lines)
  11.388 +
  11.389 +	return 1;
  11.390 +} ## end sub _read_hash
  11.391 +
  11.392 +# Set error
  11.393 +sub _error {
  11.394 +	$YAML::Tiny::errstr = $_[1];
  11.395 +	undef;
  11.396 +}
  11.397 +
  11.398 +# Retrieve error
  11.399 +sub errstr {
  11.400 +	$YAML::Tiny::errstr;
  11.401 +}
  11.402 +
  11.403 +
  11.404 +
  11.405 +#####################################################################
  11.406 +# Use Scalar::Util if possible, otherwise emulate it
  11.407 +
  11.408 +BEGIN {
  11.409 +	eval { require Scalar::Util; };
  11.410 +	if ($@) {
  11.411 +
  11.412 +		# Failed to load Scalar::Util
  11.413 +		eval <<'END_PERL';
  11.414 +sub refaddr {
  11.415 +	my $pkg = ref($_[0]) or return undef;
  11.416 +	if (!!UNIVERSAL::can($_[0], 'can')) {
  11.417 +		bless $_[0], 'Scalar::Util::Fake';
  11.418 +	} else {
  11.419 +		$pkg = undef;
  11.420 +	}
  11.421 +	"$_[0]" =~ /0x(\w+)/;
  11.422 +	my $i = do { local $^W; hex $1 };
  11.423 +	bless $_[0], $pkg if defined $pkg;
  11.424 +	$i;
  11.425 +}
  11.426 +END_PERL
  11.427 +	} else {
  11.428 +		Scalar::Util->import('refaddr');
  11.429 +	}
  11.430 +} ## end BEGIN
  11.431 +
  11.432 +
  11.433 +#####################################################################
  11.434 +# main test
  11.435 +#####################################################################
  11.436 +
  11.437 +package main;
  11.438 +
  11.439 +BEGIN {
  11.440 +
  11.441 +   # Skip modules that either don't want to be loaded directly, such as
  11.442 +   # Module::Install, or that mess with the test count, such as the Test::*
  11.443 +   # modules listed here.
  11.444 +   #
  11.445 +   # Moose::Role conflicts if Moose is loaded as well, but Moose::Role is in
  11.446 +   # the Moose distribution and it's certain that someone who uses
  11.447 +   # Moose::Role also uses Moose somewhere, so if we disallow Moose::Role,
  11.448 +   # we'll still get the relevant version number.
  11.449 +
  11.450 +	my %skip = map { $_ => 1 } qw(
  11.451 +	  App::FatPacker
  11.452 +	  Class::Accessor::Classy
  11.453 +	  Module::Install
  11.454 +	  Moose::Role
  11.455 +	  Test::YAML::Meta
  11.456 +	  Test::Pod::Coverage
  11.457 +	  Test::Portability::Files
  11.458 +	  Test::Perl::Dist
  11.459 +	);
  11.460 +
  11.461 +	my $Test = Test::Builder->new;
  11.462 +
  11.463 +	$Test->plan( skip_all => "META.yml could not be found" )
  11.464 +	  unless -f 'META.yml' and -r _;
  11.465 +
  11.466 +	my $meta = ( Local::YAML::Tiny->read('META.yml') )->[0];
  11.467 +	my %requires;
  11.468 +	for my $require_key ( grep {/requires/} keys %$meta ) {
  11.469 +		my %h = %{ $meta->{$require_key} };
  11.470 +		$requires{$_}++ for keys %h;
  11.471 +	}
  11.472 +	delete $requires{perl};
  11.473 +
  11.474 +	diag("Testing with Perl $], $Config{archname}, $^X");
  11.475 +	for my $module ( sort keys %requires ) {
  11.476 +		if ( $skip{$module} ) {
  11.477 +			note "$module doesn't want to be loaded directly, skipping";
  11.478 +			next;
  11.479 +		}
  11.480 +		local $SIG{__WARN__} = sub { note "$module: $_[0]" };
  11.481 +		use_ok $module or BAIL_OUT("can't load $module");
  11.482 +		my $version = $module->VERSION;
  11.483 +		$version = 'undefined' unless defined $version;
  11.484 +		diag("    $module version is $version");
  11.485 +	}
  11.486 +	done_testing;
  11.487 +} ## end BEGIN
  11.488 +
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/t/compile.t	Tue Aug 10 16:33:13 2010 -0600
    12.3 @@ -0,0 +1,12 @@
    12.4 +use Test::More tests => 2;
    12.5 +
    12.6 +BEGIN {
    12.7 +	use strict;
    12.8 +	$^W = 1;
    12.9 +	$| = 1;
   12.10 +
   12.11 +    ok(($] > 5.008000), 'Perl version acceptable') or BAIL_OUT ('Perl version unacceptably old.');
   12.12 +    use_ok( 'Dist::Zilla::CSJEWELL' );
   12.13 +    diag( "Testing Dist::Zilla::CSJEWELL $Dist::Zilla::CSJEWELL::VERSION" );
   12.14 +}
   12.15 +
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/xt/author/changes.t	Tue Aug 10 16:33:13 2010 -0600
    13.3 @@ -0,0 +1,28 @@
    13.4 +#!/usr/bin/perl
    13.5 +
    13.6 +# Test that the distribution's Changes file has been updated.
    13.7 +
    13.8 +use strict;
    13.9 +
   13.10 +BEGIN {
   13.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   13.12 +	use English qw(-no_match_vars);
   13.13 +	$OUTPUT_AUTOFLUSH = 1;
   13.14 +	$WARNING = 1;
   13.15 +}
   13.16 +
   13.17 +my @MODULES = (
   13.18 +	'Test::CheckChanges 0.14',
   13.19 +);
   13.20 +
   13.21 +# Load the testing modules
   13.22 +use Test::More;
   13.23 +foreach my $MODULE ( @MODULES ) {
   13.24 +	eval "use $MODULE";
   13.25 +	if ( $EVAL_ERROR ) {
   13.26 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   13.27 +	}
   13.28 +}
   13.29 +
   13.30 +ok_changes(base => '..');
   13.31 +
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/xt/author/common_mistakes.t	Tue Aug 10 16:33:13 2010 -0600
    14.3 @@ -0,0 +1,29 @@
    14.4 +#!/usr/bin/perl
    14.5 +
    14.6 +# Test that all modules have no common misspellings.
    14.7 +
    14.8 +use strict;
    14.9 +
   14.10 +BEGIN {
   14.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   14.12 +	use English qw(-no_match_vars);
   14.13 +	$OUTPUT_AUTOFLUSH = 1;
   14.14 +	$WARNING = 1;
   14.15 +}
   14.16 +
   14.17 +my @MODULES = (
   14.18 +	'Pod::Spell::CommonMistakes 0.01',
   14.19 +	'Test::Pod::Spelling::CommonMistakes 0.01',
   14.20 +);
   14.21 +
   14.22 +# Load the testing modules
   14.23 +use Test::More;
   14.24 +foreach my $MODULE ( @MODULES ) {
   14.25 +	eval "use $MODULE";
   14.26 +	if ( $EVAL_ERROR ) {
   14.27 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   14.28 +	}
   14.29 +}
   14.30 +
   14.31 +all_pod_files_ok();
   14.32 +
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/xt/author/fixme.t	Tue Aug 10 16:33:13 2010 -0600
    15.3 @@ -0,0 +1,35 @@
    15.4 +#!/usr/bin/perl
    15.5 +
    15.6 +# Test that all modules have nothing marked to do.
    15.7 +
    15.8 +use strict;
    15.9 +
   15.10 +BEGIN {
   15.11 +	use English qw(-no_match_vars);
   15.12 +	$OUTPUT_AUTOFLUSH = 1;
   15.13 +	$WARNING = 1;
   15.14 +}
   15.15 +
   15.16 +my @MODULES = (
   15.17 +	'Test::Fixme 0.04',
   15.18 +);
   15.19 +
   15.20 +# Load the testing modules
   15.21 +use Test::More;
   15.22 +foreach my $MODULE ( @MODULES ) {
   15.23 +	eval "use $MODULE";
   15.24 +	if ( $EVAL_ERROR ) {
   15.25 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   15.26 +	}
   15.27 +}
   15.28 +
   15.29 +# To make this a todo test, remove the comments below, and the spaces
   15.30 +# between TO and DO in the next two lines.
   15.31 +#TO DO: {
   15.32 +#	local $TO DO = 'All modules are going to be fixed.';
   15.33 +
   15.34 +	run_tests(
   15.35 +		match    => 'TO' . 'DO',                # what to check for
   15.36 +	);
   15.37 +#}
   15.38 +
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/xt/author/manifest.t	Tue Aug 10 16:33:13 2010 -0600
    16.3 @@ -0,0 +1,31 @@
    16.4 +#!perl
    16.5 +
    16.6 +# Test that our MANIFEST describes the distribution
    16.7 +
    16.8 +use strict;
    16.9 +
   16.10 +BEGIN {
   16.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   16.12 +	use English qw(-no_match_vars);
   16.13 +	$OUTPUT_AUTOFLUSH = 1;
   16.14 +	$WARNING = 1;
   16.15 +}
   16.16 +
   16.17 +my @MODULES = (
   16.18 +	'Test::DistManifest 1.009',
   16.19 +);
   16.20 +
   16.21 +# Load the testing modules
   16.22 +use Test::More;
   16.23 +unless ( -e 'MANIFEST.SKIP' ) {
   16.24 +	plan( skip_all => "MANIFEST.SKIP does not exist, so cannot test this." );
   16.25 +}
   16.26 +foreach my $MODULE ( @MODULES ) {
   16.27 +	eval "use $MODULE";
   16.28 +	if ( $EVAL_ERROR ) {
   16.29 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   16.30 +	}
   16.31 +}
   16.32 +
   16.33 +manifest_ok();
   16.34 +
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/xt/author/meta.t	Tue Aug 10 16:33:13 2010 -0600
    17.3 @@ -0,0 +1,29 @@
    17.4 +#!perl
    17.5 +
    17.6 +# Test that our META.yml file matches the specification
    17.7 +
    17.8 +use strict;
    17.9 +
   17.10 +BEGIN {
   17.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   17.12 +	use English qw(-no_match_vars);
   17.13 +	$OUTPUT_AUTOFLUSH = 1;
   17.14 +	$WARNING = 1;
   17.15 +}
   17.16 +
   17.17 +my @MODULES = (
   17.18 +    'Parse::CPAN::Meta 1.40',
   17.19 +	'Test::CPAN::Meta 0.17',
   17.20 +);
   17.21 +
   17.22 +# Load the testing modules
   17.23 +use Test::More;
   17.24 +foreach my $MODULE ( @MODULES ) {
   17.25 +	eval "use $MODULE";
   17.26 +	if ( $EVAL_ERROR ) {
   17.27 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   17.28 +	}
   17.29 +}
   17.30 +
   17.31 +meta_yaml_ok();
   17.32 +
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/xt/author/minimumversion.t	Tue Aug 10 16:33:13 2010 -0600
    18.3 @@ -0,0 +1,30 @@
    18.4 +#!perl
    18.5 +
    18.6 +# Test that our declared minimum Perl version matches our syntax
    18.7 +
    18.8 +use strict;
    18.9 +
   18.10 +BEGIN {
   18.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   18.12 +	use English qw(-no_match_vars);
   18.13 +	$OUTPUT_AUTOFLUSH = 1;
   18.14 +	$WARNING = 1;
   18.15 +}
   18.16 +
   18.17 +my @MODULES = (
   18.18 +	'Perl::MinimumVersion 1.26',
   18.19 +	'Test::MinimumVersion 0.101080',
   18.20 +);
   18.21 +
   18.22 +
   18.23 +# Load the testing modules
   18.24 +use Test::More;
   18.25 +foreach my $MODULE ( @MODULES ) {
   18.26 +	eval "use $MODULE";
   18.27 +	if ( $EVAL_ERROR ) {
   18.28 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" )
   18.29 +	}
   18.30 +}
   18.31 +
   18.32 +all_minimum_version_from_metayml_ok();
   18.33 +
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/xt/author/perlcritic.t	Tue Aug 10 16:33:13 2010 -0600
    19.3 @@ -0,0 +1,56 @@
    19.4 +#!perl
    19.5 +
    19.6 +# Test that modules pass perlcritic and perltidy.
    19.7 +
    19.8 +use strict;
    19.9 +
   19.10 +BEGIN {
   19.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   19.12 +	use English qw(-no_match_vars);
   19.13 +	$OUTPUT_AUTOFLUSH = 1;
   19.14 +	$WARNING = 1;
   19.15 +}
   19.16 +
   19.17 +my @MODULES = (
   19.18 +	'Perl::Tidy',
   19.19 +	'Perl::Critic',
   19.20 +	'PPIx::Regexp',
   19.21 +	'PPIx::Utilities::Statement',
   19.22 +	'Email::Address',
   19.23 +	'Perl::Critic::Utils::Constants',
   19.24 +	'Perl::Critic::More',
   19.25 +	'Test::Perl::Critic',
   19.26 +);
   19.27 +
   19.28 +# Load the testing modules
   19.29 +use Test::More;
   19.30 +foreach my $MODULE ( @MODULES ) {
   19.31 +	eval "require $MODULE"; # Has to be require because we pass options to import.
   19.32 +	if ( $EVAL_ERROR ) {
   19.33 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" )
   19.34 +	}
   19.35 +}
   19.36 +
   19.37 +$Perl::Critic::VERSION =~ s/_//;
   19.38 +if ( 1.108 > eval { $Perl::Critic::VERSION } ) {
   19.39 +	plan( skip_all => 'Perl::Critic needs updated to 1.108' );
   19.40 +}
   19.41 +
   19.42 +if ( 20090616 > eval { $Perl::Tidy::VERSION } ) {
   19.43 +	plan( skip_all => "Perl::Tidy needs updated to 20090616" );
   19.44 +}
   19.45 +
   19.46 +use File::Spec::Functions qw(catfile);
   19.47 +Perl::Critic::Utils::Constants->import(':profile_strictness');
   19.48 +my $dummy = $Perl::Critic::Utils::Constants::PROFILE_STRICTNESS_QUIET;
   19.49 +
   19.50 +local $ENV{PERLTIDY} = catfile( 'xt', 'settings', 'perltidy.txt' );
   19.51 +
   19.52 +my $rcfile = catfile( 'xt', 'settings', 'perlcritic.txt' );
   19.53 +Test::Perl::Critic->import( 
   19.54 +	-profile            => $rcfile, 
   19.55 +	-severity           => 1, 
   19.56 +	-profile-strictness => $Perl::Critic::Utils::Constants::PROFILE_STRICTNESS_QUIET
   19.57 +);
   19.58 +all_critic_ok();
   19.59 +
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/xt/author/pod.t	Tue Aug 10 16:33:13 2010 -0600
    20.3 @@ -0,0 +1,31 @@
    20.4 +#!perl
    20.5 +
    20.6 +# Test that the syntax of our POD documentation is valid
    20.7 +
    20.8 +use strict;
    20.9 +
   20.10 +BEGIN {
   20.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   20.12 +	use English qw(-no_match_vars);
   20.13 +	$OUTPUT_AUTOFLUSH = 1;
   20.14 +	$WARNING = 1;
   20.15 +}
   20.16 +
   20.17 +my @MODULES = (
   20.18 +	'Pod::Simple 3.14',
   20.19 +	'Test::Pod 1.44',
   20.20 +);
   20.21 +
   20.22 +# Load the testing modules
   20.23 +use Test::More;
   20.24 +foreach my $MODULE ( @MODULES ) {
   20.25 +	eval "use $MODULE";
   20.26 +	if ( $EVAL_ERROR ) {
   20.27 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" )
   20.28 +	}
   20.29 +}
   20.30 +
   20.31 +my @files = sort { $a cmp $b } all_pod_files();
   20.32 +
   20.33 +all_pod_files_ok( @files );
   20.34 +
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/xt/author/pod_coverage.t	Tue Aug 10 16:33:13 2010 -0600
    21.3 @@ -0,0 +1,40 @@
    21.4 +#!perl
    21.5 +
    21.6 +# Test that modules are documented by their pod.
    21.7 +
    21.8 +use strict;
    21.9 +
   21.10 +BEGIN {
   21.11 +	use English qw(-no_match_vars);
   21.12 +	$OUTPUT_AUTOFLUSH = 1;
   21.13 +	$WARNING = 1;
   21.14 +}
   21.15 +
   21.16 +# If using Moose, uncomment the appropriate lines below.
   21.17 +my @MODULES = (
   21.18 +	'Pod::Coverage::TrustPod 0.092830',
   21.19 +	'Pod::Coverage 0.21',
   21.20 +	'Test::Pod::Coverage 1.08',
   21.21 +);
   21.22 +
   21.23 +# Load the testing modules
   21.24 +use Test::More;
   21.25 +foreach my $MODULE ( @MODULES ) {
   21.26 +	eval "use $MODULE";
   21.27 +	if ( $EVAL_ERROR ) {
   21.28 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" )
   21.29 +	}
   21.30 +}
   21.31 +
   21.32 +my @modules = all_modules();
   21.33 +my @modules_to_test = sort { $a cmp $b } @modules;
   21.34 +my $test_count = scalar @modules_to_test;
   21.35 +plan tests => $test_count;
   21.36 +
   21.37 +foreach my $module (@modules_to_test) {
   21.38 +	pod_coverage_ok($module, { 
   21.39 +		coverage_class => 'Pod::Coverage::TrustPod', 
   21.40 +		also_private => [ qr/^[A-Z_]+$/ ],
   21.41 +	});
   21.42 +}
   21.43 +
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/xt/author/portability.t	Tue Aug 10 16:33:13 2010 -0600
    22.3 @@ -0,0 +1,28 @@
    22.4 +#!perl
    22.5 +
    22.6 +# Test that our files are portable across systems.
    22.7 +
    22.8 +use strict;
    22.9 +
   22.10 +BEGIN {
   22.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   22.12 +	use English qw(-no_match_vars);
   22.13 +	$OUTPUT_AUTOFLUSH = 1;
   22.14 +	$WARNING = 1;
   22.15 +}
   22.16 +
   22.17 +my @MODULES = (
   22.18 +	'Test::Portability::Files 0.05',
   22.19 +);
   22.20 +
   22.21 +# Load the testing modules
   22.22 +use Test::More;
   22.23 +foreach my $MODULE ( @MODULES ) {
   22.24 +	eval "use $MODULE";
   22.25 +	if ( $EVAL_ERROR ) {
   22.26 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   22.27 +	}
   22.28 +}
   22.29 +
   22.30 +run_tests();
   22.31 +
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/xt/author/prereq.t	Tue Aug 10 16:33:13 2010 -0600
    23.3 @@ -0,0 +1,37 @@
    23.4 +#!perl
    23.5 +
    23.6 +# Test that all our prerequisites are defined in the Build.PL.
    23.7 +
    23.8 +use strict;
    23.9 +
   23.10 +BEGIN {
   23.11 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   23.12 +	use English qw(-no_match_vars);
   23.13 +	$OUTPUT_AUTOFLUSH = 1;
   23.14 +	$WARNING = 1;
   23.15 +}
   23.16 +
   23.17 +my @MODULES = (
   23.18 +	'Test::Prereq::Build 1.037',
   23.19 +);
   23.20 +
   23.21 +# Load the testing modules
   23.22 +use Test::More;
   23.23 +foreach my $MODULE ( @MODULES ) {
   23.24 +	eval "use $MODULE";
   23.25 +	if ( $EVAL_ERROR ) {
   23.26 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" )
   23.27 +	}
   23.28 +}
   23.29 +
   23.30 +local $ENV{PERL_MM_USE_DEFAULT} = 1;
   23.31 +
   23.32 +diag('Takes a few minutes...');
   23.33 +
   23.34 +my @modules_skip = (
   23.35 +# Modules needed for prerequisites, not for this module
   23.36 +    # List here if needed.
   23.37 +);
   23.38 +
   23.39 +prereq_ok(5.008001, 'Check prerequisites', \@modules_skip);
   23.40 +
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/xt/author/version.t	Tue Aug 10 16:33:13 2010 -0600
    24.3 @@ -0,0 +1,29 @@
    24.4 +
    24.5 +#!/usr/bin/perl
    24.6 +
    24.7 +# Test that all modules have a version number.
    24.8 +
    24.9 +use strict;
   24.10 +
   24.11 +BEGIN {
   24.12 +	BAIL_OUT ('Perl version unacceptably old.') if ($] < 5.008001);
   24.13 +	use English qw(-no_match_vars);
   24.14 +	$OUTPUT_AUTOFLUSH = 1;
   24.15 +	$WARNING = 1;
   24.16 +}
   24.17 +
   24.18 +my @MODULES = (
   24.19 +	'Test::HasVersion 0.012',
   24.20 +);
   24.21 +
   24.22 +# Load the testing modules
   24.23 +use Test::More;
   24.24 +foreach my $MODULE ( @MODULES ) {
   24.25 +	eval "use $MODULE";
   24.26 +	if ( $EVAL_ERROR ) {
   24.27 +		BAIL_OUT( "Failed to load required release-testing module $MODULE" );
   24.28 +	}
   24.29 +}
   24.30 +
   24.31 +all_pm_version_ok();
   24.32 +
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/xt/settings/perlcritic.txt	Tue Aug 10 16:33:13 2010 -0600
    25.3 @@ -0,0 +1,37 @@
    25.4 +verbose = %f:%l:%c:\n %p: %m\n
    25.5 +theme = (core || more)
    25.6 +
    25.7 +[ControlStructures::ProhibitPostfixControls]
    25.8 +flowcontrol = warn die carp croak cluck confess goto exit throw return next
    25.9 +
   25.10 +[RegularExpressions::RequireExtendedFormatting]
   25.11 +minimum_regex_length_to_complain_about = 7
   25.12 +
   25.13 +[InputOutput::RequireCheckedSyscalls]
   25.14 +functions = :builtins
   25.15 +exclude_functions = print
   25.16 +
   25.17 +[Modules::PerlMinimumVersion]
   25.18 +version = 5.008003
   25.19 +
   25.20 +[ValuesAndExpressions::ProhibitMagicNumbers]
   25.21 +allowed_values = -1 0 1 2
   25.22 +
   25.23 +# Excluded because Moose builder subroutines get hit by this.
   25.24 +[Subroutines::ProhibitUnusedPrivateSubroutines]
   25.25 +private_name_regex = _(?!build_)\w+
   25.26 +
   25.27 +# Exclusions
   25.28 +# This one can be removed if keywords are used.
   25.29 +[-Miscellanea::RequireRcsKeywords]
   25.30 +
   25.31 +# Excluded because we filter out development versions.
   25.32 +[-ValuesAndExpressions::RequireConstantVersion]
   25.33 +
   25.34 +# I like to set up my own pod.
   25.35 +[-Documentation::RequirePodAtEnd]
   25.36 +[-Documentation::RequirePodSections]
   25.37 +
   25.38 +# No Emacs!
   25.39 +[-Editor::RequireEmacsFileVariables]
   25.40 +
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/xt/settings/perltidy.txt	Tue Aug 10 16:33:13 2010 -0600
    26.3 @@ -0,0 +1,39 @@
    26.4 +--backup-and-modify-in-place
    26.5 +--warning-output
    26.6 +--maximum-line-length=76
    26.7 +--indent-columns=4
    26.8 +--entab-leading-whitespace=4
    26.9 +# --check-syntax
   26.10 +# -perl-syntax-check-flags=-c
   26.11 +--continuation-indentation=2
   26.12 +--outdent-long-quotes
   26.13 +--outdent-long-lines
   26.14 +--outdent-labels
   26.15 +--paren-tightness=1
   26.16 +--square-bracket-tightness=1
   26.17 +--block-brace-tightness=1
   26.18 +--space-for-semicolon
   26.19 +--add-semicolons
   26.20 +--delete-semicolons
   26.21 +--indent-spaced-block-comments
   26.22 +--minimum-space-to-comment=3
   26.23 +--fixed-position-side-comment=40
   26.24 +--closing-side-comments
   26.25 +--closing-side-comment-interval=12
   26.26 +--static-block-comments
   26.27 +# --static-block-comment-prefix=^#{2,}[^\s#]
   26.28 +--static-side-comments
   26.29 +--format-skipping
   26.30 +--cuddled-else
   26.31 +--no-opening-brace-on-new-line
   26.32 +--vertical-tightness=1
   26.33 +--stack-opening-tokens
   26.34 +--stack-closing-tokens
   26.35 +--maximum-fields-per-table=8
   26.36 +--comma-arrow-breakpoints=0
   26.37 +--blanks-before-comments
   26.38 +--blanks-before-subs
   26.39 +--blanks-before-blocks
   26.40 +--long-block-line-count=4
   26.41 +--maximum-consecutive-blank-lines=5
   26.42 +