# NOTE: Derived from blib/lib/Inline.pm.
# Changes made here will be lost when autosplit is run again.
#line 1235 "blib/lib/Inline.pm (autosplit into blib/lib/auto/Inline/find_temp_dir.al)"
#==============================================================================
# Find the 'Inline' directory to use.
#==============================================================================
return $TEMP_DIR if $TEMP_DIR;
my ($temp_dir, $home, $bin, $cwd, $env);
$env = $ENV{PERL_INLINE_DIRECTORY} || '';
$home = $ENV{HOME} ? abs_path($ENV{HOME}) : '';
elsif ($cwd = abs_path('.') and
-d File::Spec->catdir($cwd,".Inline") and
-w File::Spec->catdir($cwd,".Inline")) {
$temp_dir = File::Spec->catdir($cwd,".Inline");
elsif (require FindBin and
-d File::Spec->catdir($bin,".Inline") and
-w File::Spec->catdir($bin,".Inline")) {
$temp_dir = File::Spec->catdir($bin,".Inline");
-d File::Spec->catdir($home,".Inline") and
-w File::Spec->catdir($home,".Inline")) {
$temp_dir = File::Spec->catdir($home,".Inline");
elsif (defined $cwd and $cwd and
-d File::Spec->catdir($cwd,"_Inline") and
-w File::Spec->catdir($cwd,"_Inline")) {
$temp_dir = File::Spec->catdir($cwd,"_Inline");
elsif (defined $bin and $bin and
-d File::Spec->catdir($bin,"_Inline") and
-w File::Spec->catdir($bin,"_Inline")) {
$temp_dir = File::Spec->catdir($bin,"_Inline");
elsif (defined $cwd and $cwd and
_mkdir(File::Spec->catdir($cwd,"_Inline"), 0777)) {
$temp_dir = File::Spec->catdir($cwd,"_Inline");
elsif (defined $bin and $bin and
_mkdir(File::Spec->catdir($bin,"_Inline"), 0777)) {
$temp_dir = File::Spec->catdir($bin,"_Inline");
croak M56_no_DIRECTORY_found()
return $TEMP_DIR = abs_path($temp_dir);
# end of Inline::find_temp_dir