YAMLã®assets_pathã¨ãplugin_pathã¨ãincludeã«ã¯ãã¹ãæ¸ããããªãã§ããã~ã¨ã~USERã®å±éããã¦ãããªãã¿ããã
å±éãã¦ãããªãã¨ä½ãä¸ä¾¿ãï¼
ã²ã¨ã¤ã®ç°å¢ã§ä½¿ã£ã¦ãã¶ãã«ã¯ãããã ãã©ããããªã¨ã
- ç°å¢éã§ã¦ã¼ã¶åãéãï¼èªå® ã®ãã·ã³ã¨ä¼ç¤¾ã®ãã·ã³ã¨ãï¼
- ç°å¢éã§ãã¼ã ãã£ã¬ã¯ããªã®ãã¹ãéãï¼Linuxã¨Mac OS Xã¨ãï¼
ã«ãYAMLã使ãåãã®ãããã©ãããã¹ãæ¸ãæããªãã¨ãããªãã®ã§ã
ãã¨ã
- ä¾ç¤ºç¨ã®YAMLã«èªåã®ãã¼ã ãã£ã¬ã¯ããªã®ãã¹ãæ¸ãã®ã¯ãªãã¨ãªãæ°æã¡ãæªã
ã¨ããã®ãããããã
ã¨ããããã§ãã~/etcããã~hirose31/etcããã/home/hirose31/etcãã«å±éãã¦ãããï¼ããªãå¼·å¼ãªï¼ãããããããã¦ã¿ãã
--- Plagger/ConfigLoader.pm.orig 2006-08-22 12:55:49.000000000 +0900 +++ Plagger/ConfigLoader.pm 2006-08-31 01:30:42.000000000 +0900 @@ -2,6 +2,8 @@ use strict; use Carp; use Plagger::Walker; +use File::HomeDir; +use Data::Dumper; sub new { my $class = shift; @@ -27,6 +29,10 @@ Plagger::Walker->decode_utf8($config); } + my $config_dumped = Data::Dumper->new([$config],[qw(config)])->Indent(0)->Quotekeys(1)->Dump; + $config_dumped =~ s{'~([^/]+)?}{"'".File::HomeDir->home($1||())}ge; + eval $config_dumped; + return $config; }