[libmodule-package-rdf-perl] 05/64: Misc

Jonas Smedegaard js at alioth.debian.org
Fri Aug 9 22:11:50 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 e069e369f59fc288c272bc9466cfc887198fa2e6
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date:   Mon Nov 21 13:46:09 2011 +0000

    Misc
    
    --HG--
    branch : Module-Package-RDF
    extra : convert_revision : svn%3A3fe8e991-6959-4966-b76d-b07eca2b6e37/Module-Package-RDF%401135
---
 TODO                             |    2 +-
 bin/mkdist                       |    9 ++++++---
 lib/Module/Package/Dist/RDF.pm   |    6 +++---
 lib/Module/Package/RDF.pm        |    4 ++--
 lib/Module/Package/RDF/Create.pm |   16 ++++++++--------
 meta/changes.ttl                 |   12 ++++++++++++
 6 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/TODO b/TODO
index bba270d..0f24532 100644
--- a/TODO
+++ b/TODO
@@ -1,2 +1,2 @@
 - Document build process.
-- Create a skeleton package directory for other people to use.
+- Split mkdist into a separate release.
diff --git a/bin/mkdist b/bin/mkdist
index 2949712..adc4aa8 100755
--- a/bin/mkdist
+++ b/bin/mkdist
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 
 use Getopt::ArgvFile
-        home => 1,
-        current => 1,
-        resolveEnvVars => 1;
+	home => 1,
+	current => 1,
+	resolveEnvVars => 1;
 use Getopt::Long qw[:config permute bundling no_ignore_case no_auto_abbrev];
 
 my %options;
@@ -54,6 +54,7 @@ Copyright data keys:
 
 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'.
@@ -71,6 +72,8 @@ Example:
          --author cpanid="tobyink" \
          --copyright year=2010 \
          --abstract="does something useful" \
+         --use autodie \
+         --use boolean \
          --use common_sense \
          --use DateTime \
          --use 5.008003 \
diff --git a/lib/Module/Package/Dist/RDF.pm b/lib/Module/Package/Dist/RDF.pm
index 5667de9..115868c 100644
--- a/lib/Module/Package/Dist/RDF.pm
+++ b/lib/Module/Package/Dist/RDF.pm
@@ -1,14 +1,14 @@
 package Module::Package::Dist::RDF;
 
 use 5.008003;
-our $VERSION = '0.001';
+our $VERSION = '0.004';
 
 package Module::Package::Dist::RDF::standard;
 
 use 5.008003;
 use strict;
 use parent qw[Module::Package::Dist];
-our $VERSION = '0.001';
+our $VERSION = '0.004';
 
 sub _main
 {
@@ -17,4 +17,4 @@ sub _main
 	$self->mi->auto_install;
 }
 
-1;
\ No newline at end of file
+1;
diff --git a/lib/Module/Package/RDF.pm b/lib/Module/Package/RDF.pm
index fc93d86..1bcf575 100644
--- a/lib/Module/Package/RDF.pm
+++ b/lib/Module/Package/RDF.pm
@@ -1,7 +1,7 @@
 package Module::Package::RDF;
 
 use 5.008003;
-our $VERSION = '0.003';
+our $VERSION = '0.004';
 
 package Module::Package::RDF::standard;
 
@@ -20,7 +20,7 @@ use Module::Install::DOAPChangeSets 0.201 ();
 use Module::Install::TrustMetaYml 0.001 ();
 use Log::Log4perl 0 qw(:easy);
 
-our $VERSION = '0.003';
+our $VERSION = '0.004';
 
 use Moo;
 extends 'Module::Package::Plugin';
diff --git a/lib/Module/Package/RDF/Create.pm b/lib/Module/Package/RDF/Create.pm
index f8477a8..e962a41 100644
--- a/lib/Module/Package/RDF/Create.pm
+++ b/lib/Module/Package/RDF/Create.pm
@@ -4,9 +4,7 @@ use common::sense;
 
 BEGIN {
 	$Module::Package::RDF::Create::AUTHORITY = 'cpan:TOBYINK';
-}
-BEGIN {
-	$Module::Package::RDF::Create::VERSION   = '0.003';
+	$Module::Package::RDF::Create::VERSION   = '0.004';
 }
 
 use Carp;
@@ -144,11 +142,14 @@ sub set_defaults
 		holder  => $self->{copyright}{holder},
 		});
 	
-	$self->{includes} = [grep {!/^(common_sense|strict|warnings|moose|5\.[0-9_]+|namespace_clean)$/} keys %{$self->{use}}];
+	# 'includes' is 'use' minus some modules we handle specially
+	$self->{includes} = [grep {!/^(autodie|boolean|common_sense|strict|warnings|moose|5\.[0-9_]+|namespace_clean)$/} keys %{$self->{use}}];
 	
 	{
 		my @mr = @{ $self->{includes} };
 		push @mr, 'Moose'            if $self->{use}{moose};
+		push @mr, 'autodie'          if $self->{use}{autodie};
+		push @mr, 'boolean'          if $self->{use}{boolean};
 		push @mr, 'common::sense'    if $self->{use}{common_sense};
 		push @mr, 'namespace::clean' if $self->{use}{namespace_clean}
 		                             || $self->{use}{moose};
@@ -168,8 +169,9 @@ 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, 'constant { FALSE => 0, TRUE => 1 }';
 			push @pragmas, 'utf8';
 			push @pragmas, 'Moose' if $self->{use}{moose};
 			map { sprintf('use %s;', $_) } @pragmas;
@@ -184,7 +186,7 @@ sub set_defaults
 	$self->{final_code} ||= join "\n", do {
 			my @lines;
 			push @lines, '__PACKAGE__->meta->make_immutable;' if $self->{use}{moose};
-			push @lines, 'TRUE;';
+			push @lines, 'true;';
 			@lines;
 		};
 		
@@ -307,8 +309,6 @@ package {$module_name};
 
 BEGIN \{
 	${$module_name}::AUTHORITY = 'cpan:{uc $author->{cpanid}}';
-\}
-BEGIN \{
 	${$module_name}::VERSION   = '{$version}';
 \}
 
diff --git a/meta/changes.ttl b/meta/changes.ttl
index 8c794f1..6126b1b 100644
--- a/meta/changes.ttl
+++ b/meta/changes.ttl
@@ -43,3 +43,15 @@ my:v_0-003
 		dcs:item   [ a dcs:Update ; rdfs:label "use Module::Package 0.30"@en ] ;
 		dcs:item   [ a dcs:Bugfix ; rdfs:label "Module::Package::Dist::RDF::standard uses Meta::Install::TrustMetaYml - this resolves some dependency issues with resultant packages."@en ] ;
 		] .
+
+my:project :release my:v_0-004 .
+my:v_0-004
+	a               :Version ;
+	dc:issued       "2011-11-21"^^xsd:date ;
+	:revision       "0.004"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Module-Package-RDF-0.004.tar.gz> ;
+	dcs:changeset [
+		dcs:versus my:v_0-003 ;
+		dcs:item   [ a dcs:Bugfix ; rdfs:label "Module::Package::RDF::Create now handles '--use boolean' and '--use autodie' specially."@en ] ;
+		dcs:item   [ a dcs:Documentation ; rdfs:label "The 'mkdist' functionality should be split into a different release."@en ] ;
+		] .

-- 
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