summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-03-10 12:31:51 +0000
committerfukachan <fukachan>2001-03-10 12:31:51 +0000
commit1918c682eb6d05364f4f625f9af67df6dc18df78 (patch)
tree1dd7fccf2f57231f6206074ffa794d6a2d25f2aa
parent4f6d0b1b58068fb96c16565a77ef5dc1f51fcf1d (diff)
downloadfml8-1918c682eb6d05364f4f625f9af67df6dc18df78.tar.gz
fml8-1918c682eb6d05364f4f625f9af67df6dc18df78.tar.bz2
fml8-1918c682eb6d05364f4f625f9af67df6dc18df78.zip
nuke execute_ticket_system() which is not used
define regexp_compile() method which wraps _regexp_compile() for modules outside FML::Header::Subject.
-rw-r--r--fml/lib/FML/Header/Subject.pm56
-rw-r--r--fml/lib/FML/Ticket/Model/toymodel.pm3
2 files changed, 31 insertions, 28 deletions
diff --git a/fml/lib/FML/Header/Subject.pm b/fml/lib/FML/Header/Subject.pm
index 7677f17b..35054dd8 100644
--- a/fml/lib/FML/Header/Subject.pm
+++ b/fml/lib/FML/Header/Subject.pm
@@ -14,8 +14,26 @@ use vars qw(@ISA @EXPORT @EXPORT_OK);
use Carp;
use FML::Log qw(Log);
-require Exporter;
-@ISA = qw(Exporter);
+=head1 NAME
+
+FML::Header::Subject - manipule the header subject
+
+=head1 SYNOPSIS
+
+ use FML::Header::Subject;
+ FML::Header::Subject->rewrite_subject_tag($header, $config, $args);
+
+=head1 DESCRIPTION
+
+a collection of functions to manipulate the header subject.
+
+=head1 METHODS
+
+=head2 C<new()>
+
+the usual constructor.
+
+=cut
sub new
@@ -86,6 +104,13 @@ sub _regexp_compile
}
+sub regexp_compile
+{
+ my ($self, $string) = @_;
+ _regexp_compile($string);
+}
+
+
sub is_reply
{
my ($self, $subject) = @_;
@@ -118,33 +143,10 @@ sub _cut_off_reply
}
-sub execute_ticket_system
-{
- my ($self, $header, $config, $args) = @_;
- my $model = $config->{ ticket_model };
- my $pkg = "Ticket::Model::".$model;
- eval qq {require $pkg; $pkg->import();};
-
- $pkg->increment_id( $config->{ ticket_sequence_file });
-}
-
-
-=head1 NAME
-
-FML::Header::Subject.pm - what is this
-
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-=head2 new
-
-=item Function()
-
-
=head1 AUTHOR
+Ken'ichi Fukamachi
+
=head1 COPYRIGHT
Copyright (C) 2001 Ken'ichi Fukamachi
diff --git a/fml/lib/FML/Ticket/Model/toymodel.pm b/fml/lib/FML/Ticket/Model/toymodel.pm
index 0a784c3d..7186f46d 100644
--- a/fml/lib/FML/Ticket/Model/toymodel.pm
+++ b/fml/lib/FML/Ticket/Model/toymodel.pm
@@ -233,7 +233,8 @@ sub _extract_ticket_id
my $subject = $header->get('subject');
use FML::Header::Subject;
- my $regexp = FML::Header::Subject::_regexp_compile($tag);
+ my $obj = new FML::Header::Subject;
+ my $regexp = $obj->regexp_compile($tag);
if ($subject =~ /($regexp)\s*$/) {
my $id = $1;