[cgiapp] CGI::Application::Dispatch Install Issues

Lee Carmichael lecar_red at yahoo.com
Sun Mar 9 17:09:37 EDT 2008


Hello Michael, 
 
>>  [me at unixbox1:~/perltemp/CGI-Application-Dispatch-2.12]>  perl  Makefile.PL 
>>  This  module  can  optionally  use  Apache::Test  to  test  the  mod_perl  
>>  functionality. 
>>  Undefined  subroutine  &ExtUtils::MakeMaker::prompt  called  at  Makefile.PL  
>>  line  31,  <DATA>  line  547. 
 
> I'm  curious  about  this  one.  I'm  not  sure  which  version  of  ExtUtils::MakeMaker 
> added  prompt  (it's  in  at  least  6.31,  but  I  don't  know  about  6.30).  It  works  just 
> fine  for  me. 
 
This isn't a problem with ExtUtils::MakeMaker not having prompt in some old version, it is an issue with trying to use the 'prompt' sub before requiring the library. The require of it occurs only if you install module::build above, if you have it installed it makemaker won't get loaded.
 
<snippet> 
# see if they have Apache::Test, if not, ask if they want it 
my $build_pkg = 'Module::Build'; unless(eval "use Apache::Test 1.30; 1") {     
   print "This module can optionally use Apache::Test to test the mod_perl functionality.\n";     
   my $yn = ExtUtils::MakeMaker::prompt('  Install Apache::Test now from CPAN?', 'y');
</snippet>
  
> I  am  trying  to  be  smarter  than  the  average  Makefile.PL,  but  I  just  seem  to  be 
> getting  more  trouble  then  it's  work  at  this  point.  I'll  probably  just  go  back  to 
> being  dumb  and  not  run  the  Apache/mod_perl  tests  unless  the  person  already  have 
> Apache::Test  installed. 

I think its nice to try this. These problems aren't anything major.
 
>>  [me at unixbox1:~/perltemp/CGI-Application-Dispatch-2.12]>  perl  Build.PL 
>>  Can't  locate  object  method  "new"  via  package  "Module::Build"  (perhaps  you  
>>  forgot  to  load  "Module::Build"?)  at  Build.PL  line  2. 
 
> You  need  to  install  Module::Build  using  CPAN. 

I had Module::Build installed, the problem was w/out apache::testmb it didn't try to require or use it.


Here is the snippet from the Build.PL:


my $build_pkg = eval "require Apache::TestMB" ? 'Apache::TestMB' : 'Module::Build';
my $build = $build_pkg->new( ...


If you notice Module::Build is never loaded.

 >  Is  there  a  known  problem  with  CGI::Application::Dispatch?   How  have  others  
>  installed  this? 


I had these same issues but once I patched the Makefile.PL and Build.PL it worked just fine.


These are really small things and nothing to get angry about. Thanks for your work on C:A:Dispatch, it is a great tool. 


Take Care,


Lee



More information about the cgiapp mailing list