in reply to Am I passing and testing user data correctly?

This is much improved from your previous post. A few points, and one design thing. Design first.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Am I passing and testing user data correctly?
by bradcathey (Prior) on Nov 21, 2003 at 04:07 UTC
    Thanks Zaxo for the kind words:
    I like to put a definite true, like 1; at the end of a sub which modifies its arguments.
    Do you mean this for all subs? Or just the .pm?

    —Brad
    "A little yeast leavens the whole dough."

      It's a useful convention in perl that operator-like subs (and many others) should return true if they are successful. The only one of your validation functions which might not is sub val_alpha, which successfully detaints an empty string and returns it. I make it a habit to avoid that automatically so I don't have to think about it :)

      It is only a convention, but a profoundly useful one. Perl does nothing to demand you follow it.

      After Compline,
      Zaxo