Archive-Builder
view release on metacpan or search on metacpan
lib/Archive/Builder/File.pm view on Meta::CPAN
# Get the file contents ( as a scalar ref )
my $contents = $self->contents or return undef;
# Write the file
File::Flat->write( $filename, $contents )
or return $self->_error( "Error writing to '$filename': $!" );
# If it is executable, set the mode
if ( $self->{executable} ) {
chmod 0755, $filename;
}
1;
}
# Is the file binary. Worked out by examining the content for the null byte,
# which should never be in a text file, but almost always is in binary files.
sub binary {
my $self = shift;
my $contents = $self->contents or return undef;
( run in 0.546 second using v1.01-cache-2.11-cpan-496ff517765 )