You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nik Clayton <ni...@ngo.org.uk> on 2006/11/24 09:38:32 UTC
Re: Named params for Perl bindings
Max Bowsher wrote:
> Garrett Rooney wrote:
>> On 7/20/06, Nik Clayton <ni...@ngo.org.uk> wrote:
>>> Assuming I get the time to do the work, would anyone be interested in
>>> patches to the Perl bindings to support named parameters as well as
>>> positional parameters?
>>>
>>> This would mean that as well as being able to write code like:
>>>
>>> $ra->get_log([$paths], $rev, 1, 20, 0, 0, sub { ... });
>>>
>>> which is a bit obtuse (quick, without access to the docs, which of
>>> those '0'
>>> params is 'discover_changed_paths', and which is 'strict_node_history'?).
>>> The changes I'm thinking of would let you write code like this:
>>>
>>> $ra->get_log({ paths => [ $paths ],
>>> start => $rev,
>>> end => 1,
>>> limit => 20,
>>> discover_changed_paths => 0,
>>> strict_node_history => 0,
>>> receiver => sub { ... } });
>>>
>>> Although it's more verbose, it's much more maintainable.
>
> I would be delighted to be proved wrong, but I am very pessimistic about
> the above (at least, not without integrating the functionality into the
> core of SWIG itself - which would be a possible avenue, but would mean
> that the enhancement couldn't be made available in Subversion until it
> was released in SWIG and we had increased the minimum SWIG version to
> the new release).
I've got a reasonable idea how to do this now, I might have a proof of
concept patch for one function by the end of this train journey.
How do people feel about making the Perl Subversion bindings dependent on
non-core (i.e., they don't ship with Perl) modules from CPAN? I'm
specifically thinking of Params::Validate, which would simplify the above
somewhat.
N
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Named params for Perl bindings
Posted by John Peacock <jp...@rowman.com>.
Nik Clayton wrote:
> How do people feel about making the Perl Subversion bindings dependent
> on non-core (i.e., they don't ship with Perl) modules from CPAN? I'm
> specifically thinking of Params::Validate, which would simplify the
> above somewhat.
I would be in favor of this, but I think that you would have to make sure that
dependency was added to the Makefile.PL that Subversion uses to build the Perl
bindings (i.e. that it would force P::V to be installed before the bindings
could be built/tested).
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Blvd
Suite H
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org