in reply to My perl interpreter won't even look at it. It's that bad.
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.
I'm not convinced you need to set up all the keys in that, or that undef is the best default initialization.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; }
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
|
|---|