develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH for discussion] clamp, round #2

Thread Previous | Thread Next
From:
Chris Nandor
Date:
July 30, 2001 06:29
Subject:
Re: [PATCH for discussion] clamp, round #2
Message ID:
pudge-5F7A91.09292030072001@onion.valueclick.com
In article <200107290500.WAA02831@ventrue.corp.yahoo.com>,
 jfriedl@yahoo-inc.com (Jeffrey Friedl) wrote:

> Hiho,
> Here's a patch which implements clamp, etc., via Readonly.pm, an XS module.

I know this is of subordinate importance to the issues Nick raised, but 
I am not happy with the function names.


> +=head2 Readonly::Set($scalar)

> +=head2 Readonly::Clear($scalar)

> +=head2 Readonly::Check($scalar)

> +=head2 Readonly::Hash(%Hash)

> +=head2 Readonly::ClearHash(%Hash)

> +=head2 Readonly::CheckHash(%Hash)

> +=head2 Clamp::Set(%hash, FLAGS)

> +=head2 Clamp::Check(%hash)

> +=head2 Clamp::Keys(%hash)

> +=head2 Clamp::ClearKeys(%hash)

> +=head2 Clamp::CheckKeys(%hash)

> +=head2 Clamp::Access(%hash)

> +=head2 Clamp::ClearAccess(%hash)

> +=head2 Clamp::CheckAccess(%hash)

From perlstyle:

>           Function and method names seem to work best as all
>           lowercase.  E.g., $obj->as_string().

set, clear, check, clear_hash, check_hash, etc. would be my preference.

Also, I'd prefer the function names to be verbs; "Hash" doesn't quite 
fit.

-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About