home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / expire.al < prev    next >
Encoding:
Text File  |  2003-09-17  |  1.1 KB  |  38 lines

  1. # NOTE: Derived from blib\lib\CGI\Session.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package CGI::Session;
  5.  
  6. #line 1123 "blib\lib\CGI\Session.pm (autosplit into blib\lib\auto\CGI\Session\expire.al)"
  7. # expire() - sets/returns session/parameter expiration ticker
  8. sub expire {
  9.     my $self = shift;
  10.  
  11.     unless ( @_ ) {
  12.         return $self->{_DATA}->{_SESSION_ETIME};
  13.     }
  14.  
  15.     if ( @_ == 1 ) {
  16.         return $self->{_DATA}->{_SESSION_ETIME} = _time_alias( $_[0] );
  17.     }
  18.  
  19.     # If we came this far, we'll simply assume user is trying
  20.     # to set an expiration date for a single session parameter.
  21.     my ($param, $etime) = @_;
  22.  
  23.     # Let's check if that particular session parameter exists
  24.     # in the '_DATA' table. Otherwise, return now!
  25.     defined ($self->{_DATA}->{$param} ) || return;
  26.  
  27.     if ( $etime eq '-1' ) {
  28.         delete $self->{_DATA}->{_SESSION_EXPIRE_LIST}->{$param};
  29.     $self->{_STATUS} = MODIFIED;
  30.         return;
  31.     }
  32.  
  33.     $self->{_DATA}->{_SESSION_EXPIRE_LIST}->{$param} = _time_alias( $etime );
  34. }
  35.  
  36. # end of CGI::Session::expire
  37. 1;
  38.