Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minil migrate

  • Loading branch information...
commit 518e95ff708d4a288e61024f6708fee8b56863f3 1 parent f494c9c
@kazeburo authored
View
7 .gitignore
@@ -13,7 +13,12 @@ pm_to_blib
blib/
META.yml
MYMETA.*
-META.json
META.yml
README
*~
+/Module-Build-Pluggable-CPANfile-*
+/.build
+/_build_params
+!Build/
+!META.json
+!LICENSE
View
2  .shipit
@@ -1,2 +0,0 @@
-steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
-git.push_to=origin
View
80 Build.PL
@@ -1,34 +1,70 @@
+# =========================================================================
+# THIS FILE IS AUTOMATICALLY GENERATED BY MINILLA.
+# DO NOT EDIT DIRECTLY.
+# =========================================================================
+
+use 5.008_001;
+
use strict;
use warnings;
+use utf8;
+
use Module::Build;
+use File::Basename;
+use File::Spec;
+use CPAN::Meta;
+use CPAN::Meta::Prereqs;
-my $build = Module::Build->new(
+my %args = (
license => 'perl',
dynamic_config => 0,
- build_requires => {
- 'Test::More' => '0.98',
- 'Test::Requires' => 0,
- 'Capture::Tiny' => '0.21'
- },
- configure_requires => { 'Module::Build' => '0.38' },
- requires => {
- perl => '5.008005',
- 'version' => '0.99',
- 'parent' => '0',
- 'Module::Build::Pluggable' => '0.05',
- 'Module::CPANfile' => '0.9010',
- 'List::Util' => '1.14'
+ configure_requires => {
+ 'Module::Build' => 0.38,
},
- no_index => { 'directory' => [ 'inc' ] },
- name => 'Module-Build-Pluggable-CPANfile',
- module_name => 'Module::Build::Pluggable::CPANfile',
+ name => 'Module-Build-Pluggable-CPANfile',
+ module_name => 'Module::Build::Pluggable::CPANfile',
+ allow_pureperl => 0,
- test_files => (-d '.git' || $ENV{RELEASE_TESTING}) ? 't/ xt/' : 't/',
+ script_files => [glob('script/*'), glob('bin/*')],
+ c_source => [qw()],
+ PL_files => {},
+
+ test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/',
recursive_test_files => 1,
-
- create_readme => 1,
- create_license => 1,
);
-$build->create_build_script();
+if (-d 'share') {
+ $args{share_dir} = 'share';
+}
+
+my $builder = Module::Build->subclass(
+ class => 'MyBuilder',
+ code => q{
+ sub ACTION_distmeta {
+ die "Do not run distmeta. Install Minilla and `minil install` instead.\n";
+ }
+ sub ACTION_installdeps {
+ die "Do not run installdeps. Run `cpanm --installdeps .` instead.\n";
+ }
+ }
+)->new(%args);
+$builder->create_build_script();
+
+my $mbmeta = CPAN::Meta->load_file('MYMETA.json');
+my $meta = CPAN::Meta->load_file('META.json');
+my $prereqs_hash = CPAN::Meta::Prereqs->new(
+ $meta->prereqs
+)->with_merged_prereqs(
+ CPAN::Meta::Prereqs->new($mbmeta->prereqs)
+)->as_string_hash;
+my $mymeta = CPAN::Meta->new(
+ {
+ %{$meta->as_struct},
+ prereqs => $prereqs_hash
+ }
+);
+print "Merging cpanfile prereqs to MYMETA.yml\n";
+$mymeta->save('MYMETA.yml', { version => 1.4 });
+print "Merging cpanfile prereqs to MYMETA.json\n";
+$mymeta->save('MYMETA.json', { version => 2 });
View
2  Changes
@@ -1,5 +1,7 @@
Revision history for Perl extension Module::Build::Pluggable::CPANfile
+{{$NEXT}}
+
0.04 Mon Apr 8 11:29:10 2013
- fixed test. Previous version failed test on Windows platform.
View
17 MANIFEST
@@ -1,17 +0,0 @@
-.travis.yml
-Build.PL
-Changes
-lib/Module/Build/Pluggable/CPANfile.pm
-LICENSE
-MANIFEST This list of files
-META.json
-META.yml
-README
-t/00_compile.t
-t/01_basic.t
-xt/01_podspell.t
-xt/02_perlcritic.t
-xt/03_pod.t
-xt/04_minimum_version.t
-xt/05_cpan_meta.t
-xt/06_meta_author.t
View
93 MANIFEST.SKIP
@@ -1,93 +0,0 @@
-
-#!start included /Users/kazeburo/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2/ExtUtils/MANIFEST.SKIP
-# Avoid version control files.
-\bRCS\b
-\bCVS\b
-\bSCCS\b
-,v$
-\B\.svn\b
-\B\.git\b
-\B\.gitignore\b
-\b_darcs\b
-\B\.cvsignore$
-
-# Avoid VMS specific MakeMaker generated files
-\bDescrip.MMS$
-\bDESCRIP.MMS$
-\bdescrip.mms$
-
-# Avoid Makemaker generated and utility files.
-\bMANIFEST\.bak
-\bMakefile$
-\bblib/
-\bMakeMaker-\d
-\bpm_to_blib\.ts$
-\bpm_to_blib$
-\bblibdirs\.ts$ # 6.18 through 6.25 generated this
-
-# Avoid Module::Build generated and utility files.
-\bBuild$
-\b_build/
-\bBuild.bat$
-\bBuild.COM$
-\bBUILD.COM$
-\bbuild.com$
-
-# Avoid temp and backup files.
-~$
-\.old$
-\#$
-\b\.#
-\.bak$
-\.tmp$
-\.#
-\.rej$
-
-# Avoid OS-specific files/dirs
-# Mac OSX metadata
-\B\.DS_Store
-# Mac OSX SMB mount metadata files
-\B\._
-
-# Avoid Devel::Cover and Devel::CoverX::Covered files.
-\bcover_db\b
-\bcovered\b
-
-# Avoid MYMETA files
-^MYMETA\.
-#!end included /Users/kazeburo/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2/ExtUtils/MANIFEST.SKIP
-
-^\.git/
-\bRCS\b
-\bCVS\b
-^MANIFEST\.
-^Makefile$
-~$
-^#
-\.old$
-^blib/
-^pm_to_blib
-^MakeMaker-\d
-^[^/]+\.gz$
-\.cvsignore
-^t/perlcritic
-^tools/
-\.svn/
-^[^/]+\.yaml$
-^\.shipit$
-\.sw[po]$
-^Build$
-^ppport.h$
-^xshelper.h$
-cover_db
-nytprof
-perltidy.ERR$
-^README.pod$
-^README.mkdn$
-^tags$
-^Module-Build-Pluggable-CPANfile-
-^MYMETA\.
-\b_build
-^MANIFEST\.SKIP
-\B\.gitignore
-\.bak$
View
74 META.json
@@ -0,0 +1,74 @@
+{
+ "abstract" : "Include cpanfile",
+ "author" : [
+ "Masahiro Nagano <kazeburo@gmail.com>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "Minilla/v0.6.4, CPAN::Meta::Converter version 2.130880",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Module-Build-Pluggable-CPANfile",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "xt",
+ "inc",
+ "share",
+ "eg",
+ "examples",
+ "author"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "Capture::Tiny" : "0.21",
+ "Test::More" : "0.98",
+ "Test::Requires" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "CPAN::Meta" : "0",
+ "CPAN::Meta::Prereqs" : "0",
+ "Module::Build" : "0.38"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Test::CPAN::Meta" : "0",
+ "Test::MinimumVersion" : "0.10108",
+ "Test::Pod" : "1.41",
+ "Test::Spellunker" : "v0.2.7"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "List::Util" : "1.14",
+ "Module::Build::Pluggable" : "0.05",
+ "Module::CPANfile" : "0.9010",
+ "parent" : "0",
+ "perl" : "5.008005",
+ "version" : "0.99"
+ }
+ }
+ },
+ "release_status" : "unstable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/kazeburo/Module-Build-Pluggable-CPANfile/issues"
+ },
+ "homepage" : "https://github.com/kazeburo/Module-Build-Pluggable-CPANfile",
+ "repository" : {
+ "type" : "git",
+ "url" : "git://github.com/kazeburo/Module-Build-Pluggable-CPANfile.git",
+ "web" : "https://github.com/kazeburo/Module-Build-Pluggable-CPANfile"
+ }
+ },
+ "version" : "0.04"
+}
View
45 README.md
@@ -0,0 +1,45 @@
+# NAME
+
+Module::Build::Pluggable::CPANfile - Include cpanfile
+
+# SYNOPSIS
+
+ # cpanfile
+ requires 'Plack', 0.9;
+ on test => sub {
+ requires 'Test::Warn';
+ };
+
+
+ # Build.PL
+ use Module::Build::Pluggable (
+ 'CPANfile'
+ );
+
+
+ my $builder = Module::Build::Pluggable->new(
+ ... # normal M::B args. but not required prereqs
+ );
+ $builder->create_build_script();
+
+# DESCRIPTION
+
+Module::Build::Pluggable::CPANfile is plugin for Module::Build::Pluggable to include dependencies from cpanfile into meta files.
+This modules is [Module::Install::CPANfile](http://search.cpan.org/perldoc?Module::Install::CPANfile) for Module::Build
+
+__THIS IS A DEVELOPMENT RELEASE. API MAY CHANGE WITHOUT NOTICE__.
+
+# AUTHOR
+
+Masahiro Nagano <kazeburo@gmail.com>
+
+# SEE ALSO
+
+[Module::Install::CPANfile](http://search.cpan.org/perldoc?Module::Install::CPANfile), [cpanfile](http://search.cpan.org/perldoc?cpanfile), [Module::Build::Pluggable](http://search.cpan.org/perldoc?Module::Build::Pluggable)
+
+# LICENSE
+
+Copyright (C) Masahiro Nagano
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
View
1  README.pod
View
11 cpanfile
@@ -0,0 +1,11 @@
+requires 'List::Util', '1.14';
+requires 'Module::Build::Pluggable', '0.05';
+requires 'Module::CPANfile', '0.9010';
+requires 'parent';
+requires 'version', '0.99';
+
+on test => sub {
+ requires 'Capture::Tiny', '0.21';
+ requires 'Test::More', '0.98';
+ requires 'Test::Requires';
+};
View
62 xt/01_podspell.t
@@ -1,62 +0,0 @@
-use strict;
-use Test::More;
-eval q{ use Test::Spelling };
-plan skip_all => "Test::Spelling is not installed." if $@;
-add_stopwords(map { split /[\s\:\-]/ } <DATA>);
-$ENV{LANG} = 'C';
-my $spell_cmd;
-foreach my $path (split(/:/, $ENV{PATH})) {
- -x "$path/spell" and $spell_cmd="spell", last;
- -x "$path/ispell" and $spell_cmd="ispell -l", last;
- -x "$path/aspell" and $spell_cmd="aspell list", last;
-}
-plan skip_all => "no spell/ispell/aspell" unless $spell_cmd;
-
-set_spell_cmd($spell_cmd);
-all_pod_files_spelling_ok('lib');
-__DATA__
-Masahiro Nagano
-Module::Build::Pluggable::CPANfile
-kazeburo
-KZBRKZBR
-GMAIL
-COM
-Tatsuhiko
-Miyagawa
-Kazuhiro
-Osawa
-lestrrat
-typester
-cho45
-charsbar
-coji
-clouder
-gunyarakun
-hio_d
-hirose31
-ikebe
-kan
-kazeburo
-daisuke
-maki
-TODO
-API
-URL
-URI
-db
-TTerse
-irc
-org
-CSS
-Amon
-Tokuhiro
-Matsuno
-Svn
-svn
-diff
-Gosuke
-Miyashita
-mysqldiff
-mmm
-JSON
-cpanfile
View
13 xt/02_perlcritic.t
@@ -1,13 +0,0 @@
-use strict;
-use Test::More;
-eval q{
- use Test::Perl::Critic 1.02 -exclude => [
- 'Subroutines::ProhibitSubroutinePrototypes',
- 'Subroutines::ProhibitExplicitReturnUndef',
- 'TestingAndDebugging::ProhibitNoStrict',
- 'ControlStructures::ProhibitMutatingListFunctions',
- 'InputOutput::ProhibitInteractiveTest',
- ]
-};
-plan skip_all => "Test::Perl::Critic 1.02+ is not installed." if $@;
-all_critic_ok('lib');
View
4 xt/03_pod.t
@@ -1,4 +0,0 @@
-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();
View
4 xt/04_minimum_version.t
@@ -1,4 +0,0 @@
-use Test::More;
-eval "use Test::MinimumVersion 0.101080";
-plan skip_all => "Test::Minimumversion required for testing perl minimum version" if $@;
-all_minimum_version_from_metayml_ok();
View
5 xt/05_cpan_meta.t
@@ -1,5 +0,0 @@
-use Test::More;
-eval "use Test::CPAN::Meta";
-plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-plan skip_all => "There is no META.yml" unless -f "META.yml";
-meta_yaml_ok();
View
11 xt/06_meta_author.t
@@ -1,11 +0,0 @@
-use strict;
-use Test::More;
-eval "use Parse::CPAN::Meta";
-plan skip_all => "Parse::CPAN::Meta required for testing META.yml" unless eval "use Parse::CPAN::Meta; 1;";
-plan skip_all => "There is no META.yml" unless -f "META.yml";
-
-my $meta = Parse::CPAN::Meta->load_file('META.yml');
-isnt($meta->{author}->[0], 'unknown', 'author info');
-cmp_ok($meta->{'build_requires'}->{'Test::More'}, '>=', '0.98');
-ok($meta->{'requires'}->{'perl'}, 'metayml_declares_perl_version');
-done_testing;
Please sign in to comment.
Something went wrong with that request. Please try again.