[libmodule-install-trustmetayml-perl] 01/24: My packaging stuff
Jonas Smedegaard
js at alioth.debian.org
Fri Aug 9 15:18:38 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libmodule-install-trustmetayml-perl.
commit 15fba1aa5df7ecfd4a9a734de0adc22ee2771111
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Fri Oct 7 00:14:17 2011 +0000
My packaging stuff
--HG--
branch : Module-Install-TrustMetaYml
extra : convert_revision : svn%3A3fe8e991-6959-4966-b76d-b07eca2b6e37/Module-Install-TrustMetaYml%40956
---
Makefile.PL | 1 +
Module-Install-TrustMetaYml-0.001.tar.gz | Bin 0 -> 44295 bytes
lib/Module/Install/TrustMetaYml.pm | 115 ++++++++++++++++++++++++++++++
meta/changes.ttl | 17 +++++
meta/doap.ttl | 23 ++++++
meta/makefile.ttl | 13 ++++
t/01basic.t | 3 +
xt/01pod.t | 5 ++
xt/02pod_coverage.t | 8 +++
xt/03meta_uptodate.t | 4 ++
xt/04eol.t | 2 +
11 files changed, 191 insertions(+)
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..e7f29c8
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1 @@
+use inc::Module::Package 'RDF:standard 0.003';
diff --git a/Module-Install-TrustMetaYml-0.001.tar.gz b/Module-Install-TrustMetaYml-0.001.tar.gz
new file mode 100644
index 0000000..6a95bc0
Binary files /dev/null and b/Module-Install-TrustMetaYml-0.001.tar.gz differ
diff --git a/lib/Module/Install/TrustMetaYml.pm b/lib/Module/Install/TrustMetaYml.pm
new file mode 100644
index 0000000..571bef9
--- /dev/null
+++ b/lib/Module/Install/TrustMetaYml.pm
@@ -0,0 +1,115 @@
+package Module::Install::TrustMetaYml;
+
+use 5.008;
+use constant { FALSE => 0, TRUE => 1 };
+use strict;
+use utf8;
+
+BEGIN {
+ $Module::Install::TrustMetaYml::AUTHORITY = 'cpan:TOBYINK';
+}
+BEGIN {
+ $Module::Install::TrustMetaYml::VERSION = '0.001';
+}
+
+use base qw(Module::Install::Base);
+
+sub trust_meta_yml
+{
+ my ($self, $where) = @_;
+ $where ||= 'META.yml';
+
+ $self->perl_version('5.006') unless defined $self->perl_version;
+
+ $self->include_deps('YAML::Tiny', 0);
+ return $self if $self->is_admin;
+
+ require YAML::Tiny;
+ my $data = YAML::Tiny::LoadFile($where);
+
+ $self->perl_version($data->{requires}{perl} || '5.006');
+
+ KEY: foreach my $key (qw(requires recommends build_requires))
+ {
+ next KEY unless ref $data->{$key} eq 'HASH';
+ my %deps = %{$data->{$key}};
+ DEP: while (my ($pkg, $ver) = each %deps)
+ {
+ next if $pkg eq 'perl';
+ $self->$key($pkg, $ver);
+ }
+ }
+
+ return $self;
+}
+
+*trust_meta_yaml = \&trust_meta_yml;
+
+TRUE;
+
+__END__
+
+=head1 NAME
+
+Module::Install::TrustMetaYml - trusts META.yml list of dependencies
+
+=head1 SYNOPSIS
+
+In Makefile.PL:
+
+ trust_meta_yml;
+
+=head1 DESCRIPTION
+
+CPAN doesn't trust C<META.yml>'s list of dependencies for a module. Instead it
+expects C<Makefile.PL> run on the computer the package is being installed
+upon to generate its own list of dependencies (called C<MYMETA.yml> or
+C<MYMETA.json>).
+
+This module is a Module::Install plugin that generates C<MYMETA.yml> by simply
+passing through the dependencies from C<META.yml>.
+
+It does nothing when run from the module author's development copy.
+
+The module defines two functions which are aliases for each other:
+
+=over
+
+=item C<trust_meta_yml>
+
+=item C<trust_meta_yaml>
+
+=back
+
+=head1 BUGS
+
+Please report any bugs to
+L<http://rt.cpan.org/Dist/Display.html?Queue=Module-Install-TrustMetaYml>.
+
+=head1 SEE ALSO
+
+L<Module::Install>, L<Module::Package::RDF>.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink at cpan.orgE<gt>.
+
+=head1 CREDITS
+
+Thanks to Chris Williams (BINGOS), Ingy döt Net (INGY) and Florian Ragwitz (FLORA)
+for explaining the role of C<MYMETA.json>, and helping me figure out why mine
+weren't working.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2011 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
diff --git a/meta/changes.ttl b/meta/changes.ttl
new file mode 100644
index 0000000..9161adb
--- /dev/null
+++ b/meta/changes.ttl
@@ -0,0 +1,17 @@
+# This file acts as the project's changelog.
+
+ at prefix : <http://usefulinc.com/ns/doap#> .
+ at prefix dcs: <http://ontologi.es/doap-changeset#> .
+ at prefix dc: <http://purl.org/dc/terms/> .
+ at prefix dist: <http://purl.org/NET/cpan-uri/dist/Module-Install-TrustMetaYml/> .
+ at prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ at prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+dist:project :release dist:v_0-001 .
+dist:v_0-001
+ a :Version ;
+ dc:issued "2011-10-06"^^xsd:date ;
+ :revision "0.001"^^xsd:string ;
+ :file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Module-Install-TrustMetaYml-0.001.tar.gz> ;
+ rdfs:label "Initial release" .
+
diff --git a/meta/doap.ttl b/meta/doap.ttl
new file mode 100644
index 0000000..b24db07
--- /dev/null
+++ b/meta/doap.ttl
@@ -0,0 +1,23 @@
+# This file contains general metadata about the project.
+
+ at prefix : <http://usefulinc.com/ns/doap#> .
+ at prefix dc: <http://purl.org/dc/terms/> .
+ at prefix foaf: <http://xmlns.com/foaf/0.1/> .
+ at prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+ at prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://purl.org/NET/cpan-uri/dist/Module-Install-TrustMetaYml/project>
+ a :Project ;
+ :programming-language "Perl" ;
+ :name "Module-Install-TrustMetaYml" ;
+ :shortdesc "trusts META.yml list of dependencies" ;
+ :homepage <https://metacpan.org/release/Module-Install-TrustMetaYml> ;
+ :download-page <https://metacpan.org/release/Module-Install-TrustMetaYml> ;
+ :bug-database <http://rt.cpan.org/Dist/Display.html?Queue=Module-Install-TrustMetaYml> ;
+ :created "2011-10-04"^^xsd:date ;
+ :license <http://dev.perl.org/licenses/> ;
+ :developer [ a foaf:Person ; foaf:name "Toby Inkster" ; foaf:mbox <mailto:tobyink at cpan.org> ] .
+
+<http://dev.perl.org/licenses/>
+ dc:title "the same terms as the perl 5 programming language system itself" .
+
diff --git a/meta/makefile.ttl b/meta/makefile.ttl
new file mode 100644
index 0000000..132d8a8
--- /dev/null
+++ b/meta/makefile.ttl
@@ -0,0 +1,13 @@
+# This file provides instructions for packaging.
+
+ at prefix : <http://purl.org/NET/cpan-uri/terms#> .
+
+<http://purl.org/NET/cpan-uri/dist/Module-Install-TrustMetaYml/project>
+ :perl_version_from _:main ;
+ :version_from _:main ;
+ :readme_from _:main ;
+ :test_requires "Test::More 0.61" ;
+ :requires "common::sense" .
+
+_:main <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName> "lib/Module/Install/TrustMetaYml.pm" .
+
diff --git a/t/01basic.t b/t/01basic.t
new file mode 100644
index 0000000..8d3055d
--- /dev/null
+++ b/t/01basic.t
@@ -0,0 +1,3 @@
+use Test::More tests => 1;
+BEGIN { use_ok('Module::Install::TrustMetaYml') };
+
diff --git a/xt/01pod.t b/xt/01pod.t
new file mode 100644
index 0000000..92ba3f6
--- /dev/null
+++ b/xt/01pod.t
@@ -0,0 +1,5 @@
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
+
diff --git a/xt/02pod_coverage.t b/xt/02pod_coverage.t
new file mode 100644
index 0000000..e84fe9d
--- /dev/null
+++ b/xt/02pod_coverage.t
@@ -0,0 +1,8 @@
+use Test::More;
+use Test::Pod::Coverage;
+
+my @modules = qw(Module::Install::TrustMetaYml);
+pod_coverage_ok($_, "$_ is covered")
+ foreach @modules;
+done_testing(scalar @modules);
+
diff --git a/xt/03meta_uptodate.t b/xt/03meta_uptodate.t
new file mode 100644
index 0000000..9c444a3
--- /dev/null
+++ b/xt/03meta_uptodate.t
@@ -0,0 +1,4 @@
+use Test::More tests => 1;
+use Test::RDF::DOAP::Version;
+doap_version_ok('Module-Install-TrustMetaYml', 'Module::Install::TrustMetaYml');
+
diff --git a/xt/04eol.t b/xt/04eol.t
new file mode 100644
index 0000000..3877ffa
--- /dev/null
+++ b/xt/04eol.t
@@ -0,0 +1,2 @@
+use Test::EOL;
+all_perl_files_ok();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmodule-install-trustmetayml-perl.git
More information about the Pkg-perl-cvs-commits
mailing list