WE_Frontend/Main2.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 73.0% 19 / 26 CC 1 SCAR 1.8
CC
1
Cov
71%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« WE_Frontend/Plugin/WE_Navigation_WML.pm ↑ Summary WebEditor/OldFeatures/HTMLFilterHack.pm »
1 # -*- perl -*-
2  
3 #
4 # $Id: Main2.pm,v 1.4 2003/12/16 15:21:23 eserte Exp $
5 # Author: Slaven Rezic
6 #
7 # Copyright (C) 2002 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::Main2;
18  
19 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 6 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
21 6 $VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
22  
23 package WE_Frontend::Main;
24  
25 6 ▶use base qw(Class::Accessor);
Subroutine BEGIN: called CC=1 SCAR=0.0
26 6 __PACKAGE__->mk_accessors(qw(Root Config));
27  
28 6 ▶use WE_Frontend::MainCommon;
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 =head1 NAME
31  
32 WE_Frontend::Main2 - a collection of we_redisys (frontend) related functions
33  
34 =head1 SYNOPSIS
35  
36 use WE_Frontend::Main2;
37 my $fe = new WE_Frontend::Main -root => $root, -config => $wesiteinfo_config_object;
38 $fe->publish;
39 $fe->searchindexer;
40  
41 =head1 DESCRIPTION
42  
43 This is the next generation of the old C<WE_Frontend::Main> module.
44 Both modules share the same methods, but have a different constructor
45 API.
46  
47 Note that all methods are loaded into the C<WE_Frontend::Main>.
48 Therefore it is not possible to use the old and this version of the
49 module at the same time.
50  
51 Because of this, you cannot "use base" for inheritance, but rather:
52  
53 use WE_Frontend::Main2;
54 push @ISA, "WE_Frontend::Main";
55  
56 =head2 MEMBERS
57  
58 The C<WE_Frontend::Main2> class has two members: C<Root> and C<Config>.
59  
60 =head2 METHODS
61  
62 See the method listing in L<WE_Frontend::MainCommon>.
63  
64 =cut
65  
66 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
67 0 my($class, %args) = @_;
68 0 my $self = {};
69 0 bless $self, $class;
70 0 $self->Root($args{-root});
71 0 $self->Config($args{-config});
72 0 $self;
73 }
74  
75 6 1;
76  
77 __END__
« WE_Frontend/Plugin/WE_Navigation_WML.pm ↑ Summary WebEditor/OldFeatures/HTMLFilterHack.pm »