Show
Ignore:
Timestamp:
10/09/08 19:05:54 (6 years ago)
Author:
yappo
Message:

refactoring

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Module-Setup/trunk/lib/Module/Setup/Distribute.pm

    r21048 r21052  
    4242    my($self, $context, $path) = @_; 
    4343 
    44     my $src  = $context->base_dir->flavor->template->path_to($path); 
    45     my $dist = $self->dist_path->file($path); 
    46  
    47     my $mode = ( stat $src )[2]; 
    48     $mode = sprintf "%03o", S_IMODE($mode); 
    49  
     44    my $src      = $context->base_dir->flavor->template->path_to($path); 
    5045    my $template = $src->slurp; 
    51  
    52     my $options = { 
    53         dist_path => $dist, 
     46    my $options = +{ 
     47        dist_path => $self->dist_path->file($path), 
    5448        template  => $template, 
    55         chmod     => $mode, 
     49        chmod     => sprintf('%03o', S_IMODE(( stat $src )[2])), 
    5650        vars      => $self->template_vars, 
    5751        content   => undef,