R. Joseph Newton wrote:

I count 13 characters in test_hdr_good
header_is_good {
has 15 characters.

My personal preference is that if the variable/function returns a boolean, then the name should start with (is|has|have), etc.


if ( has_good_header() ) {...}

use constant HAVE_MODULE_FOO => eval { require Foo; 1; };

my $is_complete = 0;


or occasionally a verb that indicates a yes/no type answer:


if ( $needs_close ) { close FILE; }

But that's just a style issue. The important point is as you said: to have good descriptive names, avoiding abbreviations except for the most obvious ones.

Randy.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to