16my($username,$password,$confirm_password,$name,$email,$phone,$town,$university,$level) =map{dieiflength>200;$_}map{scalar$r->param($_)} qw/username password confirm_password name email phone town university level/;
18return reply 'Bad username. Allowed characters are letters, digits and underscores, and the username must be between 2 and 20 characters long.'unless$username=~ USER_REGEX;
19return reply 'Username already in use'if-e "$Apache2::Authen::Passphrase::rootdir/$username.yml";
20return reply 'The two passwords do not match'unless$passwordeq$confirm_password;
21return reply 'All fields are required'ifgrep{ !length}$username,$password,$confirm_password,$name,$email,$phone,$town,$university,$level;