line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# $Id: Main.pm,v 1.4 2003/12/16 15:21:23 eserte Exp $ |
5
|
|
|
|
|
|
|
# Author: Slaven Rezic |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Copyright (C) 2001 Online Office Berlin. All rights reserved. |
8
|
|
|
|
|
|
|
# Copyright (C) 2002 Slaven Rezic. |
9
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under the |
10
|
|
|
|
|
|
|
# terms of the GNU General Public License, see the file COPYING. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Mail: slaven@rezic.de |
14
|
|
|
|
|
|
|
# WWW: http://we-framework.sourceforge.net |
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
package WE_Frontend::Main; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
2
|
|
9058
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
70
|
|
20
|
2
|
|
|
2
|
|
11
|
use vars qw($VERSION); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
203
|
|
21
|
|
|
|
|
|
|
$VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/); |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
2
|
|
970
|
use WEsiteinfo (); # do not export anything |
|
2
|
|
|
|
|
815
|
|
|
2
|
|
|
|
|
40
|
|
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
2
|
|
1177
|
use WE_Frontend::MainCommon; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
56
|
|
26
|
2
|
|
|
2
|
|
1062
|
use WE_Frontend::Info; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
96
|
|
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
2
|
|
14
|
use base qw(Class::Accessor); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
765
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(Root Config)); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
WE_Frontend::Main - a collection of we_redisys (frontend) related functions |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
use WE_Frontend::Main; |
38
|
|
|
|
|
|
|
my $fe = new WE_Frontend::Main $root; |
39
|
|
|
|
|
|
|
$fe->publish; |
40
|
|
|
|
|
|
|
$fe->searchindexer; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 DESCRIPTION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This module is obsolete and only for backward compatibility. Please |
45
|
|
|
|
|
|
|
use L instead. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
See the method list in L. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 CONFIGURATION VARIABLES |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Please consult the source (function C<_pseudo_wesiteinfo_obj>) to see |
54
|
|
|
|
|
|
|
which configuration variables match the new-style members. For |
55
|
|
|
|
|
|
|
example, the new |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$c->paths->rootdir |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
corresponds to the old |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
$WEsiteinfo::rootdir |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub new { |
66
|
0
|
|
|
0
|
1
|
|
my($class, $root) = @_; |
67
|
0
|
|
|
|
|
|
my $self = {}; |
68
|
0
|
|
|
|
|
|
bless $self, $class; |
69
|
0
|
|
|
|
|
|
$self->Root($root); |
70
|
0
|
|
|
|
|
|
$self->Config(_pseudo_wesiteinfo_obj()); |
71
|
0
|
|
|
|
|
|
$self; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub _pseudo_wesiteinfo_obj { |
75
|
0
|
|
|
0
|
|
|
my $c = bless {}, 'WEsiteinfo'; |
76
|
0
|
|
|
|
|
|
my $paths = bless {}, 'WEsiteinfo::Paths'; |
77
|
0
|
|
|
|
|
|
$paths->rootdir($WEsiteinfo::rootdir); |
78
|
0
|
|
|
|
|
|
$paths->cgidir($WEsiteinfo::cgidirfs); |
79
|
0
|
|
|
|
|
|
$paths->pubhtmldir($WEsiteinfo::pubhtmldir); |
80
|
0
|
|
|
|
|
|
$c->paths($paths); |
81
|
0
|
|
|
|
|
|
my $staging = bless {}, 'WEsiteinfo::Staging'; |
82
|
0
|
|
|
|
|
|
$staging->transport($WEsiteinfo::livetransport); |
83
|
0
|
|
|
|
|
|
$staging->user($WEsiteinfo::liveuser); |
84
|
0
|
|
|
|
|
|
$staging->password($WEsiteinfo::livepassword); |
85
|
0
|
|
|
|
|
|
$staging->host($WEsiteinfo::livehost); |
86
|
0
|
|
|
|
|
|
$staging->directory($WEsiteinfo::livedirectory); |
87
|
0
|
|
|
|
|
|
$staging->cgidirectory($WEsiteinfo::livecgidirectory); |
88
|
0
|
|
|
|
|
|
$staging->stagingext($WEsiteinfo::livestagingext); |
89
|
0
|
|
|
|
|
|
$c->staging($staging); |
90
|
0
|
|
|
|
|
|
my $search = bless {}, 'WEsiteinfo::SearchEngine'; |
91
|
0
|
|
|
|
|
|
$search->searchindexer($WEsiteinfo::searchindexer); |
92
|
0
|
|
|
|
|
|
$c->searchengine($search); |
93
|
0
|
|
|
|
|
|
my $p = bless {}, 'WEprojectinfo'; |
94
|
0
|
|
|
|
|
|
$p->stagingextracgi([@WEsiteinfo::stagingextracgi]); |
95
|
0
|
|
|
|
|
|
$c->project($p); |
96
|
0
|
|
|
|
|
|
$c; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
1; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
__END__ |