| 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 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | 2 | ▶ | use vars qw($VERSION); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 2 | $VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/); | |
| 22 | |||
| 23 | 2 | ▶ | use WEsiteinfo (); # do not export anything |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | |||
| 25 | 2 | ▶ | use WE_Frontend::MainCommon; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | 2 | ▶ | use WE_Frontend::Info; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | |||
| 28 | 2 | ▶ | use base qw(Class::Accessor); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 29 | 2 | __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<WE_Frontend::Main2> instead. | ||
| 46 | |||
| 47 | =head2 METHODS | ||
| 48 | |||
| 49 | See the method list in L<WE_Frontend::MainCommon>. | ||
| 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 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 66 | 0 | 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 | 0 | ▶ | sub _pseudo_wesiteinfo_obj { |
|
Subroutine
_pseudo_wesiteinfo_obj: not called CC=1 SCAR=6.9
| |||
| 75 | 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 | 2 | 1; | |
| 100 | |||
| 101 | __END__ | ||