summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2013-03-25 20:06:16 +0000
committersthen <sthen@openbsd.org>2013-03-25 20:06:16 +0000
commit898184e3e61f9129feb5978fad5a8c6865f00b92 (patch)
tree56f32aefc1eed60b534611007c7856f82697a205 /gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm
parentPGSHIFT -> PAGE_SHIFT (diff)
downloadwireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.tar.xz
wireguard-openbsd-898184e3e61f9129feb5978fad5a8c6865f00b92.zip
import perl 5.16.3 from CPAN - worked on by Andrew Fresh and myself
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm')
-rw-r--r--gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm23
1 files changed, 19 insertions, 4 deletions
diff --git a/gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm b/gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm
index 9fbd6d0c8ca..ae8ed343907 100644
--- a/gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm
+++ b/gnu/usr.bin/perl/cpan/Module-Build/t/lib/DistGen.pm
@@ -84,6 +84,8 @@ sub reset {
my %options = @_;
$options{name} ||= 'Simple';
+ $options{version} ||= q{'0.01'};
+ $options{license} ||= 'perl';
$options{dir} = File::Spec->rel2abs(
defined $options{dir} ? $options{dir} : MBTest->tmpdir
);
@@ -151,7 +153,7 @@ sub _gen_default_filedata {
my \$builder = Module::Build->new(
module_name => '$self->{name}',
- license => 'perl',
+ license => '$self->{license}',
);
\$builder->create_build_script();
@@ -164,7 +166,7 @@ sub _gen_default_filedata {
my \$builder = Module::Build->new(
module_name => '$self->{name}',
- license => 'perl',
+ license => '$self->{license}',
);
\$builder->create_build_script();
@@ -179,7 +181,7 @@ sub _gen_default_filedata {
package $self->{name};
use vars qw( \$VERSION );
- \$VERSION = '0.01';
+ \$VERSION = $self->{version};
use strict;
@@ -214,7 +216,7 @@ sub _gen_default_filedata {
$self->$add_unless($module_filename, undent(<<" ---"));
package $self->{name};
- \$VERSION = '0.01';
+ \$VERSION = $self->{version};
require Exporter;
require DynaLoader;
@@ -627,6 +629,8 @@ The C<new> method does not write any files -- see L</regen()> below.
my $dist = DistGen->new(
name => 'Foo::Bar',
+ version => '0.01',
+ license => 'perl',
dir => MBTest->tmpdir,
xs => 1,
no_manifest => 0,
@@ -642,6 +646,17 @@ The name of the module this distribution represents. The default is
'Simple'. This should be a "Foo::Bar" (module) name, not a "Foo-Bar"
dist name.
+=item version
+
+The version string that will be set. (E.g. C<our $VERSION = 0.01>)
+Note -- to put this value in quotes, add those to the string.
+
+ version => q{'0.01_01'}
+
+=item license
+
+The license string that will be set in Build.PL. Defaults to 'perl'.
+
=item dir
The (parent) directory in which to create the distribution directory. The