perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: modperl-2.0/lib/ModPerl TestRun.pm
Date Sun, 09 Nov 2003 19:55:21 GMT
Geoffrey Young wrote:
> 
>> Also I'd like to suggest another change. If you introduce key=>val 
>> arguments, the old arg should support that as well, like so:
>>
>> generate_script( file      => 't/TEST',
>>                  bugreport => My::Foo::bugreport());
>>
>> What do you think? And we keep the back-compat:
>>
>> generate_script('t/TEST');
> 
> 
> 
> I already took care of that:
> 
> +    if (@opts == 1) {
> +        $opts{file} = $opts[0];
> +    }
> +    else {
> +        %opts = @opts;
> +        $opts{file} ||= catfile 't', 'TEST';
> +    }

Ah, of course! my embed-brain-perl has failed to dive into the else branch ;)


__________________________________________________________________
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://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message