X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=samples%2Fgenerate.pl;h=6a5ca75c59cd8ded884f53ab08c6e08988d3b0f9;hb=7c2f012b6e602a79aebd27fde86fc171b361f059;hp=69ed4b8a40cf9352c7c3197c2fe332eb23702063;hpb=e267e0a0bdd6d0b8ac08c752e7eb7311e07afee5;p=perl%2Fmodules%2FTask-Devel-Cover-Recommended.git diff --git a/samples/generate.pl b/samples/generate.pl index 69ed4b8..6a5ca75 100644 --- a/samples/generate.pl +++ b/samples/generate.pl @@ -194,7 +194,7 @@ sub deplist_to_perl { return '{ }' unless @deplist; my $len = List::Util::max( - map length, @deplist[grep not($_ % 2), 0 .. $#deplist ] + map length, @deplist[grep not($_ % 2), 0 .. $#deplist] ); my $perl = "{\n"; @@ -250,67 +250,72 @@ __PACKAGE_TASK_PKG__; use strict; use warnings; -=head1 NAME +\=head1 NAME __TASK_PKG__ - Install __TARGET_PKG__ and its recommended dependencies. -=head1 VERSION +\=head1 VERSION Version __TASK_VERSION__ -=cut +\=cut our $VERSION = '__TASK_VERSION__'; -=head1 SYNOPSIS +\=head1 SYNOPSIS $ cpan __TASK_PKG__ $ cpanp -i __TASK_PKG__ $ cpanm __TASK_PKG__ -=head1 DESCRIPTION +\=head1 DESCRIPTION This task module lets you easily install L<__TARGET_PKG__> __TARGET_VERSION__ and all its recommended dependencies. -=head1 DEPENDENCIES +\=head1 DEPENDENCIES -=head2 Configure-time dependencies +\=head2 Configure-time dependencies __CONFIGURE_PREREQS_POD__ -=head2 Build-time and test-time dependencies +\=head2 Build-time and test-time dependencies __BUILD_PREREQS_POD__ -=head2 Run-time dependencies +\=head2 Run-time dependencies __RUN_PREREQS_POD__ -=head1 AUTHOR +\=head1 CAVEATS + +Note that run-time dependencies that are only recommended by __TARGET_PKG__ may not yet be installed at the time __TARGET_PKG__ is tested, as there is no explicit dependency link between them and in that case most CPAN clients default to install prerequisites in alphabetic order. +However, they will be installed when __TASK_PKG__ is, thus will be available when you actually use __TARGET_PKG__. + +\=head1 AUTHOR Vincent Pit, C<< >>, L. You can contact me by mail or on C (vincent). -=head1 BUGS +\=head1 BUGS Please report any bugs or feature requests to C<__BUG_EMAIL__>, or through the web interface at L<__BUG_QUEUE__>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. -=head1 SUPPORT +\=head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc __TASK_PKG__ -=head1 COPYRIGHT & LICENSE +\=head1 COPYRIGHT & LICENSE Copyright __YEARS__ Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -=cut +\=cut 1; # End of __TASK_PKG__ TEMPLATE @@ -354,6 +359,7 @@ WriteMakefile( VERSION_FROM => $file, ABSTRACT_FROM => $file, PL_FILES => {}, + BUILD_REQUIRES => $BUILD_PREREQS, PREREQ_PM => $RUN_PREREQS, MIN_PERL_VERSION => '__PERL_PREREQ__', META_MERGE => \%META, @@ -396,6 +402,8 @@ for my $test (@tests) { TEMPLATE ); +$templates{$task_file} =~ s/^\\=/=/mg; + my $valid_keys = join '|', keys %vars; $valid_keys = qr/$valid_keys/;