perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: cvs commit: modperl-2.0/lib/ModPerl TestRun.pm
Date Sun, 09 Nov 2003 13:50:52 GMT

> 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';
+    }

:)

--Geoff


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


Mime
View raw message