App-PythonToPerl
view release on metacpan or search on metacpan
lib/Python/File.pm view on Meta::CPAN
print {$PERL_FILE} $self->{perl_source_code_full};
close($PERL_FILE)
or croak 'ERROR EPYFI05y: failed to close Perl source code file \'', $self->{perl_file_path},
'\' after writing, received OS error message \'', $OS_ERROR, '\', croaking';
print 'in python_file_to_perl_file(), ret from calls to save Perl file', "\n";
# set file executability permission based on presence of shebang;
# an executable script has a shebang, a non-executable module AKA library does not have a shebang
if((defined $self->{python_preparsed}->[0]) and ($self->{python_preparsed}->[0]->isa('Python::Shebang'))) {
print 'in python_file_to_perl_file(), setting executable permission of Perl file', "\n";
chmod(S_IXUSR, $self->{perl_file_path})
or croak 'ERROR EPYFI05z: failed to chmod u+x Perl source code file \'', $self->{perl_file_path},
'\' after closing, received OS error message \'', $OS_ERROR, '\', croaking';
}
print 'in python_file_to_perl_file(), about to return $self->{perl_file_path} = \'', $self->{perl_file_path}, '\'', "\n";
return $self->{perl_file_path};
}
# PYFI04x
sub python_file_path_to_perl_file_path {
( run in 0.321 second using v1.01-cache-2.11-cpan-496ff517765 )