App-Slaughter

 view release on metacpan or  search on metacpan

bin/slaughter  view on Meta::CPAN


sub createTransportDir
{

    #
    #  Temporary directory for transports to use
    #
    $CONFIG{ 'transportDir' } = tempdir( CLEANUP => !$CONFIG{ 'nodelete' } );

    #  The temporary directory should not be world-readable
    chmod 0700, $CONFIG{ 'transportDir' };
}



=begin doc

Test the environment - which is a combination of the command line flags, and
configuration file settings, and the local user.

=end doc

bin/slaughter  view on Meta::CPAN



    #
    # Create the temporary file, and set the permissions on
    # it to something restrictive.
    #
    my ( undef, $name ) = File::Temp::tempfile();
    $name = $CONFIG{ 'outfile' } if $CONFIG{ 'outfile' };
    if ( $^O ne "MSWin32" )
    {
        chmod( 0700, $name );
    }

    #
    #  The user might have specified an include-file to be added
    # to the wrapper.  Here we load that, if present.
    #
    my $include = "";
    if ( $CONFIG{ 'include' } && ( -e $CONFIG{ 'include' } ) )
    {
        open( my $inc, "<", $CONFIG{ 'include' } );

lib/Slaughter/API/generic.pm  view on Meta::CPAN

    }
    if ( $params{ 'Mode' } )
    {
        $::verbose && print "\tSetting mode to $mode\n";
        my $mode = $params{ 'Mode' };
        if ( $mode !~ /^0/ )
        {
            $mode = oct("0$mode");
            $::verbose && print "\tOctal mode is now $mode\n";
        }
        chmod( $mode, $file );
        $changed += 1;
    }

    return ($changed);
}



=head2 UserDetails



( run in 0.565 second using v1.01-cache-2.11-cpan-496ff517765 )