cvsuser     02/02/05 14:25:58

  Modified:    P5EEx/Blue/P5EEx/Blue/Session HTMLHidden.pm
  Log:
  no longer inadvertently puts $args into $self
  
  Revision  Changes    Path
  1.3       +72 -1     p5ee/P5EEx/Blue/P5EEx/Blue/Session/HTMLHidden.pm
  
  Index: HTMLHidden.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Session/HTMLHidden.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- HTMLHidden.pm     1 Feb 2002 20:40:34 -0000       1.2
  +++ HTMLHidden.pm     5 Feb 2002 22:25:58 -0000       1.3
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: HTMLHidden.pm,v 1.2 2002/02/01 20:40:34 spadkins Exp $
  +## $Id: HTMLHidden.pm,v 1.3 2002/02/05 22:25:58 spadkins Exp $
   #############################################################################
   
   package P5EEx::Blue::Session::HTMLHidden;
  @@ -91,6 +91,36 @@
   =cut
   
   #############################################################################
  +# get_session_id()
  +#############################################################################
  +
  +=head2 get_session_id()
  +
  +The get_session_id() returns the session_id of this particular session.
  +This session_id is unique for all time.  If a session_id does not yet
  +exist, one will be created.  The session_id is only created when first
  +requested, and not when the session is instantiated.
  +
  +    * Signature: $session_id = $session->get_session_id();
  +    * Param:  void
  +    * Return: $session_id      string
  +    * Throws: <none>
  +    * Since:  0.01
  +
  +    Sample Usage: 
  +
  +    $session->get_session_id();
  +
  +=cut
  +
  +my $seq = 0;
  +
  +sub get_session_id {
  +    my $self = shift;
  +    "embedded";
  +}
  +
  +#############################################################################
   # html()
   #############################################################################
   
  @@ -167,6 +197,35 @@
   =cut
   
   #############################################################################
  +# create()
  +#############################################################################
  +
  +=head2 create()
  +
  +The create() method is used to create the Perl structure that will
  +be blessed into the class and returned by the constructor.
  +
  +    * Signature: $ref = P5EEx::Blue::Reference->create($hashref)
  +    * Param:     $hashref            {}
  +    * Return:    $ref                ref
  +    * Throws:    P5EEx::Blue::Exception
  +    * Since:     0.01
  +
  +    Sample Usage:
  +
  +=cut
  +
  +sub create {
  +    my ($self, $args) = @_;
  +    $args = {} if (!defined $args);
  +
  +    my ($ref);
  +    $ref = {};
  +
  +    $ref;
  +}
  +
  +#############################################################################
   # init()
   #############################################################################
   
  @@ -184,6 +243,17 @@
   
       $ref->init($args);
   
  +The init() method looks at the CGI variables in the request
  +and restores the session state information from the variable
  +named "p5ee.sessiondata" (and "p5ee.sessiondata[2..n]").
  +
  +When the values of these variables are concatenated, they
  +form a Base64-encoded, gzipped, frozen multi-level hash of
  +session state data.  To retrieve the state data, the text
  +is therefore decoded, gunzipped, and thawed (a la Storable).
  +
  +TODO: encrypt and MAC
  +
   =cut
   
   sub init {
  @@ -207,6 +277,7 @@
           }
       }
       $self->{state} = $state;
  +    $self->{cache} = {};
   }
   
   1;
  
  
  


Reply via email to