in reply to Variable Naming
in thread Tact and the Monastery
Here is a example of trying to learn from our betters and getting confused. The node Randal does it again refers to an article by Randal Schwartz.
I found this snippet of code that uses a variable name $old_flag.My confusion arises because I would have expected $old_flag to hold a true/false value. Shouldn't this variable be named something like $age_status. This would make it "sound" better to say : $age_status is new or old.sub wanted { return unless -f $_; my $old_flag = -M $_ > 180 ? 'old' : 'new'; $ages{$File::Find::dir}{$old_flag}++; }
How should this be handled?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Variable Naming
by rir (Vicar) on Sep 27, 2002 at 20:59 UTC |