-BEGIN {
- %subhash = (newThread => \&new_thread,
- missingKey => \&missing_key,
- unexpectedKey => \&unexpected_key,
- unknownEncoding => \&unknown_encoding,
- tooShort => \&too_short,
- tooLong => \&too_long,
- wrongMail => \&wrong_mail,
- Occupied => \&occupied,
- Dupe => \&dupe_posting,
- noReply => \&no_reply,
- gotReply => \&got_reply,
- gotNew => \&got_new
- );
-
- # Die RFC-gerechte URL-Erkennung ist aus dem Forum
- # (thx2Cheatah - wo auch immer er sie (in der Form) her hat :-)
- my $lowalpha = '(?:[a-z])';
- my $hialpha = '(?:[A-Z])';
- my $alpha = "(?:$lowalpha|$hialpha)";
- my $digit = '(?:\d)';
- my $safe = '(?:[$_.+-])';
- my $hex = '(?:[\dA-Fa-f])';
- my $escape = "(?:%$hex$hex)";
- my $digits = '(?:\d+)';
- my $alphadigit = "(?:$alpha|\\d)";
-
- # URL schemeparts for ip based protocols:
- my $port = "(?:$digits)";
- my $hostnumber = "(?:$digits\\.$digits\\.$digits\\.$digits)";
- my $toplabel = "(?:(?:$alpha(?:$alphadigit|-)*$alphadigit)|$alpha)";
- my $domainlabel = "(?:(?:$alphadigit(?:$alphadigit|-)*$alphadigit)|$alphadigit)";
- my $hostname = "(?:(?:$domainlabel\\.)*$toplabel)";
- my $host = "(?:(?:$hostname)|(?:$hostnumber))";
- my $hostport = "(?:(?:$host)(?::$port)?)";
-
- my $httpuchar = "(?:(?:$alpha|$digit|$safe|(?:[!*\',]))|$escape)";
- my $hsegment = "(?:(?:$httpuchar|[;:\@&=~])*)";
- my $search = "(?:(?:$httpuchar|[;:\@&=~])*)";
- my $hpath = "(?:$hsegment(?:/$hsegment)*)";
-
- # das alles ergibt eine gueltige URL :-)
- $httpurl = "^(?:https?://$hostport(?:/$hpath(?:\\?$search)?)?)\$";