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

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

revision 483 by dpavlin, Sat Jan 23 18:58:18 2010 UTC revision 485 by dpavlin, Sat Jan 23 19:46:19 2010 UTC
# Line 4  use warnings; Line 4  use warnings;
4  use strict;  use strict;
5    
6  use POSIX;  use POSIX;
7    use Time::HiRes qw/time/;
8    
9  use CouchDB;  #use CouchDB;
   
 =for MongoDB  
10    
11  use MongoDB;  use MongoDB;
12    
13  my $conn = MongoDB::Connection->new;  my $conn = MongoDB::Connection->new;
14  my $db = $conn->get_database( 'pxelator' );  my $db = $conn->get_database( 'pxelator' );
15  our $audit = $db->get_collection( 'audit' );  our $audit = $db->get_collection( 'audit' );
16    
 =cut  
17    
18  sub audit {  sub audit {
19          my $data = pop @_;          my $data = pop @_;
# Line 54  sub audit { Line 53  sub audit {
53          $time = strftime("%Y-%m-%d.%H:%M:%S", localtime $time);          $time = strftime("%Y-%m-%d.%H:%M:%S", localtime $time);
54          my $package = $caller[0];          my $package = $caller[0];
55    
56          CouchDB::_store_audit( "$time.$package.$url" => $data );  #       CouchDB::_store_audit( "$time.$package.$url" => $data );
57    
58  #       $data->{_id} = "$time.$package.$url"; $audit->insert( $data );  #       $data->{_id} = "$time.$package.$url";
59            $audit->insert( $data );
60  }  }
61    
62    

Legend:
Removed from v.483  
changed lines
  Added in v.485

  ViewVC Help
Powered by ViewVC 1.1.26