# from Graham TerMarsch # on Thursday 26 October 2006 04:02 pm: >Out of curiosity.... do you have "inc::builder" yet? I'm thinking > that we're both approaching the same problem from two separate sides; > I've focussed to this point on getting the plugin framework together > (and have a basic prototype that loads and spits out dummy info), but > I like you're "how it all gets bootstrapped" idea better.
just what was in the previous e-mail. I guess it has to bootstrap from module-starter or: perl -MModule::Build::Plugins -e \ 'Module::Build::Plugins->mk_incbuilder' Just sub ACTION_incbuilder {$_[0]->mk_incbuilder} sub mk_incbuilder { my $self = shift; open(my $fh, '>', 'inc/builder.pm') or die "eek"; print $fh <'BUILDER'; sub builder { my $package = shift; eval("require $package") or return('Module::Build'); # yeah, $package->VERSION >= $foo, etc would be a good idea $package->import(@_) if($package->can('import')); return($package); } BUILDER } I guess. Once it sorta works, it's pretty easy to regen. Even if the generated code has a fatal bug and you have to perl -Mblahblah -e blah, that's not too hard. It seems a little wrong for that to be main::builder(), but that's about all that needs to be solved up front. inc::builder::builder() ? --Eric -- The more you learn about Linux, the more you hate Windows. --Gary Varnell --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------