diff options
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.pm | 23 |
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 |