Changeset 3285
- Timestamp:
- 03/12/09 07:41:58 (3 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Config/Constants.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Config/Constants.pm
r3284 r3285 90 90 # 91 91 # find and return the directory where padre should check the locally 92 # installed plugins. create it if needed. copy the My Plugin in it if 93 # needed. 92 # installed plugins. create it if needed. 94 93 # 95 94 # no params. 96 95 # 97 96 sub _find_padre_plugin_dir { 98 my $pluginsdir = catdir( $PADRE_CONFIG_DIR, 'plugins' );97 my $pluginsdir = catdir( $PADRE_CONFIG_DIR, 'plugins', 'Padre', 'Plugin' ); 99 98 100 99 # check if plugin directory exists, create it otherwise 101 my $fullpath = catdir( $pluginsdir, 'Padre', 'Plugin' ); 102 unless ( -e $fullpath ) { 103 mkpath($fullpath) or 104 die "Cannot create plugins dir '$fullpath': $!"; 105 } 106 107 # copy the My Plugin if necessary 108 my $dst = catfile( $fullpath, 'My.pm' ); 109 unless ( -e $dst ) { 110 my $src = catfile( dirname($INC{'Padre/Config.pm'}), 'Plugin', 'My.pm' ); 111 die "Could not find the original My plugin" unless -e $src; 112 copy($src, $dst) or die "Could not copy the My plugin ($src) to $dst: $!"; 113 chmod( 0644, $dst); 100 unless ( -e $pluginsdir ) { 101 mkpath($pluginsdir) or 102 die "Cannot create plugins dir '$pluginsdir': $!"; 114 103 } 115 104
Note: See TracChangeset
for help on using the changeset viewer.
