- Timestamp:
- 10/17/08 12:57:05 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Module-Setup/trunk/lib/Module/Setup/Distribute.pm
r21435 r21474 33 33 sub dist_path { shift->{dist_path} }; 34 34 sub template_vars { shift->{template_vars} }; 35 sub install_files { shift->{install_files} }; 35 36 36 37 sub set_template_vars { … … 43 44 44 45 my $src = $context->base_dir->flavor->template->path_to($path); 46 my $template = $src->is_dir ? undef : $src->slurp; 45 47 my $options = +{ 46 48 dist_path => ($src->is_dir ? $self->dist_path->subdir($path) : $self->dist_path->file($path)), 47 template => ($src->is_dir ? undef : $src->slurp || undef),49 template => $template, 48 50 chmod => sprintf('%03o', S_IMODE(( stat $src )[2])), 49 51 vars => $self->template_vars, … … 61 63 $options->{template} = delete $options->{content} unless $options->{template}; 62 64 } 63 $options->{dist_path} =~ s/____var-(.+ )-var____/$options->{vars}->{$1} || $options->{vars}->{config}->{$1}/eg;65 $options->{dist_path} =~ s/____var-(.+?)-var____/$options->{vars}->{$1} || $options->{vars}->{config}->{$1}/eg; 64 66 $context->call_trigger( replace_distribute_path => $options ); 65 67
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)