[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r23187 - in branches/perl-bindings-improvements: . subversion/bindings/swig/perl/native

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-01-23 21:11:28 CET

On Tue, 23 Jan 2007, nikclayton@tigris.org wrote:

> Author: nikclayton
> Date: Tue Jan 23 10:13:38 2007
> New Revision: 23187
>
> Log:
> Refactor some of the argument specifications in to their own variables.
>
> Many of these functions take arguments with the same name and the same
> specification -- url, revision, etc. Rather than duplicate the argument
> spec for these in each method definition, hoist the spec (a hash ref) into
> its own variable, and use that in the method definition.

Great idea!

> * subversion/bindings/swig/perl/native/Client.pm: Refactor the argument
> specifications.

Would be good to list the new/changed variable names here.

...
> --- branches/perl-bindings-improvements/subversion/bindings/swig/perl/native/Client.pm (original)
> +++ branches/perl-bindings-improvements/subversion/bindings/swig/perl/native/Client.pm Tue Jan 23 10:13:38 2007
> @@ -872,6 +872,21 @@
>
> =cut
>
> +my $arg_revision = {
> + name => 'revision',
> + spec => {
> + type => SCALAR,
> + default => 'HEAD',
> + }
> +};
...
> @@ -891,9 +906,7 @@
> args => [
> { name => 'path_or_url',
> spec => { type => SCALAR, }, },
> - { name => 'revision',
> - spec => { type => SCALAR,
> - default => 'HEAD', }, },
> + $arg_revision,
...

  • application/pgp-signature attachment: stored
Received on Tue Jan 23 21:12:09 2007

This is an archived mail posted to the Subversion Dev mailing list.