]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Added sample of using global / static variables
authorAlan T. DeKok <aland@freeradius.org>
Mon, 28 Feb 2011 10:00:14 +0000 (11:00 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 28 Feb 2011 10:00:14 +0000 (11:00 +0100)
src/modules/rlm_perl/example.pl

index 7395ece6657bd4dec9eaf6041222ea0048d8c133..1dd9fb8206dfd04ec5b68143dcfb21d948a25d0c 100644 (file)
@@ -53,6 +53,19 @@ use Data::Dumper;
        use constant    RLM_MODULE_UPDATED=>   8;#  /* OK (pairs modified) */
        use constant    RLM_MODULE_NUMCODES=>  9;#  /* How many return codes there are */
 
+#  Global variables can persist across different calls to the module.
+#
+#
+#      {
+#       my %static_global_hash = ();
+#
+#              sub post_auth {
+#              ...
+#              }
+#              ...
+#      }
+
+
 # Function to handle authorize
 sub authorize {
        # For debugging purposes only