/[VRac]/Session.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Session.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 169 by dpavlin, Sun Aug 5 18:25:53 2007 UTC revision 170 by dpavlin, Mon Aug 6 09:20:49 2007 UTC
# Line 11  use File::Slurp; Line 11  use File::Slurp;
11  use POSIX qw/strftime/;  use POSIX qw/strftime/;
12    
13  use base qw/Class::Accessor/;  use base qw/Class::Accessor/;
14  __PACKAGE__->mk_accessors(qw(session_uuid));  __PACKAGE__->mk_accessors(qw(session_uuid session_path));
15    
16    
17  =head1 NAME  =head1 NAME
# Line 35  them. Line 35  them.
35    
36  =cut  =cut
37    
 my $path = 'session.pl';  
   
38  my $last_tick = 0;  my $last_tick = 0;
39    
40  my $t = 0;  my $t = 0;
# Line 48  sub record_session { Line 46  sub record_session {
46          my $name = shift || confess "need name";          my $name = shift || confess "need name";
47          my $value = shift || confess "need value";          my $value = shift || confess "need value";
48    
49            my $path = $self->session_path;
50    
51            if ( ! $path ) {
52                    $path = 'sess/current';
53                    $self->session_path( $path );
54                    if ( -e $path ) {
55                            warn "session appending to: $path\n";
56                    } else {
57                            warn "session creating: $path\n";
58                    }
59            }
60    
61          if ( @timeline ) {          if ( @timeline ) {
62                  warn "INFO: Aborting recorderd session\n";                  warn "INFO: Aborting recorderd session\n";
63                  @timeline = ();                  @timeline = ();
64                  $t = 0;                  $t = 0;
65                  $s = {};                  $s = {};
66                    $last_tick = 0;
67          }          }
68    
69          my $t = $self->app->ticks;          my $t = $self->app->ticks;

Legend:
Removed from v.169  
changed lines
  Added in v.170

  ViewVC Help
Powered by ViewVC 1.1.26