Changeset 3283
- Timestamp:
- 03/12/09 05:38:22 (3 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Config/Constants.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Config/Constants.pm
r3282 r3283 5 5 package Padre::Config::Constants; 6 6 7 use File::Basename qw{ dirname }; 8 use File::Copy qw{ copy }; 7 9 use File::Path qw{ mkpath }; 8 10 use File::Spec; … … 10 12 11 13 # -- export stuff 14 12 15 use base qw{ Exporter }; 13 16 … … 84 87 # 85 88 # find and return the directory where padre should check the locally 86 # installed plugins. create it if needed. no params. 89 # installed plugins. create it if needed. copy the My Plugin in it if 90 # needed. 91 # 92 # no params. 87 93 # 88 94 sub _find_padre_plugin_dir { … … 97 103 98 104 # copy the My Plugin if necessary 99 my $file = catfile( $fullpath, 'My.pm' ); 100 unless ( -e $file ) { 101 Padre::Config->copy_original_My_plugin( $file ); 105 my $dst = catfile( $fullpath, 'My.pm' ); 106 unless ( -e $dst ) { 107 my $src = catfile( dirname($INC{'Padre/Config.pm'}), 'Plugin', 'My.pm' ); 108 die "Could not find the original My plugin" unless -e $src; 109 copy($src, $dst) or die "Could not copy the My plugin ($src) to $dst: $!"; 110 chmod( 0644, $dst); 102 111 } 103 112
Note: See TracChangeset
for help on using the changeset viewer.
