SourceConfig.pm (cdf0e10c) | SourceConfig.pm (149f2bc0) |
---|---|
1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# --- 42 unchanged lines hidden (view full) --- 51##### profiling ##### 52 53##### ctor ##### 54 55sub new { 56 my $proto = shift; 57 my $class = ref($proto) || $proto; 58 my $source_root = shift; | 1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# --- 42 unchanged lines hidden (view full) --- 51##### profiling ##### 52 53##### ctor ##### 54 55sub new { 56 my $proto = shift; 57 my $class = ref($proto) || $proto; 58 my $source_root = shift; |
59 my @additional_repositories = @_; 60 |
|
59 my $self = {}; 60 $self->{USER_SOURCE_ROOT} = undef; 61 $self->{SOURCE_CONFIG_FILE} = undef; 62 if (defined $source_root) { 63 $source_root = Cwd::realpath($source_root); 64 $source_root =~ s/\\|\/$//; 65 if (-f $source_root) { 66 # We have path to source_config --- 32 unchanged lines hidden (view full) --- 99 if (defined $self->{USER_SOURCE_ROOT}) { 100 ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; 101 }; 102 $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); 103 $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; 104 if (defined $self->{USER_SOURCE_ROOT}) { 105 ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; 106 }; | 61 my $self = {}; 62 $self->{USER_SOURCE_ROOT} = undef; 63 $self->{SOURCE_CONFIG_FILE} = undef; 64 if (defined $source_root) { 65 $source_root = Cwd::realpath($source_root); 66 $source_root =~ s/\\|\/$//; 67 if (-f $source_root) { 68 # We have path to source_config --- 32 unchanged lines hidden (view full) --- 101 if (defined $self->{USER_SOURCE_ROOT}) { 102 ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; 103 }; 104 $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); 105 $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; 106 if (defined $self->{USER_SOURCE_ROOT}) { 107 ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; 108 }; |
109 foreach my $additional_repository (@additional_repositories) 110 { 111 ${$self->{REPOSITORIES}}{File::Basename::basename($additional_repository)} = $additional_repository; 112 } 113 |
|
107 read_config_file($self); 108 get_module_paths($self); 109 bless($self, $class); 110 return $self; 111} 112 113##### methods ##### 114 --- 555 unchanged lines hidden --- | 114 read_config_file($self); 115 get_module_paths($self); 116 bless($self, $class); 117 return $self; 118} 119 120##### methods ##### 121 --- 555 unchanged lines hidden --- |