From: <jgr...@us...> - 2003-03-05 21:16:14
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1:/tmp/cvs-serv23158/POPFile Modified Files: Configuration.pm Logger.pm Module.pm Log Message: Statistics and reclassification now work; all configuration parameters now fixed correctly and configuration screens work; history now updates; can look up words; TODO: magnets not working and security page partly broken, need to decide whether to drop stop words or not Index: Configuration.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Configuration.pm 3 Mar 2003 22:01:32 -0000 1.9 --- Configuration.pm 5 Mar 2003 21:15:33 -0000 1.10 *************** *** 176,180 **** if ( open CONFIG, ">popfile.cfg" ) { ! foreach my $key (keys %{$self->{configuration_parameters__}}) { print CONFIG "$key $self->{configuration_parameters__}{$key}\n"; } --- 176,180 ---- if ( open CONFIG, ">popfile.cfg" ) { ! foreach my $key (sort keys %{$self->{configuration_parameters__}}) { print CONFIG "$key $self->{configuration_parameters__}{$key}\n"; } Index: Logger.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Logger.pm 4 Mar 2003 15:49:24 -0000 1.11 --- Logger.pm 5 Mar 2003 21:15:34 -0000 1.12 *************** *** 54,58 **** # Start with debugging to file ! $self->config_( 'debug', 1 ); # The default location for log files --- 54,58 ---- # Start with debugging to file ! $self->global_config_( 'debug', 1 ); # The default location for log files *************** *** 133,137 **** my ( $self, $message ) = @_; ! if ( $self->config_( 'debug' ) > 0 ) { # Check to see if we are handling the USER/PASS command and if we are then obscure the # account information --- 133,137 ---- my ( $self, $message ) = @_; ! if ( $self->global_config_( 'debug' ) > 0 ) { # Check to see if we are handling the USER/PASS command and if we are then obscure the # account information *************** *** 143,147 **** my $msg = "$now ($$): $message"; ! if ( $self->config_( 'debug' ) & 1 ) { open DEBUG, ">>$self->{debug_filename__}"; binmode DEBUG; --- 143,147 ---- my $msg = "$now ($$): $message"; ! if ( $self->global_config_( 'debug' ) & 1 ) { open DEBUG, ">>$self->{debug_filename__}"; binmode DEBUG; *************** *** 150,154 **** } ! print $msg if ( $self->config_( 'debug' ) & 2 ); } } --- 150,154 ---- } ! print $msg if ( $self->global_config_( 'debug' ) & 2 ); } } Index: Module.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Module.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Module.pm 3 Mar 2003 23:14:43 -0000 1.4 --- Module.pm 5 Mar 2003 21:15:35 -0000 1.5 *************** *** 244,248 **** my ( $self, $name, $value ) = @_; ! return $self->{configuration__}->parameter( $self->{name__} . '_' . $name, $value ); } --- 244,248 ---- my ( $self, $name, $value ) = @_; ! return $self->module_config_( $self->{name__}, $name, $value ); } *************** *** 264,268 **** my ( $self, $name, $value ) = @_; ! return $self->{configuration__}->parameter( "GLOBAL_$name", $value ); } --- 264,289 ---- my ( $self, $name, $value ) = @_; ! return $self->module_config_( 'GLOBAL', $name, $value ); ! } ! ! # --------------------------------------------------------------------------------------------- ! # ! # module_config_ ! # ! # Called by a subclass to get or set a module specific configuration parameter ! # ! # $module The name of the module that owns the parameter (e.g. 'pop3') ! # $name The name of the parameter (e.g. 'port') ! # $value (optional) The value to set ! # ! # If called with just a $module and $name then module_config_() will return the current value ! # of the configuration parameter. ! # ! # --------------------------------------------------------------------------------------------- ! sub module_config_ ! { ! my ( $self, $module, $name, $value ) = @_; ! ! return $self->{configuration__}->parameter( $module . "_" . $name, $value ); } |