You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2005/09/13 19:36:24 UTC
Re: svn commit: r280495 - /perl/modperl/trunk/lib/ModPerl/Config.pm
pgollucci@apache.org wrote:
> Author: pgollucci
> Date: Mon Sep 12 21:42:31 2005
> New Revision: 280495
>
> URL: http://svn.apache.org/viewcvs?rev=280495&view=rev
> Log:
> Add a DARWIN constant and add ldd/otool -L output to mp2bug reports
>
>
> Modified:
> perl/modperl/trunk/lib/ModPerl/Config.pm
>
> Modified: perl/modperl/trunk/lib/ModPerl/Config.pm
> URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/ModPerl/Config.pm?rev=280495&r1=280494&r2=280495&view=diff
> ==============================================================================
> --- perl/modperl/trunk/lib/ModPerl/Config.pm (original)
> +++ perl/modperl/trunk/lib/ModPerl/Config.pm Mon Sep 12 21:42:31 2005
> @@ -21,6 +21,7 @@
> use File::Spec ();
>
> use constant WIN32 => Apache2::Build::WIN32;
> +use constant DARWIN => Apache2::Build::DARWIN;
>
> sub as_string {
> my $build = Apache2::Build->build_config;
> @@ -53,6 +54,22 @@
> $command = "$httpd -V";
> $cfg .= "\n\n*** $command\n";
> $cfg .= qx{$command};
> +
> + my $command;
> +
> + if (DARWIN) {
> + my $otool = Apache::TestConfig::which('otool');
> + $command = " -L $otool" if $otool;
> + }
> + elsif (!WIN32) {
> + my $ldd = Apache::TestConfig::which('ldd');
> + $command = "$ldd $httpd" if $ldd;
> + }
> +
> + if ($command) {
> + $cfg .= "\n*** $command\n";
> + $cfg .= qx{$command};
> + }
code duplication detected :) whenever you find yourself duplicating code
you should immediately consider refactoring. Otherwise the future won't be
too good... :)
This code should live in Apache::TestConfig and used here as a function call.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://mailchannels.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: svn commit: r280495 - /perl/modperl/trunk/lib/ModPerl/Config.pm
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Stas Bekman wrote:
> Please note that I've quoted the specific part of the code I was talking
> about. That part is remarkable indentical :) Just go for lower granularity.
Sounds good to me.
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: svn commit: r280495 - /perl/modperl/trunk/lib/ModPerl/Config.pm
Posted by Stas Bekman <st...@stason.org>.
Philip M. Gollucci wrote:
> Stas Bekman wrote:
>
>> pgollucci@apache.org wrote:
>>
>> code duplication detected :) whenever you find yourself duplicating
>> code you should immediately consider refactoring. Otherwise the future
>> won't be too good... :)
>>
>> This code should live in Apache::TestConfig and used here as a
>> function call.
>
> I saw that actually.
>
> ModPerl::Config::as_string and Apache::TestConfig::as_string are
> remarkably but not quite similiar.
Please note that I've quoted the specific part of the code I was talking
about. That part is remarkable indentical :) Just go for lower granularity.
> I going to get to mentioning that .... I was thinking pretty much all of
> it should be in in A-T and ModPerl::Config::as_string() should just be a
> set of function calls to the A-T implementations.
+1
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://mailchannels.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: svn commit: r280495 - /perl/modperl/trunk/lib/ModPerl/Config.pm
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Stas Bekman wrote:
> pgollucci@apache.org wrote:
>
> code duplication detected :) whenever you find yourself duplicating code
> you should immediately consider refactoring. Otherwise the future won't
> be too good... :)
>
> This code should live in Apache::TestConfig and used here as a function
> call.
I saw that actually.
ModPerl::Config::as_string and Apache::TestConfig::as_string are remarkably but
not quite similiar.
I going to get to mentioning that .... I was thinking pretty much all of it
should be in in A-T and ModPerl::Config::as_string() should just be a set of
function calls to the A-T implementations.
--
END
------------------------------------------------------------
What doesn't kill us can only make us stronger.
Nothing is impossible.
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
http://www.liquidityservicesinc.com
http://www.liquidation.com
http://www.uksurplus.com
http://www.govliquidation.com
http://www.gowholesale.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org