[libmodule-package-rdf-perl] 24/64: prepare for release

Jonas Smedegaard js at alioth.debian.org
Fri Aug 9 22:11:55 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libmodule-package-rdf-perl.

commit 5193bc84bf8ec6920a99fe080527999abf1bb20a
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date:   Tue Sep 25 10:49:14 2012 +0100

    prepare for release
    
    --HG--
    branch : Module-Package-RDF
---
 bin/mkdist                |   69 +++++++++++++++++++++++----------------------
 lib/App/mkdist.pm         |   52 +++++++++++++++++++---------------
 xt/02pod_coverage.config  |    1 +
 xt/02pod_coverage.t       |   18 +++++++++---
 xt/03meta_uptodate.config |    1 +
 xt/03meta_uptodate.t      |    4 ++-
 xt/04eol.t                |    2 +-
 xt/05tabs.t               |    2 ++
 xt/06versions.t           |   18 ++++++++++++
 9 files changed, 104 insertions(+), 63 deletions(-)

diff --git a/bin/mkdist b/bin/mkdist
index f125d58..79dee34 100755
--- a/bin/mkdist
+++ b/bin/mkdist
@@ -20,7 +20,7 @@ GetOptions(\%options,
 	'package_flavour=s',
 	'use|M=s@',
 	'version|v',
-	);
+);
 
 $options{dist_maker} = 'App::mkdist';
 
@@ -31,37 +31,37 @@ mkdist [options] dist_name1 dist_name2 ...
 
 Options:
 
-  --abstract=S, -A=S       Short description for distribution
-  --author k=v, -a k=v     Set author data.
-  --backpan=S              URL for archives.
-  --copyright k=v, -c k=v  Set copyright data.
-  --destination=S, -d=S    Output directory.
-  --dist_maker=S, -D=S     Class to use to create distribution.
-  --help, -h               Show this help.
-  --licence_class=S, -l=S  Perl class with licensing data.
-  --package_flavour=S      use Module::Package::RDF::$flavour.
-  --use S, -M=S            Distribution should use these modules.
-  --version=S, -v=S        Initial version number.
+	--abstract=S, -A=S       Short description for distribution
+	--author k=v, -a k=v     Set author data.
+	--backpan=S              URL for archives.
+	--copyright k=v, -c k=v  Set copyright data.
+	--destination=S, -d=S    Output directory.
+	--dist_maker=S, -D=S     Class to use to create distribution.
+	--help, -h               Show this help.
+	--licence_class=S, -l=S  Perl class with licensing data.
+	--package_flavour=S      use Module::Package::RDF::$flavour.
+	--use S, -M=S            Distribution should use these modules.
+	--version=S, -v=S        Initial version number.
 
 Author data keys:
 
-  cpanid                Author's CPAN ID
-  mbox                  Author's email address
-  name                  Author's full name
-  
+	cpanid            Author's CPAN ID
+	mbox              Author's email address
+	name              Author's full name
+
 Copyright data keys:
 
-  holder                Copyright holder
-  year                  Copyright year
+	holder            Copyright holder
+	year              Copyright year
 
 The values of "use" are interpreted thusly:
 
-  * 'boolean' uses 'boolean' and avoids defining constants for true and false.
-  * 'common_sense' uses 'common::sense' instead of 'strict' and 'warnings'.
-  * 'namespace_clean' uses 'namespace::clean'.
-  * 'moose' (lowercase) uses 'Moose' and 'namespace::clean'.
-  * Other values are interpreted as the names of modules to use.
-  * Perl version defaults to 5.010.
+	* 'boolean' avoids defining constants for true and false.
+	* 'common_sense' uses common::sense instead of strict/warnings.
+	* 'namespace_clean' uses namespace::clean.
+	* 'moose' (lowercase) uses Moose and namespace::clean.
+	* Other values are interpreted as the names of modules to use.
+	* Perl version defaults to 5.010.
 
 license_class defaults to "Software::License::Perl_5".
 
@@ -72,16 +72,17 @@ package_flavour defaults to 'standard'.
 
 Example:
 
-  mkdist --author name="Toby Inkster" \
-         --author cpanid="tobyink" \
-         --copyright year=2010 \
-         --abstract="does something useful" \
-         --use autodie \
-         --use boolean \
-         --use common_sense \
-         --use DateTime \
-         --use 5.008003 \
-         "Local::Example::Useful"
+	mkdist \
+		--author name="Toby Inkster" \
+		--author cpanid="tobyink" \
+		--copyright year=2010 \
+		--abstract="does something useful" \
+		--use autodie \
+		--use boolean \
+		--use common_sense \
+		--use DateTime \
+		--use 5.008003 \
+		"Local::Example::Useful"
 
 Frequently used settings can be kept in ~/.mkdist
 
diff --git a/lib/App/mkdist.pm b/lib/App/mkdist.pm
index 76f0f9f..bff5676 100644
--- a/lib/App/mkdist.pm
+++ b/lib/App/mkdist.pm
@@ -139,7 +139,7 @@ sub set_defaults
 	$self->{copyright}{holder} ||= $self->{author}{name};
 	$self->{copyright}{year}   ||= DateTime->now->year;
 	
-	$self->{licence_class} ||= 'Software::License::Perl_5'; 
+	$self->{licence_class} ||= 'Software::License::Perl_5';
 	eval sprintf('use %s;', $self->{licence_class});
 	$self->{licence} = $self->{licence_class}->new({
 		year    => $self->{copyright}{year},
@@ -159,9 +159,10 @@ sub set_defaults
 		
 		if (@mr)
 		{
-			$self->{requires} = sprintf(";\n\t:requires %s",
+			$self->{requires} = sprintf(
+				";\n\t:requires %s",
 				(join ' , ', (map { my ($pkg, $ver) = split /\s+/, $_; ($ver =~ /^v?[0-9\._]+/) ? "p`$pkg $ver`" : "p`$pkg`" } @mr))
-				);
+			);
 		}
 		else
 		{
@@ -170,29 +171,29 @@ sub set_defaults
 	}
 	
 	$self->{pragmas} ||= join "\n", do {
-			my @pragmas = grep { /^5\.[0-9_]+$/ } keys %{$self->{use}};
-			push @pragmas, '5.010' unless @pragmas;
-			push @pragmas, 'autodie' if $self->{use}{autodie};
-			push @pragmas, ($self->{use}{boolean}) ?  'boolean' : 'constant { false => 0, true => 1 }';
-			push @pragmas, ($self->{use}{common_sense} ? ('common::sense') : ('strict','warnings'));
-			push @pragmas, 'utf8';
-			push @pragmas, 'Moose' if $self->{use}{moose};
-			map { sprintf('use %s;', $_) } @pragmas;
-		};
+		my @pragmas = grep { /^5\.[0-9_]+$/ } keys %{$self->{use}};
+		push @pragmas, '5.010' unless @pragmas;
+		push @pragmas, 'autodie' if $self->{use}{autodie};
+		push @pragmas, ($self->{use}{boolean}) ?  'boolean' : 'constant { false => 0, true => 1 }';
+		push @pragmas, ($self->{use}{common_sense} ? ('common::sense') : ('strict','warnings'));
+		push @pragmas, 'utf8';
+		push @pragmas, 'Moose' if $self->{use}{moose};
+		map { sprintf('use %s;', $_) } @pragmas;
+	};
 	
 	$self->{final_pragmas} ||= join "\n", do {
-			my @pragmas;
-			push @pragmas, 'namespace::clean' if $self->{use}{namespace_clean} || $self->{use}{moose};
-			map { sprintf('use %s;', $_) } @pragmas;
-		};
-
+		my @pragmas;
+		push @pragmas, 'namespace::clean' if $self->{use}{namespace_clean} || $self->{use}{moose};
+		map { sprintf('use %s;', $_) } @pragmas;
+	};
+	
 	$self->{final_code} ||= join "\n", do {
-			my @lines;
-			push @lines, '__PACKAGE__->meta->make_immutable;' if $self->{use}{moose};
-			push @lines, 'true;';
-			@lines;
-		};
-		
+		my @lines;
+		push @lines, '__PACKAGE__->meta->make_immutable;' if $self->{use}{moose};
+		push @lines, 'true;';
+		@lines;
+	};
+	
 	foreach (qw(pragmas final_pragmas includes))
 	{
 		if (ref $self->{$_} eq 'ARRAY')
@@ -207,6 +208,7 @@ sub create_module
 	my ($self) = @_;
 	
 	$self->_iofile( $self->{module_filename} )->print( $self->_fill_in_template('module') );
+	return;
 }
 
 sub create_makefile_pl
@@ -214,6 +216,7 @@ sub create_makefile_pl
 	my ($self) = @_;
 	
 	$self->_iofile('Makefile.PL')->print($self->_fill_in_template('Makefile.PL'));
+	return;
 }
 
 sub create_metadata
@@ -222,6 +225,7 @@ sub create_metadata
 	
 	$self->_iofile($_)->print($self->_fill_in_template($_))
 		foreach grep { m#^meta/# } $self->_get_template_names;
+	return;
 }
 
 sub create_tests
@@ -230,6 +234,7 @@ sub create_tests
 	
 	$self->_iofile($_)->print($self->_fill_in_template($_))
 		foreach grep { m#^t/# } $self->_get_template_names;
+	return;
 }
 
 sub create_author_tests
@@ -242,6 +247,7 @@ sub create_author_tests
 	my $xtdir = io->catdir($ENV{HOME}, qw(perl5 xt));
 	$self->_iofile("xt/".$_->filename)->print(scalar $_->slurp)
 		foreach grep { $_->filename =~ /\.t$/ } $xtdir->all;
+	return;
 }
 
 1;
diff --git a/xt/02pod_coverage.config b/xt/02pod_coverage.config
new file mode 100644
index 0000000..d82a714
--- /dev/null
+++ b/xt/02pod_coverage.config
@@ -0,0 +1 @@
+{"skip_all":"meh"}
diff --git a/xt/02pod_coverage.t b/xt/02pod_coverage.t
index e5f6aa8..4c1c4d4 100644
--- a/xt/02pod_coverage.t
+++ b/xt/02pod_coverage.t
@@ -1,8 +1,18 @@
+use XT::Util;
 use Test::More;
 use Test::Pod::Coverage;
 
-my @modules = qw(App::mkdist);
-pod_coverage_ok($_, "$_ is covered")
-	foreach @modules;
-done_testing(scalar @modules);
+plan skip_all => __CONFIG__->{skip_all}
+	if __CONFIG__->{skip_all};
+
+if ( __CONFIG__->{modules} )
+{
+	my @modules = @{ __CONFIG__->{modules} };
+	pod_coverage_ok($_, "$_ is covered") for @modules;
+	done_testing(scalar @modules);
+}
+else
+{
+	all_pod_coverage_ok();
+}
 
diff --git a/xt/03meta_uptodate.config b/xt/03meta_uptodate.config
new file mode 100644
index 0000000..f005b6c
--- /dev/null
+++ b/xt/03meta_uptodate.config
@@ -0,0 +1 @@
+{"package":"Module-Package-RDF"}
diff --git a/xt/03meta_uptodate.t b/xt/03meta_uptodate.t
index 97f2119..9a370c6 100644
--- a/xt/03meta_uptodate.t
+++ b/xt/03meta_uptodate.t
@@ -1,3 +1,5 @@
+use XT::Util;
 use Test::More tests => 1;
 use Test::RDF::DOAP::Version;
-doap_version_ok('Module-Package-RDF', 'Module::Package::RDF');
+doap_version_ok(__CONFIG__->{package}, __CONFIG__->{version_from});
+
diff --git a/xt/04eol.t b/xt/04eol.t
index 96aa016..3877ffa 100644
--- a/xt/04eol.t
+++ b/xt/04eol.t
@@ -1,2 +1,2 @@
 use Test::EOL;
-all_perl_files_ok();
\ No newline at end of file
+all_perl_files_ok();
diff --git a/xt/05tabs.t b/xt/05tabs.t
new file mode 100644
index 0000000..3421adf
--- /dev/null
+++ b/xt/05tabs.t
@@ -0,0 +1,2 @@
+use Test::Tabs;
+all_perl_files_ok();
diff --git a/xt/06versions.t b/xt/06versions.t
new file mode 100644
index 0000000..2f95fcc
--- /dev/null
+++ b/xt/06versions.t
@@ -0,0 +1,18 @@
+use XT::Util;
+use Test::More;
+use Test::HasVersion;
+
+plan skip_all => __CONFIG__->{skip_all}
+	if __CONFIG__->{skip_all};
+
+if ( __CONFIG__->{modules} )
+{
+	my @modules = @{ __CONFIG__->{modules} };
+	pm_version_ok($_, "$_ is covered") for @modules;
+	done_testing(scalar @modules);
+}
+else
+{
+	all_pm_version_ok();
+}
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmodule-package-rdf-perl.git



More information about the Pkg-perl-cvs-commits mailing list