Dist-Zilla-PluginBundle-DROLSKY
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/DROLSKY/Role/MaybeFileWriter.pm view on Meta::CPAN
my $self = shift;
my $path = shift;
my $content = shift;
my $is_executable = shift;
my $file = path($path);
return if $file->exists;
## no critic (ValuesAndExpressions::ProhibitLeadingZeros )
$file->parent->mkdir( { chmod => 0755 } );
$file->spew_utf8($content);
$file->chmod(0755) if $is_executable;
return;
}
1;
# ABSTRACT: Knows how to maybe write files
__END__
( run in 1.509 second using v1.01-cache-2.11-cpan-f56aa216473 )