>> No other perl programmers here, unfortunately.  Good advice, though.
> 
> Why don't you post your ideas here for criticism then? I wouldn't post
> an entire several hundred line script, but you could post your
> specification and your plan for writing a code which met said
> specification. If you're following a tutor, you could do the exercises
> and post your answers here for criticism.


Okay, here's one I struggle with often -- is one of these better than the
other?

**************************************
  A.
        if ( isFlat($tire) ) { changeTire($tire); }

  B.
        checkFlatAndChangeTireIfNecessary($tire);

**************************************

"changeTire" feels more elemental (?) and therefore more useful, but I can
see why (B) would be attractive too...

(B) is a ridiculous subroutine name, but at least someone would know what's
going on with it.  I started with just "checkTireAndChange", but how would I
remember in 6 months that it only checks for flats and not nails?

TIA.

- Bryan



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to