summaryrefslogtreecommitdiff
path: root/fml/lib/FML
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-08-14 03:31:55 +0000
committerfukachan <fukachan>2002-08-14 03:31:55 +0000
commitf58276939fe963f45c9d803ec182e0815e573eda (patch)
tree746e08590e556910e2fd5469b70061205c192bf3 /fml/lib/FML
parente191040fd7cb8c36b6f74fb7332c1bf45f5c9e56 (diff)
downloadfml8-f58276939fe963f45c9d803ec182e0815e573eda.tar.gz
fml8-f58276939fe963f45c9d803ec182e0815e573eda.tar.bz2
fml8-f58276939fe963f45c9d803ec182e0815e573eda.zip
apply fix_perl_include_path(); after load_config_files() runs to add
ml local library path to @INC. This is used for ml specific extention e.g. command extension.
Diffstat (limited to 'fml/lib/FML')
-rw-r--r--fml/lib/FML/Process/Alias.pm3
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm3
-rw-r--r--fml/lib/FML/Process/Command.pm3
-rw-r--r--fml/lib/FML/Process/ConfViewer.pm3
-rw-r--r--fml/lib/FML/Process/Configure.pm3
-rw-r--r--fml/lib/FML/Process/Distribute.pm3
-rw-r--r--fml/lib/FML/Process/DocViewer.pm3
-rw-r--r--fml/lib/FML/Process/Error.pm3
-rw-r--r--fml/lib/FML/Process/HTMLify.pm3
-rw-r--r--fml/lib/FML/Process/Kernel.pm21
-rw-r--r--fml/lib/FML/Process/Spool.pm3
-rw-r--r--fml/lib/FML/Process/ThreadTrack.pm3
12 files changed, 42 insertions, 12 deletions
diff --git a/fml/lib/FML/Process/Alias.pm b/fml/lib/FML/Process/Alias.pm
index a7b2c79f..169971ee 100644
--- a/fml/lib/FML/Process/Alias.pm
+++ b/fml/lib/FML/Process/Alias.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Alias.pm,v 1.1 2002/04/25 04:46:09 fukachan Exp $
+# $FML: Alias.pm,v 1.2 2002/06/27 08:25:49 fukachan Exp $
#
package FML::Process::Alias;
@@ -75,6 +75,7 @@ sub prepare
# $curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'fmlalias_prepare_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index 852cc401..8e007551 100644
--- a/fml/lib/FML/Process/CGI/Kernel.pm
+++ b/fml/lib/FML/Process/CGI/Kernel.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Kernel.pm,v 1.40 2002/07/17 12:13:25 fukachan Exp $
+# $FML: Kernel.pm,v 1.41 2002/07/19 03:13:03 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -91,6 +91,7 @@ sub prepare
$curproc->_cgi_resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
print header(-type => "text/html; charset=$charset",
-charset => $charset,
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 2e887a66..6584629a 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.70 2002/08/03 13:13:24 fukachan Exp $
+# $FML: Command.pm,v 1.71 2002/08/08 03:09:47 fukachan Exp $
#
package FML::Process::Command;
@@ -82,6 +82,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$curproc->scheduler_init();
$curproc->parse_incoming_message($args);
diff --git a/fml/lib/FML/Process/ConfViewer.pm b/fml/lib/FML/Process/ConfViewer.pm
index 460ccb9c..95b2ccfd 100644
--- a/fml/lib/FML/Process/ConfViewer.pm
+++ b/fml/lib/FML/Process/ConfViewer.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: ConfViewer.pm,v 1.13 2002/06/30 01:23:55 fukachan Exp $
+# $FML: ConfViewer.pm,v 1.14 2002/07/02 03:58:33 fukachan Exp $
#
package FML::Process::ConfViewer;
@@ -76,6 +76,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'fmlconf_prepare_end_hook' );
if ($eval) {
diff --git a/fml/lib/FML/Process/Configure.pm b/fml/lib/FML/Process/Configure.pm
index 2bf16d77..5a7e6149 100644
--- a/fml/lib/FML/Process/Configure.pm
+++ b/fml/lib/FML/Process/Configure.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Configure.pm,v 1.41 2002/06/27 08:25:49 fukachan Exp $
+# $FML: Configure.pm,v 1.42 2002/07/02 12:40:18 fukachan Exp $
#
package FML::Process::Configure;
@@ -75,6 +75,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'makefml_prepare_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 11ac0e9b..679707bc 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.88 2002/08/03 10:35:08 fukachan Exp $
+# $FML: Distribute.pm,v 1.89 2002/08/03 13:13:24 fukachan Exp $
#
package FML::Process::Distribute;
@@ -82,6 +82,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$curproc->scheduler_init();
$curproc->parse_incoming_message($args);
diff --git a/fml/lib/FML/Process/DocViewer.pm b/fml/lib/FML/Process/DocViewer.pm
index 862eaa21..ba9e403f 100644
--- a/fml/lib/FML/Process/DocViewer.pm
+++ b/fml/lib/FML/Process/DocViewer.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: DocViewer.pm,v 1.17 2002/06/27 08:25:50 fukachan Exp $
+# $FML: DocViewer.pm,v 1.18 2002/07/02 03:58:49 fukachan Exp $
#
package FML::Process::DocViewer;
@@ -78,6 +78,7 @@ sub prepare
# $curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'fmldoc_prepare_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm
index a1111435..e518053a 100644
--- a/fml/lib/FML/Process/Error.pm
+++ b/fml/lib/FML/Process/Error.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Error.pm,v 1.17 2002/08/08 03:09:48 fukachan Exp $
+# $FML: Error.pm,v 1.18 2002/08/09 08:35:36 fukachan Exp $
#
package FML::Process::Error;
@@ -75,6 +75,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$curproc->scheduler_init();
if ($config->yes('use_error_analyzer')) {
diff --git a/fml/lib/FML/Process/HTMLify.pm b/fml/lib/FML/Process/HTMLify.pm
index 3fc168fe..cc4fb800 100644
--- a/fml/lib/FML/Process/HTMLify.pm
+++ b/fml/lib/FML/Process/HTMLify.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: HTMLify.pm,v 1.20 2002/06/27 08:25:50 fukachan Exp $
+# $FML: HTMLify.pm,v 1.21 2002/07/02 03:59:19 fukachan Exp $
#
package FML::Process::HTMLify;
@@ -73,6 +73,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'fmlhtmlify_prepare_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 86bdb11c..dd7b00f0 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Kernel.pm,v 1.123 2002/08/07 14:58:38 fukachan Exp $
+# $FML: Kernel.pm,v 1.124 2002/08/08 03:09:48 fukachan Exp $
#
package FML::Process::Kernel;
@@ -749,6 +749,25 @@ sub load_config_files
}
+# Descriptions: add ml local library path into @INC
+# Arguments: OBJ($OBJ)
+# Side Effects: update @INC
+# Return Value: none
+sub fix_perl_include_path
+{
+ my ($curproc) = @_;
+ my $config = $curproc->{ config };
+
+ # XXX update @INC here since we should do after loading configurations.
+ # update @INC for ml local libraries
+ if (defined $config->{ ml_home_dir } &&
+ $config->{ ml_home_dir } &&
+ defined $config->{ ml_local_lib_dir }) {
+ unshift(@INC, $config->{ ml_local_lib_dir });
+ }
+}
+
+
=head2 C<parse_incoming_message($args)>
C<preapre()> method calls this to
diff --git a/fml/lib/FML/Process/Spool.pm b/fml/lib/FML/Process/Spool.pm
index e323493e..c5ea5dfb 100644
--- a/fml/lib/FML/Process/Spool.pm
+++ b/fml/lib/FML/Process/Spool.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Spool.pm,v 1.6 2002/06/27 08:25:50 fukachan Exp $
+# $FML: Spool.pm,v 1.7 2002/06/30 01:23:55 fukachan Exp $
#
package FML::Process::Spool;
@@ -71,6 +71,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'fmlspool_prepare_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
diff --git a/fml/lib/FML/Process/ThreadTrack.pm b/fml/lib/FML/Process/ThreadTrack.pm
index 9f5e9bb7..91d1b267 100644
--- a/fml/lib/FML/Process/ThreadTrack.pm
+++ b/fml/lib/FML/Process/ThreadTrack.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: ThreadTrack.pm,v 1.30 2002/06/30 01:23:00 fukachan Exp $
+# $FML: ThreadTrack.pm,v 1.31 2002/07/02 03:59:42 fukachan Exp $
#
package FML::Process::ThreadTrack;
@@ -70,6 +70,7 @@ sub prepare
$curproc->resolve_ml_specific_variables( $args );
$curproc->load_config_files( $args->{ cf_list } );
+ $curproc->fix_perl_include_path();
$eval = $config->get_hook( 'fmlthread_prepare_end_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }