Hi all,

The attached patch is simply for demonstration.

I was digging around in Module::Build's documentation and realized that 
some of it is created during `./Build dist`.  Unfortunately, I have 
Module::Signature installed, so it was constantly nagging me to sign 
the distribution.

Seems there should maybe be some way to disable that as a command-line 
option or environment variable.  Possibly something standard?

I haven't messed with signatures, so can't say what's the best way to do 
this.  For those of you who use distsign, how do you deal with somebody 
in the field building a dist for demo/hotfix purposes?

I'm not working on this right now, so I'm chucking the distraction over 
the fence for those playing the home game to ponder.

--Eric
-- 
Turns out the optimal technique is to put it in reverse and gun it.
--Steven Squyres (on challenges in interplanetary robot navigation)
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------
Index: Build.PL
===================================================================
--- Build.PL	(revision 9408)
+++ Build.PL	(working copy)
@@ -47,6 +47,7 @@
 		  'Module::Signature' => 0.21,
 		  'version' => 0.661,
 		 },
+   get_options => {sign => {type => '!', default => 1}},
    sign => 1,
    create_readme => 1,
 
Index: inc/ModuleBuildBuilder.pm
===================================================================
--- inc/ModuleBuildBuilder.pm	(revision 9408)
+++ inc/ModuleBuildBuilder.pm	(working copy)
@@ -7,6 +7,8 @@
 
 sub ACTION_distdir {
   my $self = shift;
+
+  local $self->{properties}{sign} = 0; # see band-aid below
   $self->SUPER::ACTION_distdir(@_);
   
   my $build_pl = File::Spec->catfile($self->dist_dir, qw(Build.PL));
@@ -32,7 +34,7 @@
   $self->do_replace(qq[s{ModuleBuildBuilder}{Module::Build}gs], $build_pl);
 
   # XXX Band-aid the signing here again, since we modified some files.
-  $self->depends_on('distsign');
+  $self->depends_on('distsign') if($self->args('sign'));
 }
 
 sub do_replace {

Reply via email to