/[webpac2]/trunk/lib/WebPAC/Common.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 /trunk/lib/WebPAC/Common.pm

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

revision 924 by dpavlin, Wed Oct 31 00:26:45 2007 UTC revision 948 by dpavlin, Thu Nov 1 00:16:46 2007 UTC
# Line 11  use Log::Log4perl qw/get_logger :levels/ Line 11  use Log::Log4perl qw/get_logger :levels/
11  use Time::HiRes qw/time/;  use Time::HiRes qw/time/;
12  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
13  use File::Spec;  use File::Spec;
14    use Cwd qw/abs_path/;
15    
16  use base qw/Class::Accessor/;  use base qw/Class::Accessor/;
17  __PACKAGE__->mk_accessors( qw/log_debug no_log debug/ );  __PACKAGE__->mk_accessors( qw/log_debug no_log debug/ );
# Line 167  sub fill_in { Line 168  sub fill_in {
168    
169  =cut  =cut
170    
171    my $abs_path;
172    
173  sub var_path {  sub var_path {
174          my $self = shift;          my $self = shift;
175    
176          return File::Spec->catfile('var', @_);          if ( ! $abs_path ) {
177    #               $abs_path = abs_path( $0 );
178    #               $abs_path =~ s!/WebPAC/Common\.pm!!;
179                    $abs_path = '/data/webpac2';
180            }
181    
182            return File::Spec->catfile($abs_path, 'var', @_);
183  }  }
184    
185  =head1 EXPORTED NETHODS  =head1 EXPORTED NETHODS
# Line 258  sub _init_logger { Line 267  sub _init_logger {
267          my $conf = q( );          my $conf = q( );
268          if ($self->no_log) {          if ($self->no_log) {
269                  warn "# $name disabled logging\n" if $self->log_debug;                  warn "# $name disabled logging\n" if $self->log_debug;
270                    $Log::Log4perl::Config::CONFIG_INTEGRITY_CHECK = 0;
271          } elsif ($self->debug) {          } elsif ($self->debug) {
272                  $conf = << '_log4perl_';                  $conf = << '_log4perl_';
273    

Legend:
Removed from v.924  
changed lines
  Added in v.948

  ViewVC Help
Powered by ViewVC 1.1.26