From: Karen Etheridge Date: Sat, 12 Jul 2014 23:06:05 +0000 (-0700) Subject: convert to Dist::Zilla, including careful tailoring of pod to preserve the funky... X-Git-Tag: v0.10-TRIAL~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FSub-Name.git;a=commitdiff_plain;h=54595ea863696d904b22754dc8902e52aa0fcdfa convert to Dist::Zilla, including careful tailoring of pod to preserve the funky copyright --- diff --git a/.gitignore b/.gitignore index 95f8865..b2c08c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,13 @@ -.* -!.gitignore -Name.* -!Name.xs -Makefile* -!Makefile.PL -META.yml -MYMETA.yml -MYMETA.json -blib -build -inc -pm_to_blib -MANIFEST* -!MANIFEST.SKIP -Debian* -Sub-Name-* -*.bs +/.ackrc +/.build/ +!/.gitignore +/.latest +/Name.* +!/Name.xs +/MYMETA.* +/Makefile +/Makefile.old +/blib/ +/pm_to_blib +/Sub-Name-*/ +/Sub-Name-*.tar.gz diff --git a/Changes b/Changes index 386e05c..ded0172 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,7 @@ -Revision history for Sub-Name +Revision history for {{$dist->name}} + +{{$NEXT}} + - converted distribution packaging to Dist::Zilla 0.09 -- 2014-08-09 - Copy the contents of the %DB::sub entry if it exists; fixes diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP deleted file mode 100644 index c58b609..0000000 --- a/MANIFEST.SKIP +++ /dev/null @@ -1,9 +0,0 @@ -#!include_default -^\. -build\b -blib\b -\.(?:bak|o|c|bs)$ -^Makefile$ -^Makefile.old$ -^Debian -^Sub-Name- diff --git a/Makefile.PL b/Makefile.PL index 904244e..9b5cd9c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,41 +1,4 @@ -use 5.006; -use ExtUtils::MakeMaker; - -WriteMakefile( - NAME => 'Sub::Name', - VERSION_FROM => 'lib/Sub/Name.pm', - ABSTRACT_FROM => 'lib/Sub/Name.pm', - AUTHOR => 'Matthijs van Duin ', - - PREREQ_PM => { - 'Exporter' => '0', - 'DynaLoader' => '0', - }, - BUILD_REQUIRES => { - 'Devel::CheckBin' => '0', - 'Test::More' => '0', - }, - - MIN_PERL_VERSION => '5.006', - META_MERGE => { - 'meta-spec' => { version => 2 }, - dynamic_config => 0, - resources => { - repository => { - url => 'https://github.com/karenetheridge/Sub-Name.git', - web => 'https://github.com/karenetheridge/Sub-Name', - type => 'git', - }, - bugtracker => { - mailto => 'bug-Sub-Name@rt.cpan.org', - web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Sub-Name', - }, - }, - }, -); - -package MY; -sub depend { " -README : \$(VERSION_FROM) - pod2text \$(VERSION_FROM) > README" -} +use strict; +use warnings; +use ExtUtils::MakeMaker::Dist::Zilla::Develop; +WriteMakefile(NAME => 'Sub::Name'); diff --git a/README b/README deleted file mode 100644 index f877bb4..0000000 --- a/README +++ /dev/null @@ -1,34 +0,0 @@ -NAME - Sub::Name - (re)name a sub - -SYNOPSIS - use Sub::Name; - - subname $name, $subref; - - $subref = subname foo => sub { ... }; - -DESCRIPTION - This module has only one function, which is also exported by default: - - subname NAME, CODEREF - Assigns a new name to referenced sub. If package specification is - omitted in the name, then the current package is used. The return value - is the sub. - - The name is only used for informative routines (caller, Carp, etc). You - won't be able to actually invoke the sub by the given name. To allow - that, you need to do glob-assignment yourself. - - Note that for anonymous closures (subs that reference lexicals declared - outside the sub itself) you can name each instance of the closure - differently, which can be very useful for debugging. - -AUTHOR - Matthijs van Duin - - Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved. - Copyright (C) 2014 cPanel Inc. All rights reserved. This program is free - software; you can redistribute it and/or modify it under the same terms - as Perl itself. - diff --git a/dist.ini b/dist.ini new file mode 100644 index 0000000..bc79393 --- /dev/null +++ b/dist.ini @@ -0,0 +1,13 @@ +name = Sub-Name +author = Matthijs van Duin +license = Perl_5 +copyright_holder = Matthijs van Duin +copyright_year = 2004 + +[@Author::ETHER] +:version = 0.065 +installer = MakeMaker +Authority.authority = cpan:FLORA +Test::MinimumVersion.max_target_perl = 5.006 +Git::GatherDir.exclude_filename = Makefile.PL +-remove = Test::PodSpelling ; TODO diff --git a/lib/Sub/Name.pm b/lib/Sub/Name.pm index 55cc6d9..bfe3093 100644 --- a/lib/Sub/Name.pm +++ b/lib/Sub/Name.pm @@ -1,8 +1,7 @@ package Sub::Name; +# ABSTRACT: (re)name a sub -=head1 NAME - -Sub::Name - (re)name a sub +=pod =head1 SYNOPSIS @@ -38,12 +37,11 @@ L - for getting information about subs =back -=head1 AUTHOR +=head1 COPYRIGHT AND LICENSE -Matthijs van Duin +This software is copyright (c) 2004, 2008 by Matthijs van Duin, all rights reserved; +copyright (c) 2014 cPanel Inc., all rights reserved. -Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved. -Copyright (C) 2014 cPanel Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -54,14 +52,17 @@ use 5.006; use strict; use warnings; -our $VERSION = '0.09'; - use base 'Exporter'; -use base 'DynaLoader'; our @EXPORT = qw(subname); our @EXPORT_OK = @EXPORT; -bootstrap Sub::Name $VERSION; +use XSLoader; +XSLoader::load( + __PACKAGE__, + exists $Sub::Name::{VERSION} + ? ${ $Sub::Name::{VERSION} } + : (), +); 1; diff --git a/weaver.ini b/weaver.ini new file mode 100644 index 0000000..470aff8 --- /dev/null +++ b/weaver.ini @@ -0,0 +1,33 @@ +; this is [@Default] without [Legal]... + +[@CorePrep] + +[-SingleEncoding] + +[Name] +[Version] + +[Region / prelude] + +[Generic / SYNOPSIS] +[Generic / DESCRIPTION] +[Generic / OVERVIEW] + +[Collect / ATTRIBUTES] +command = attr + +[Collect / METHODS] +command = method + +[Collect / FUNCTIONS] +command = func + +[Leftovers] + +[Region / postlude] + +[Authors] +; [Legal] ; snip! + +[Generic / legal] +header = COPYRIGHT AND LICENSE