9my($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/;
11return 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;
12return reply 'Username already in use'if-e "$Apache2::Authen::Passphrase::rootdir/$username.yml";
13return reply 'The two passwords do not match'unless$passwordeq$confirm_password;
14return reply 'All fields are required'ifgrep{ !length}$username,$password,$confirm_password,$name,$email,$phone,$town,$university,$level;