annotate Lib/Security.pm @ 48:1c3c3e63a314

security in progress
author Sergey
date Fri, 26 Feb 2010 01:43:42 +0300
parents 03e58a454b20
children 16ada169ca75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
1 use strict;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
2 package Security;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
3
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
4 use constant {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
5 AUTH_FAILED => 0,
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
6 AUTH_SUCCESS => 1,
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
7 AUTH_INCOMPLETE => 2,
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
8 AUTH_NOAUTH => 3
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
9 };
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
10
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
11 my $CurrentSession;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
12
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
13 sub CurrentSession {
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
14 my ($class,$newSession) = @_;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
15
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
16 $CurrentSession = $newSession if @_>=2;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
17 return $CurrentSession;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
18 }
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
19
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
20 1;
03e58a454b20 Создан репозитарий
Sergey
parents:
diff changeset
21