Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for web-apps/finance-manager/modules/restart.pm between version 1.2 and 1.3

version 1.2, 2004/02/11 12:05:25 version 1.3, 2004/02/11 14:15:22
Line 11 
Line 11 
 # 09/02/2004 - created  # 09/02/2004 - created
 #  #
   
 # $Platon: scripts/perl/finance-manager/modules/restart.pm,v 1.1 2004/02/11 10:52:53 rajo Exp $  # $Platon: scripts/perl/finance-manager/modules/restart.pm,v 1.2 2004/02/11 12:05:25 rajo Exp $
   
 package restart;  package restart;
   
Line 19  use strict;
Line 19  use strict;
 use Carp;  use Carp;
 use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);  use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
   
 @ISA     = qw(Exporter);  
 @EXPORT  = qw( add_files add_loaded_modules restart );  @EXPORT  = qw( add_files add_loaded_modules restart );
 $VERSION = '0.1';  $VERSION = '0.1';
   
Line 29  sub new
Line 28  sub new
         my $self;          my $self;
   
         if (ref $hash eq 'HASH') {          if (ref $hash eq 'HASH') {
                   #warn "Using HASH";
                 $self  = {                  $self  = {
                         restart_func                    => $hash->{restart_func},                          restart_func                    => $hash->{restart_func},
                         CHECK_USER_MODULES              => $hash->{CHECK_USER_MODULES},                          CHECK_USER_MODULES              => $hash->{CHECK_USER_MODULES},
Line 37  sub new
Line 37  sub new
         }          }
         else {          else {
                 # Defaults:                  # Defaults:
                   #warn "Using defaults...";
                 $self  = {                  $self  = {
                         restart_func                    => &exit(0),                          restart_func                    => sub { exit 0; },
                         CHECK_USER_MODULES              => 'true',                          CHECK_USER_MODULES              => 'true',
                         CHECK_SYSTEM_MODULES    => 'false',                          CHECK_SYSTEM_MODULES    => 'false',
                 };                  };
Line 67  sub add_loaded_modules ($;)
Line 68  sub add_loaded_modules ($;)
         foreach my $file (@keys) {          foreach my $file (@keys) {
                 if ($INC{$file} =~ m#^/#) {                  if ($INC{$file} =~ m#^/#) {
                         if ($self->{CHECK_SYSTEM_MODULES} eq 'true') {                          if ($self->{CHECK_SYSTEM_MODULES} eq 'true') {
                                 warn "Adding system module '$file'\t=>'$INC{$file}'\n";                                  #warn "Adding system module '$file'\t=>'$INC{$file}'\n";
                                 push @{$self->{checked_files}}, $INC{$file};                                  push @{$self->{checked_files}}, $INC{$file};
                         }                          }
                 }                  }
                 elsif ($self->{CHECK_USER_MODULES} eq 'true') {                  elsif ($self->{CHECK_USER_MODULES} eq 'true') {
                         warn "Adding user module '$file'\t=>'$INC{$file}'\n";                          #warn "Adding user module '$file'\t=>'$INC{$file}'\n";
                         push @{$self->{checked_files}}, $INC{$file};                          push @{$self->{checked_files}}, $INC{$file};
                 }                  }
         }          }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top