|
Re: Fwd: Re: Apache::DBI as a prerequisite: msg#00277apache.mod-perl
Simon Perreault wrote: You wrote on 2002-04-30 to apache-modperl about Apache::DBI not being testable while not under mod_perl. You said this: I'll answer these in reverse: 2) See http://perl.apache.org/docs/2.0/devel/testing/testing.html Though you can really rely on it once Apache::Test is released, which will happen when mod_perl 2.0 is released. 1) That's an interesting problem. It seems that nobody has asked this question before. Here is my take on it. If you like this solution I'll add it to the docs. Makefile.PL ----------- use ExtUtils::MakeMaker; # set prerequisites my %prereq = ( Foo => 1.56, ); # Manually test whether Apache::DBI is installed and add it to the # PREREQ_PM if it's not installed, so CPAN.pm will automatically fetch # it. If Apache::DBI is already installed it will fail to get loaded by # MakeMaker because it requires the mod_perl environment to load. eval { require Apache::DBI }; if ($@ && $@ !~ /Can't locate object method/) { $prereq{Apache::DBI} = ''; } WriteMakefile( NAME => 'Apache::SuperDuper', VERSION_FROM => 'SuperDuper.pm', PREREQ_PM => \%prereq, # ... ); __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Subject: Re: hiding perl code: 00277, Stas Bekman |
|---|---|
| Next by Date: | Re: Apache::Status patch, in diff -u format (finally ;): 00277, Stas Bekman |
| Previous by Thread: | Fwd: Re: Apache::DBI as a prerequisitei: 00277, Simon Perreault |
| Next by Thread: | Re: Fwd: Re: Apache::DBI as a prerequisite: 00277, Stas Bekman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |