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

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

Thread Previous | Thread Next
Chris Nandor
July 30, 2001 06:29
Re: [PATCH for discussion] clamp, round #2
Message ID:
In article <>, (Jeffrey Friedl) wrote:

> Hiho,
> Here's a patch which implements clamp, etc., via, 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 

Chris Nandor            
Open Source Development Network

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About