Changeset 3289
- Timestamp:
- 03/12/09 08:02:52 (3 years ago)
- Location:
- trunk/Padre/lib/Padre
- Files:
-
- 2 edited
-
Config/Constants.pm (modified) (4 diffs)
-
PluginManager.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Config/Constants.pm
r3285 r3289 18 18 use base qw{ Exporter }; 19 19 20 my @dirs = qw{ $PADRE_CONFIG_DIR $PADRE_PLUGIN_DIR };20 my @dirs = qw{ $PADRE_CONFIG_DIR $PADRE_PLUGIN_DIR $PADRE_PLUGIN_LIBDIR }; 21 21 my @files = qw{ $CONFIG_FILE_HOST $CONFIG_FILE_USER }; 22 22 my @stores = qw{ $HOST $HUMAN $PROJECT }; … … 35 35 36 36 # files & dirs 37 our $PADRE_CONFIG_DIR = _find_padre_config_dir(); 38 our $PADRE_PLUGIN_DIR = _find_padre_plugin_dir(); 39 our $CONFIG_FILE_USER = catfile( $PADRE_CONFIG_DIR, 'config.yml' ); 40 our $CONFIG_FILE_HOST = catfile( $PADRE_CONFIG_DIR, 'config.db' ); 37 our $PADRE_CONFIG_DIR = _find_padre_config_dir(); 38 our $PADRE_PLUGIN_DIR = catdir( $PADRE_CONFIG_DIR, 'plugins' ); 39 our $PADRE_PLUGIN_LIBDIR = catdir( $PADRE_PLUGIN_DIR, 'Padre', 'Plugin' ); 40 our $CONFIG_FILE_USER = catfile( $PADRE_CONFIG_DIR, 'config.yml' ); 41 our $CONFIG_FILE_HOST = catfile( $PADRE_CONFIG_DIR, 'config.db' ); 42 43 { 44 # check if plugin directory exists, create it otherwise 45 unless ( -e $PADRE_PLUGIN_LIBDIR ) { 46 mkpath($PADRE_PLUGIN_LIBDIR) or 47 die "Cannot create plugins dir '$PADRE_PLUGIN_LIBDIR': $!"; 48 } 49 } 50 51 41 52 42 53 # settings types (based on firefox) … … 166 177 Private directory where Padre can look for plugins. 167 178 179 =item * $PADRE_PLUGIN_LIBDIR 180 181 Subdir of $PADRE_PLUGIN_DIR with the path C<Padre/Plugin> added (or whatever 182 depending on your platform) so that perl can load a C<Padre::Plugin::> plugin. 168 183 169 184 =back … … 188 203 =item * dirs 189 204 190 Imports C<$PADRE_CONFIG_DIR> and C<$PADRE_PLUGIN_DIR>.205 Imports C<$PADRE_CONFIG_DIR>, C<$PADRE_PLUGIN_DIR> and C<$PADRE_PLUGIN_LIBDIR>. 191 206 192 207 =item * files -
trunk/Padre/lib/Padre/PluginManager.pm
r3287 r3289 28 28 use Scalar::Util (); 29 29 use Params::Util qw{_IDENTIFIER _CLASS _INSTANCE}; 30 use Padre::Config::Constants qw{ $PADRE_PLUGIN_ DIR };30 use Padre::Config::Constants qw{ $PADRE_PLUGIN_LIBDIR }; 31 31 use Padre::Util (); 32 32 use Padre::PluginHandle (); … … 149 149 150 150 # do not overwrite it unless stated so. 151 my $dst = catfile( $PADRE_PLUGIN_ DIR, 'My.pm' );151 my $dst = catfile( $PADRE_PLUGIN_LIBDIR, 'My.pm' ); 152 152 return if -e $dst && !$overwrite; 153 153
Note: See TracChangeset
for help on using the changeset viewer.
