diff -urN tiarra-20040114/ChangeLog tiarra-20040122/ChangeLog
--- tiarra-20040114/ChangeLog	2004-01-16 19:17:23.000000000 +0900
+++ tiarra-20040122/ChangeLog	2004-01-23 04:16:11.000000000 +0900
@@ -1,3 +1,22 @@
+2004-01-23  Topia  <topia@clovery.jp>
+
+	* tiarra: $0 自体が symlink だったときに、@INC に symlink 先の
+	main/module を含めるようにした。
+	カレントディレクトリ・$0 のディレクトリは常に含むようにした。
+	(make_password): --make-password=password を可能にした。
+
+2004-01-23  phonohawk  <phonohawk@lycos.co.uk>
+
+	* tiarra: 起動時オプション --make-password 追加。
+	make-passwordの機能をtiarra本体に移した。
+	
+	* make-password: 削除
+
+2004-01-20  phonohawk  <phonohawk@lycos.co.uk>
+
+	* main/Unicode/Japanese.pm:
+	同梱のUniJPを0.18から0.19に。JISの問題は解決。
+
 2004-01-14  phonohawk  <phonohawk@lycos.co.uk>
 
 	* main/Mask.pm:
@@ -1068,7 +1087,7 @@
 
 	* これ以前のログは書いていません。
 
-#       Id: $Id: ChangeLog,v 1.121 2004/01/14 14:48:35 admin Exp $
-#   Author: $Author: admin $
-#     Date: $Date: 2004/01/14 14:48:35 $
-# Revision: $Revision: 1.121 $
+#       Id: $Id: ChangeLog,v 1.124 2004/01/22 19:13:45 topia Exp $
+#   Author: $Author: topia $
+#     Date: $Date: 2004/01/22 19:13:45 $
+# Revision: $Revision: 1.124 $
diff -urN tiarra-20040114/NEWS tiarra-20040122/NEWS
--- tiarra-20040114/NEWS	2004-01-16 19:17:23.000000000 +0900
+++ tiarra-20040122/NEWS	2004-01-23 04:16:11.000000000 +0900
@@ -1,3 +1,10 @@
+2004-01-23  phonohawk  <phonohawk@lycos.co.uk>
+
+	* tiarra: 起動時オプション --make-password 追加。
+	make-passwordの機能をtiarra本体に移した。
+	
+	* make-password: 削除
+
 2003-11-17  Topia  <topia@clovery.jp>
 
 	* Log::Channel
ファイルtiarra-20040114/main/Unicode/Japanese.pmとtiarra-20040122/main/Unicode/Japanese.pmは違います
diff -urN tiarra-20040114/make-password tiarra-20040122/make-password
--- tiarra-20040114/make-password	2004-01-16 19:17:23.000000000 +0900
+++ tiarra-20040122/make-password	1970-01-01 09:00:00.000000000 +0900
@@ -1,21 +0,0 @@
-#!/usr/bin/perl
-# -----------------------------------------------------------------------------
-# $id$
-# -----------------------------------------------------------------------------
-require 5.006;
-use strict;
-use warnings;
-use lib (map{ (($0 =~ m%(.*[\\\/])[^\\\/]*$%)[0] || "").$_ } qw(main));
-use Crypt;
-use Term::ReadLine;
-
-$| = 1; # autoflush
-print "This tool encrypts your raw password for conf file of the Tiarra.\n";
-print "\n";
-
-my $term = Term::ReadLine->new('tiarra');
-my $raw = $term->readline("Please enter raw password: ");
-
-print "\n";
-print Crypt::encrypt($raw)." is your encoded password.\n";
-print "Use this for the general/tiarra-password entry.\n";
diff -urN tiarra-20040114/tiarra tiarra-20040122/tiarra
--- tiarra-20040114/tiarra	2004-01-16 19:17:23.000000000 +0900
+++ tiarra-20040122/tiarra	2004-01-23 04:16:11.000000000 +0900
@@ -5,12 +5,24 @@
 # This is free software; you can redistribute it and/or modify it
 #   under the same terms as Perl itself.
 # -----------------------------------------------------------------------------
-# $Id: tiarra,v 1.29 2003/11/17 01:27:19 topia Exp $
+# $Id: tiarra,v 1.31 2004/01/22 19:13:45 topia Exp $
 # -----------------------------------------------------------------------------
 require 5.006;
 use strict;
 use warnings;
-use lib (map{ (($0 =~ m%(.*[\\\/])[^\\\/]*$%)[0] || "").$_ } qw(main module));
+BEGIN {
+    use File::Basename;
+    use File::Spec;
+    my $add_inc = sub {
+	foreach my $path (@_) {
+	    unshift(@INC,
+		    map{ File::Spec->catdir($path, $_); } qw(main module));
+	}
+    };
+
+    $add_inc->(File::Spec->rel2abs(map dirname($_), (readlink($0), $0))) if (-l $0);
+    $add_inc->(dirname($0), ".");
+}
 use Configuration;
 use RunLoop;
 use ModuleManager;
@@ -82,6 +94,8 @@
     print "  --quiet          don't output any messages to stdout and stderr\n";
     print "  --no-fork        don't move to background when started in quiet mode\n";
     print "  --debug          show debug infomation\n";
+    print "  --make-password  prompt you a password to encrypt.\n";
+    print "                   *Tiarra doesn't do its normal work with this option*\n";
     print "   -D<symbol>[=<string>]\n";
     print "                   treat as `\@define <symbol> <string>' is in the conf\n";
     print "\n";
@@ -93,6 +107,22 @@
     print "\n";
 }
 
+sub make_password {
+    eval 'use Crypt;';
+    print "Tiarra encrypts your raw password to use it for config file.\n";
+    print "\n";
+
+    my $password = &find_option('make-password');
+    if ($password eq "1") {
+	eval 'use Term::ReadLine;';
+	my $term = Term::ReadLine->new('tiarra');
+	$password = $term->readline("Please enter raw password: ");
+	print "\n";
+    }
+    print Crypt::encrypt($password)." is your encoded password.\n";
+    print "Use this for the general/tiarra-password entry.\n";
+}
+
 sub find_option {
     my $option = shift;
     foreach my $arg (@ARGV) {
@@ -133,6 +163,9 @@
 } elsif (&find_option('dumpversion')) {
     print $version . "\n";
     exit;
+} elsif (&find_option('make-password')) {
+    &make_password;
+    exit;
 }
 
 if (&find_option('debug')) {
