blib/lib/Labyrinth/Plugin/Articles/Profiles.pm

filter: Statementstmt 73.5% 25 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 7 / 11 Podpod 100% 4 / 4 totaltotal 73.4% 36 / 49 CC 1 SCAR 3.1
CC
1
Cov
74%
List
2.0
Item
2.0
Admin
2.0
CRAP 1.4
↑ Summary
1 package Labyrinth::Plugin::Articles::Profiles;
2  
3 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 $VERSION = '1.03';
8  
9 =head1 NAME
10  
11 Labyrinth::Plugin::Articles::Profiles - Profiles plugin for Labyrinth framework
12  
13 =head1 DESCRIPTION
14  
15 Contains all the profile handling functionality for Labyrinth.
16  
17 This module forms part 1 of the Music Suite of modules for the Labyrinth
18 framework.
19  
20 The Profiles module only contains the basic handling of profiles currently. The
21 intention is to expand the stored data to include years active, in order to
22 create a Rock Family Tree style output, and example of which is included within
23 the distribution.
24  
25 =head1 THE MUSIC SUITE
26  
27 The Music Suite are a collection of modules, which can be used separately or
28 collectively, to help implement music related websites. These include modules
29 for managing band member profiles, MP3s, lyrics and discographies.
30  
31 =cut
32  
33 # -------------------------------------
34 # Library Modules
35  
36 5 ▶use base qw(Labyrinth::Plugin::Articles);
Subroutine BEGIN: called CC=1 SCAR=0.0
37  
38 5 ▶use Labyrinth::Audit;
Subroutine BEGIN: called CC=1 SCAR=0.0
39 5 ▶use Labyrinth::Variables;
Subroutine BEGIN: called CC=1 SCAR=0.0
40  
41 # -------------------------------------
42 # Variables
43  
44 5 ▶use vars qw($ALLSQL $SECTIONID);
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 5 $ALLSQL = 'AllArticles';
47 5 $SECTIONID = 5;
48  
49 # -------------------------------------
50 # Public Methods
51  
52 0 ▶sub List {
Subroutine List: not called CC=1 SCAR=6.9
Pod documented
53 0 $cgiparams{sectionid} = $SECTIONID;
54 0 shift->SUPER::List;
55 0 $tvars{profiles} = $tvars{mainarts};
56 }
57  
58 0 ▶sub Item {
Subroutine Item: not called CC=1 SCAR=6.9
Pod documented
59 0 shift->SUPER::Item;
60 0 $tvars{who} = $tvars{articles}->{$tvars{primary}};
61 }
62  
63 # -------------------------------------
64 # Admin Methods
65  
66 0 ▶sub Admin {
Subroutine Admin: not called CC=1 SCAR=6.9
Pod documented
67 0 $cgiparams{sectionid} = $SECTIONID;
68 0 shift->SUPER::Admin;
69 }
70  
71 0 ▶sub Edit {
Subroutine Edit: not called CC=1 SCAR=6.9
Pod documented
72 0 shift->SUPER::Edit;
73 0 $tvars{who} = $tvars{articles}->{$tvars{primary}};
74 }
75  
76 5 1;
77  
78 __END__
↑ Summary