summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/HTMLify.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-02-17 03:07:55 +0000
committerfukachan <fukachan>2002-02-17 03:07:55 +0000
commitab2ef9ed7dcb834731c6a853c246fe5de6f8cc72 (patch)
tree42f936400436188af258a88b4ac257befa8def90 /fml/lib/FML/Process/HTMLify.pm
parent6c32f087e4c064b9c678a086d1bd1d5df9f5e756 (diff)
downloadfml8-ab2ef9ed7dcb834731c6a853c246fe5de6f8cc72.tar.gz
fml8-ab2ef9ed7dcb834731c6a853c246fe5de6f8cc72.tar.bz2
fml8-ab2ef9ed7dcb834731c6a853c246fe5de6f8cc72.zip
implement several hooks
Diffstat (limited to 'fml/lib/FML/Process/HTMLify.pm')
-rw-r--r--fml/lib/FML/Process/HTMLify.pm31
1 files changed, 27 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/HTMLify.pm b/fml/lib/FML/Process/HTMLify.pm
index 710cc12a..bba50378 100644
--- a/fml/lib/FML/Process/HTMLify.pm
+++ b/fml/lib/FML/Process/HTMLify.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000-2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: HTMLify.pm,v 1.8 2002/02/01 12:03:56 fukachan Exp $
+# $FML: HTMLify.pm,v 1.9 2002/02/02 08:04:53 fukachan Exp $
#
package FML::Process::HTMLify;
@@ -65,7 +65,11 @@ sub new
# Return Value: none
sub prepare
{
- ;
+ my $eval = $config->get_hook( 'fmlhtmlify_prepare_start_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
+
+ $eval = $config->get_hook( 'fmlhtmlify_prepare_end_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
}
@@ -75,7 +79,11 @@ sub prepare
# Return Value: none
sub verify_request
{
- ;
+ my $eval = $config->get_hook( 'fmlhtmlify_verify_request_start_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
+
+ $eval = $config->get_hook( 'fmlhtmlify_verify_request_end_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
}
@@ -99,6 +107,9 @@ sub run
print STDERR "htmlify\t$src_dir =>\n\t\t$dst_dir\n" if $debug;
+ my $eval = $config->get_hook( 'fmlhtmlify_run_start_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
+
# prepend $opt_I as @INC
if (defined $options->{ I }) {
print STDERR "\t\tprepend $options->{ I } (\@INC)\n" if $debug;
@@ -126,6 +137,9 @@ sub run
else {
croak("no destination directory\n");
}
+
+ $eval = $config->get_hook( 'fmlhtmlify_run_end_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
}
@@ -154,7 +168,16 @@ _EOF_
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: none
# Return Value: none
-sub finish {}
+sub finish
+{
+ my ($curproc, $args) = @_;
+
+ my $eval = $config->get_hook( 'fmlhtmlify_finish_start_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
+
+ $eval = $config->get_hook( 'fmlhtmlify_finish_end_hook' );
+ if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
+}
# Descriptions: dummy to avoid to take data from STDIN