/[pxelator]/lib/PXElator/CouchDB.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 /lib/PXElator/CouchDB.pm

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

revision 207 by dpavlin, Wed Aug 12 22:56:45 2009 UTC revision 208 by dpavlin, Wed Aug 12 23:59:01 2009 UTC
# Line 105  sub audit { Line 105  sub audit {
105          my ( $package, $file, $line, $sub ) = caller(1);          my ( $package, $file, $line, $sub ) = caller(1);
106          ( $package, undef, $line ) = caller(0) if $package eq 'main';          ( $package, undef, $line ) = caller(0) if $package eq 'main';
107    
108          my $t = time();          my $time = time();
109    
110          $data->{x_meta} = {          $data->{$_} = eval '$' . $_ foreach ( qw/time package line sub/ );
                 'time' => $t,  
                 'package' => $package,  
                 'line' => $line,  
                 'sub' => $sub,  
         };  
         $data->{'ident'} = [ @_ ] if @_;  
111    
112          warn 'audit ', dump($data), "at $file +$line\n";          warn 'audit ', dump($data), "at $file +$line\n";
113    
114          $audit->put( "pxelator/$t.$package.$url", $data );          $time = int($time); # reduce granularity
115            $audit->put( "pxelator/$time.$package.$url", $data );
116  }  }
117    
118  1;  1;

Legend:
Removed from v.207  
changed lines
  Added in v.208

  ViewVC Help
Powered by ViewVC 1.1.26