Source

Kephra / lib / Kephra / Config / File / Location.pm

Diff from to

lib/Kephra/Config/File/Location.pm

 use strict;
 use warnings;
 use Cwd;
+use FindBin;
 
 package Kephra::Config::File::Location;
-our $base_path;
+my $base_path = $Kephra::MODE eq 'test'
+	? Cwd::cwd()
+	: File::UserConfig->configdir( dist => $Kephra::NAME );
 
-use File::Spec;
-use File::HomeDir;
-use File::UserConfig;
+
+;
 
 
 sub init {
 	#$base_path
 	#say Cwd::cwd();
 	#say Kephra::configdir();
-	say File::UserConfig->configdir(dist     => 'Kephra', sharedir  => 'config');
+	#say $base_path;
+	#my $path = File::Spec->catfile(Cwd::cwd(), __FILE__);
+	#say rindex($path, 'Kephra'
+	#my $base_madule_name = (split '::', __PACKAGE__)[0];
+	#say $FindBin::Bin;
+	#say File::Spec->catfile(Cwd::cwd(), __FILE__) if -e $path;
 	#say File::UserConfig->configdir('Kephra');
+	
 	#say File::HomeDir->my_home;
 }