diff Lib/IMPL/Const.pm @ 230:6d8092d8ce1b

*reworked IMPL::Security *reworked IMPL::Web::Security *refactoring
author sergey
date Mon, 08 Oct 2012 03:37:37 +0400
parents
children 4ddb27ff4a0b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Const.pm	Mon Oct 08 03:37:37 2012 +0400
@@ -0,0 +1,55 @@
+package IMPL::Const;
+use strict;
+
+use parent qw(Exporter);
+
+our %EXPORT_TAGS = (
+    all => [
+        qw(
+          &ACCESS_PUBLIC
+          &ACCESS_PROTECTED
+          &ACCESS_PRIVATE
+          &PROP_GET
+          &PROP_SET
+          &PROP_OWNERSET
+          &PROP_LIST
+          &PROP_ALL
+          )
+    ],
+    prop => [
+        qw(
+          &PROP_GET
+          &PROP_SET
+          &PROP_OWNERSET
+          &PROP_LIST
+          &PROP_ALL
+          &PROP_RO
+          &PROP_RW
+          )
+    ],
+    access => [
+        qw(
+          &ACCESS_PUBLIC
+          &ACCESS_PROTECTED
+          &ACCESS_PRIVATE
+          )
+    ]
+    
+);
+
+our @EXPORT_OK = keys %{ { map (($_,1) , map (@{$_}, values %EXPORT_TAGS) ) } };
+
+use constant {
+    ACCESS_PUBLIC    => 1,
+    ACCESS_PROTECTED => 2,
+    ACCESS_PRIVATE   => 3,
+    PROP_GET         => 1,
+    PROP_SET         => 2,
+    PROP_OWNERSET    => 10,
+    PROP_LIST        => 4,
+    PROP_ALL         => 3,
+    PROP_RW          => 3,
+    PROP_RO          => 11
+};
+
+1;
\ No newline at end of file