The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
name    = Algorithm-AM
author  = Theron Stanford <shixilun@yahoo.com>, Nathan Glenn <garfieldnate@gmail.com>
license = Perl_5
copyright_holder = Royal Skousen
copyright_year   = 2013

[ReportPhase / Phase_Begins] 	; report on everything

; -- start off by bumping the version

; find the last tag, and bump to next version via Version::Next;
; if you need a different version number, set the V env. variable
[Git::NextVersion]
first_version = 2.31            ; start with this version
version_regexp  = ^v(.+)$       ; this is the default

; -- basic dist skeleton

; gather everything in the distribution directory;
; exclude files added later via CopyFilesFromBuild
[GatherDir]
exclude_filename = Makefile.PL
exclude_filename = LICENSE
exclude_filename = cpanfile
[PruneCruft]                    ; automatically prune cruft defined by RJBS
[AutoPrereqs]                   ; automatically find our prereqs
[Prereqs::AuthorDeps]           ; add author prereqs to meta files as develop prereqs
[CPANFile]                      ; generate cpanfile from prereqs
[GenerateFile / MANIFEST.SKIP]  ; make our default MANIFEST.SKIP
filename = MANIFEST.SKIP
content = #contents of #!include_default
content = #have to put this here until Module::Manifest understands #!include_default
content = # Avoid version control files.
content = \bRCS\b
content = \bCVS\b
content = \bSCCS\b
content = ,v$
content = \B\.svn\b
content = \B\.git\b
content = \B\.gitignore\b
content = \b_darcs\b
content = \B\.cvsignore$
content =
content = # Avoid VMS specific MakeMaker generated files
content = \bDescrip.MMS$
content = \bDESCRIP.MMS$
content = \bdescrip.mms$
content =
content = # Avoid Makemaker generated and utility files.
content = \bMANIFEST\.bak
content = \bMakefile$
content = \bblib/
content = \bMakeMaker-\d
content = \bpm_to_blib\.ts$
content = \bpm_to_blib$
content = \bblibdirs\.ts$         # 6.18 through 6.25 generated this
content =
content = # Avoid Module::Build generated and utility files.
content = \bBuild$
content = \b_build/
content = \bBuild.bat$
content = \bBuild.COM$
content = \bBUILD.COM$
content = \bbuild.com$
content =
content = # Avoid temp and backup files.
content = ~$
content = \.old$
content = \#$
content = \b\.#
content = \.bak$
content = \.tmp$
content = \.#
content = \.rej$
content =
content = # Avoid OS-specific files/dirs
content = # Mac OSX metadata
content = \B\.DS_Store
content = # Mac OSX SMB mount metadata files
content = \B\._
content =
content = # Avoid Devel::Cover and Devel::CoverX::Covered files.
content = \bcover_db\b
content = \bcovered\b
content =
content = # Avoid MYMETA files
content = ^MYMETA\.
content =
content = #END DEFAULT MANIFEST SKIP
content =
content = # sublime project
content = \.sublime-project
content = \.sublime-workspace
content =
content = #Eclipse project
content = \.includepath$
content = \.project$
content = \.settings/
content =
content = \b_Inline
content = # our tarballs
content = \.tar\.gz$
content = ^releases/
content = ^TODO\.txt
content =
content = # Need for passing release tests (xs generated fiels)
content = AM\.bs
content = AM\.c
content = AM\.def
content = AM\.o
content = dll\.base
content = dll\.exp
[ManifestSkip]                  ; auto-generate MANIFEST.SKIP and don't put any cruft in the build
skipfile = MANIFEST.SKIP

; -- Generate tons of tests

[ReportVersions::Tiny]          ; report module versions used during installation
[Test::Compile]                 ; Create a t/00-compile.t file that auto-compiles every module in the dist
fake_home = 1                   ; fakes $ENV{HOME} just in case (for cpan smoke testers)
[Test::Perl::Critic]
critic_config = t/perlcriticrc
[Test::DistManifest]            ; tests correctness of the manifest
[Test::Version]                 ; makes sure there's a version
is_strict   = 0
has_version = 1
[MetaTests]                     ; test meta.yml
[Test::CPAN::Meta::JSON]        ; test meta.json
[Test::MinimumVersion]          ; tests for a minimum version
[MojibakeTests]                 ; test file encodings
[PodCoverageTests]              ; test pod coverage
[PodSyntaxTests]                ; test pod syntax
[Test::Portability]             ; test portability of file names
[Test::Synopsis]                ; make sure the synopsis is compilable ;doesn't work with heredocs
[Test::UnusedVars]              ; find unused variables
[Test::Pod::LinkCheck]          ; find broken links
[Test::CPAN::Changes]           ; test changelog conformance to CPAN standards
; [Test::EOL]                     ; Bad for Windows. TODO: find something else for trailing space
[Test::Kwalitee]				; check kwalitee metric

; -- munge files

[Prepender]                     ; automatically add lines following the shebang in modules
copyright = 1
; "our $VERSION = $version" in main module; overwrite if it's there already
[OverridePkgVersion]
[PodWeaver]                     ; weave our POD and add useful boilerplate
; config_plugin = @Apocalyptic
; [LocaleMsgfmt]                  ; compile .po files to .mo files in share/locale
; locale = share/locale

; update the Changelog
[NextRelease]
time_zone = local
filename = Changes

; -- generate/process meta-information

[ExecDir]                       ; automatically install files from bin/ directory as executables ( if it exists )
dir = bin
[ShareDir]                      ; automatically install File::ShareDir files from share/ ( if it exists )
dir = share
[MinimumPerl]                   ; automatically find the minimum perl version required and add it to prereqs
[Bugtracker]                    ; set bugtracker to http://rt.cpan.org/Public/Dist/Display.html?Name=$dist
[Homepage]                      ; set homepage to http://search.cpan.org/dist/$dist/
[MetaConfig]                    ; dump dzil config into metadata
[MetaData::BuiltWith]           ; dump entire perl modules we used to build into metadata
[Repository]                    ; set git repository path by looking at git configs
git_remote = origin
[MetaResources]                 ; add arbitrary resources to metadata
license = http://dev.perl.org/licenses/

; generate meta files
[MetaNoIndex]                   ; tell PAUSE to not index those directories
directory = inc t xt examples share eg mylib
[MetaProvides::Package]         ; get provides from package definitions in files
meta_noindex = 1
[License]                       ; create LICENSE file
[MakeMaker]                     ; create Makefile.PL file
;TODO: project setup makes Module::Build impossible. Does it even matter?
; [ModuleBuild]                   ; create Build.PL file
; [DualBuilders]                  ; have M::B and EU::MM but select only M::B as prereq
; prefer = build
[MetaYAML]                      ; create META.yml file
[GithubMeta]                    ; include Git info in Meta.yml
[MetaJSON]                      ; create META.json file
[ReadmeFromPod]                 ; create README file in build
[ReadmeAnyFromPod]              ; create markdown README file in the project root
type = markdown
location = root
[InstallGuide]                  ; create INSTALL file
; Windows: install gpg4win
[Signature]                     ; create SIGNATURE file whenever we create an archive
sign = archive
[Manifest]                      ; create the MANIFEST file
; copy some helper files out of the build so contributors can just clone and build
[CopyFilesFromBuild]
copy = cpanfile
copy = Makefile.PL
copy = LICENSE

; -- pre-release

; Perform Git operations after a release or build
; [Git::Check]                    ; check for a clean state before release; always fails because build adds new files

[CheckChangesHasContent]        ; make sure you explained your changes :)
changelog = Changes
[TestRelease]                   ; make sure that we won't release a FAIL distro
[CheckPrereqsIndexed]           ; make sure that our prereqs actually exist on CPAN
[ConfirmRelease]                ; double-check that we ACTUALLY want a release

; -- test

[RunExtraTests]                 ; run the xt/ tests when `dzil test --release` is run

; -- release

[UploadToCPAN]                  ; upload your dist to CPAN using CPAN::Uploader

; -- post-release
[ArchiveRelease]                ; archive our tarballs under releases/
directory = releases

[Clean]                         ; run dzil clean so we have/commit no cruft

[Git::Commit]                   ; commit the dzil-generated stuff (allow_dirty means commit it)
allow_dirty = README.mkdn
allow_dirty = Changes
allow_dirty = dist.ini
allow_dirty = Makefile.PL
allow_dirty = cpanfile
commit_msg = New CPAN release of %N - v%v%n%n%c
add_files_in = releases         ; add our release tarballs to the repo

; commit released results
; [Git::CommitBuild]
; build =
; release_branch = master

[Git::Tag]                      ; tag our new release
tag_format = v%v
; branch = releases
tag_message = Tagged release %v
[Git::Push]                     ; automatically push to the "origin" defined in .git/config
push_to = origin

[ReportPhase / Phase_Ends]