The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
name     = Text-VimColor
author   = Geoff Richards <qef@laxan.com>
author   = Randy Stauner <rwstauner@cpan.org>
license  = Perl_5
; copyright statement gets munged after build (see Run plugin below)
copyright_holder  = Randy Stauner
copyright_year    = 2011

[@Author::RWSTAUNER]
; declare prereqs used by inc/ even though they're currently all core modules
AutoPrereqs.configure_finder = :IncModules
GatherDir.exclude_match[0] = corpus/profile-vim/results
Prepender.skip[0] = corpus/simple_test.pl

[Encoding / BinaryFiles]
encoding = bytes
match    = t/data/.+
match    = t/\.vim/.+

[Prereqs]
; colored() with initial array ref
Term::ANSIColor = 1.03
[Prereqs / RuntimeRecommends]
; bright colors added in 3.0
Term::ANSIColor = 3

[Prereqs / DevelopRequires]
; optional test requirements
XML::Parser = 0

[OSPrereqs / MSWin32]
Win32::Console::ANSI = 0

[RemovePrereqs]
; one of the tests uses this
remove = inc::VimCommand
; don't put this in the META
remove = Win32::Console::ANSI

; default GatherDir skips leading-dot dirs but we want to include this specific one
[GatherDir / GatherTestDotVim]
root = t/.vim
prefix = t/.vim

[Run::AfterBuild]
; without vim don't even try to install; send Unknown test report
run = perl -i -pe '/^(use ExtUtils::MakeMaker)/ and print qq/use inc::VimCommand;\n/;' %d/Makefile.PL

; fix generated Copyright statements to include GEOFFR's work
run = perl -i -pe '$geoffr = q[2002-2006 by Geoff Richards.]; /\Q$geoffr\E/ and $already=1; $already or s/^(#?)(\s*This software is copyright \(c\))( \d+ by Randy Stauner\.)/$1$2 $geoffr\n$1\n$1$2$3/' %d/lib/Text/VimColor.pm %d/bin/text-vimcolor %d/README* %d/LICENSE README*

; FIXME: Use a plugin for this
[Run::AfterRelease]
run = perl -0777 -p -i -e 's{^(# NAME\n)}{[![Build Status](https://travis-ci.org/rwstauner/Text-VimColor.svg?branch=master)](https://travis-ci.org/rwstauner/Text-VimColor)\n[![Coverage Status](https://coveralls.io/repos/rwstauner/Text-VimColor/badge.svg?branch=master)](https://coveralls.io/r/rwstauner/Text-VimColor?branch=master)\n\n$1}s' README.mkdn

[%PodWeaver]
-StopWords.include = ansi html xml DOCTYPE XHTML XSL XSLT XSL-FO pdf inline stylesheet filetype unencoded