A couple more things that aren't exactly errors. Your new() constructor should shift in the class name, which should be used as the second argument of bless. What you have will work, but you can't inherit from User to make Customer or Admin classes. It would be good to let yourself initialize the User in the constructor, too.

sub new { my $class = shift; my $self = { userID => undef, userName => undef, password => undef, passwordHint => undef, passwordHintAnswer => undef, userActive => undef, legalName => undef, scaName => undef, addressLine1 => undef, addressLine2 => undef, state => undef, country => undef, city => undef, zip => undef, areaCode => undef, firstThree => undef, lastFour => undef, extension => undef, emailAddress => undef, @_ # initializer }; bless $self, $class; }
I'm not convinced you need to set up all the keys in that, or that undef is the best default initialization.

The way you've named your class data, cgi fields, and db columns, you could keep a single array of names to use in all those by mapping through lc and ucfirst; but why not use the same names for all three?

After Compline,
Zaxo


In reply to Re: My perl interpreter won't even look at it. It's that bad. by Zaxo
in thread My perl interpreter won't even look at it. It's that bad. by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.