Changeset 3280
- Timestamp:
- 03/12/09 05:29:39 (3 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Config/Constants.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Config/Constants.pm
r3279 r3280 12 12 use base qw{ Exporter }; 13 13 14 my @dirs = qw{ $PADRE_CONFIG_DIR };14 my @dirs = qw{ $PADRE_CONFIG_DIR $PADRE_PLUGIN_DIR }; 15 15 my @files = qw{ $CONFIG_FILE_HOST $CONFIG_FILE_USER }; 16 16 my @stores = qw{ $HOST $HUMAN $PROJECT }; … … 30 30 # files & dirs 31 31 our $PADRE_CONFIG_DIR = _find_padre_config_dir(); 32 our $PADRE_PLUGIN_DIR = _find_padre_plugin_dir(); 32 33 our $CONFIG_FILE_USER = catfile( $PADRE_CONFIG_DIR, 'config.yml' ); 33 34 our $CONFIG_FILE_HOST = catfile( $PADRE_CONFIG_DIR, 'config.db' ); … … 77 78 78 79 80 # 81 # my $dir = _find_padre_plugin_dir(); 82 # 83 # find and return the directory where padre should check the locally 84 # installed plugins. no params. 85 # 86 sub _find_padre_plugin_dir { 87 my $pluginsdir = catdir( $PADRE_CONFIG_DIR, 'plugins' ); 88 89 # check if plugin directory exists, create it otherwise 90 my $fullpath = catdir( $pluginsdir, 'Padre', 'Plugin' ); 91 unless ( -e $fullpath ) { 92 mkpath($fullpath) or 93 die "Cannot create plugins dir '$fullpath': $!"; 94 } 95 96 # copy the My Plugin if necessary 97 my $file = catfile( $fullpath, 'My.pm' ); 98 unless ( -e $file ) { 99 Padre::Config->copy_original_My_plugin( $file ); 100 } 101 102 return $pluginsdir; 103 } 104 105 79 106 1; 80 107 … … 132 159 133 160 161 =item * $PADRE_PLUGIN_DIR 162 163 Private directory where Padre can look for plugins. 164 165 134 166 =back 135 167 … … 153 185 =item * dirs 154 186 155 Imports C<$PADRE_CONFIG_DIR> .187 Imports C<$PADRE_CONFIG_DIR> and C<$PADRE_PLUGIN_DIR>. 156 188 157 189 =item * files
Note: See TracChangeset
for help on using the changeset viewer.
