Dist-Zilla-BeLike-CSJEWELL

changeset 6:176f1231b386

Adding fake_release option.
author Curtis Jewell <csjewell@cpan.org>
date Thu Aug 12 05:05:13 2010 -0600 (2010-08-12)
parents 1836c0643c04
children f1aa5311a5aa
files lib/Dist/Zilla/PluginBundle/CSJEWELL.pm
line diff
     1.1 --- a/lib/Dist/Zilla/PluginBundle/CSJEWELL.pm	Thu Aug 12 05:03:17 2010 -0600
     1.2 +++ b/lib/Dist/Zilla/PluginBundle/CSJEWELL.pm	Thu Aug 12 05:05:13 2010 -0600
     1.3 @@ -7,20 +7,31 @@
     1.4  our $VERSION = '0.900';
     1.5  $VERSION =~ s/_//sm;
     1.6  
     1.7 +has fake_release => (
     1.8 +	is      => 'ro',
     1.9 +	isa     => 'Bool',
    1.10 +	lazy    => 1,
    1.11 +	default => sub { 
    1.12 +		exists $_[0]->payload->{fake_release} : $_[0]->payload->{fake_release} : 1;
    1.13 +	},
    1.14 +);
    1.15  
    1.16  sub configure {
    1.17  	my ($self) = @_;
    1.18  
    1.19 -	$self->add_plugins( qw(
    1.20 -		  CSJEWELL::BeforeBuild
    1.21 -		  GatherDir
    1.22 -		  ManifestSkip
    1.23 -		  CSJEWELL::VersionGetter
    1.24 +	my @plugins = qw(
    1.25 +		CSJEWELL::BeforeBuild
    1.26 +		GatherDir
    1.27 +		ManifestSkip
    1.28 +		CSJEWELL::VersionGetter
    1.29  
    1.30 -		  TestRelease
    1.31 -		  ConfirmRelease
    1.32 -		  UploadToCPAN
    1.33 -	) );
    1.34 +		TestRelease
    1.35 +		ConfirmRelease
    1.36 +	);
    1.37 +
    1.38 +	push @plugins, ( $self->fake_release() ? 'FakeRelease' : 'UploadToCPAN');
    1.39 +
    1.40 +	$self->add_plugins( @plugins );
    1.41  
    1.42  	return $self;
    1.43  } ## end sub configure
    1.44 @@ -77,10 +88,17 @@
    1.45  
    1.46  =item *
    1.47  
    1.48 -L<Dist::Zilla::Plugin::UploadToCPAN|Dist::Zilla::Plugin::UploadToCPAN>
    1.49 +L<Dist::Zilla::Plugin::UploadToCPAN|Dist::Zilla::Plugin::UploadToCPAN> *
    1.50 +
    1.51 +=item *
    1.52 +
    1.53 +L<Dist::Zilla::Plugin::FakeRelease|Dist::Zilla::Plugin::FakeRelease> *
    1.54  
    1.55  =back
    1.56  
    1.57 +* Note that the choice of which the last two is given by a "fake_release" 
    1.58 +option to the plugin bundle, which must exist and be 0 to use UploadToCPAN.
    1.59 +
    1.60  =for Pod::Coverage configure
    1.61  
    1.62  =head1 AUTHOR