/[virtual-ldap]/lib/LDAP/Virtual.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/LDAP/Virtual.pm

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

revision 4 by dpavlin, Sat Mar 14 14:47:54 2009 UTC revision 31 by dpavlin, Mon Mar 23 20:24:46 2009 UTC
# Line 20  use URI::Escape;       # uri_escape Line 20  use URI::Escape;       # uri_escape
20  use IO::Socket::INET;  use IO::Socket::INET;
21  use IO::Select;  use IO::Select;
22    
23    use YAML qw/DumpFile/;
24    
25  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
26    
27  =head1 NAME  =head1 NAME
# Line 41  Provide LDAP server functionality somewh Line 43  Provide LDAP server functionality somewh
43  =cut  =cut
44    
45  our $pids;  our $pids;
 our $cache;  
   
 sub cache {  
         return $cache if $cache;  
         $cache = new A3C::Cache->new({ instance => '', dir => 'ldap' });  
 }  
46    
47  sub run {  sub run {
48          my $self = shift;          my $self = shift;
# Line 241  sub search { Line 237  sub search {
237    
238          warn "## entries = ",dump( @entries );          warn "## entries = ",dump( @entries );
239    
240          $self->cache->write_cache( \@entries, uri_escape( $filter ));          my $path = 'var/' . uri_escape( $filter ) . '.yml';
241            DumpFile( $path, \@entries );
242            warn "# created $path ", -s $path, " bytes";
243    
244          return RESULT_OK, @entries;          return RESULT_OK, @entries;
245  }  }

Legend:
Removed from v.4  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26