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 SCAR 0.2
CC
1
Cov
74%
List
2.0
Item
2.0
Admin
2.0
CRAP 1.0
↑ 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.02';
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 sub List {
53 0 ▶ $cgiparams{sectionid} = $SECTIONID;
Subroutine List: not called CC=1 SCAR=6.9
Pod documented
54 0 shift->SUPER::List;
55 0 $tvars{profiles} = $tvars{mainarts};
56 }
57  
58 sub Item {
59 0 ▶ shift->SUPER::Item;
Subroutine Item: not called CC=1 SCAR=6.9
Pod documented
60 0 $tvars{who} = $tvars{articles}->{$tvars{primary}};
61 }
62  
63 # -------------------------------------
64 # Admin Methods
65  
66 sub Admin {
67 0 ▶ $cgiparams{sectionid} = $SECTIONID;
Subroutine Admin: not called CC=1 SCAR=6.9
Pod documented
68 0 shift->SUPER::Admin;
69 }
70  
71 sub Edit {
72 0 ▶ shift->SUPER::Edit;
Subroutine Edit: not called CC=1 SCAR=6.9
Pod documented
73 0 $tvars{who} = $tvars{articles}->{$tvars{primary}};
74 }
75  
76 5 1;
77  
78 __END__
79  
80 # -------------------------------------
81 # Documentation
82  
83 =head1 PUBLIC INTERFACE METHODS
84  
85 =over 4
86  
87 =item List
88  
89 Retrieves an initial list of profile entries. Primarily used to prepare a front
90 page.
91  
92 =item Item
93  
94 Provides a single profile entry.
95  
96 =back
97  
98 =head1 ADMIN INTERFACE METHODS
99  
100 =over 4
101  
102 =item Access
103  
104 Check whether user has the appropriate admin access.
105  
106 =item Admin
107  
108 Lists the current set of profile entries.
109  
110 Also provides the delete, copy and promote functionality from the main
111 administration page for the given section.
112  
113 =item Add
114  
115 Add a profile entry.
116  
117 =item Edit
118  
119 Edit a profile entry.
120  
121 =item Save
122  
123 Save a profile entry.
124  
125 =item Delete
126  
127 Delete a profile entry.
128  
129 =item AddParagraph
130  
131 Add a text block to the current article.
132  
133 =item AddImage
134  
135 Add an image block to the current article.
136  
137 =item AddLink
138  
139 Add a link block to the current article.
140  
141 =item DeleteItem
142  
143 Delete an article block.
144  
145 =item Relocate
146  
147 Relocate an article in a list, where an order is in use.
148  
149 =back
150  
151 =head1 SEE ALSO
152  
153 Labyrinth
154  
155 =head1 AUTHOR
156  
157 Barbie, <barbie@missbarbell.co.uk> for
158 Miss Barbell Productions, L<http://www.missbarbell.co.uk/>
159  
160 =head1 COPYRIGHT & LICENSE
161  
162 Copyright (C) 2002-2014 Barbie for Miss Barbell Productions
163 All Rights Reserved.
164  
165 This distribution is free software; you can redistribute it and/or
166 modify it under the Artistic Licence v2.
167  
168 =cut
↑ Summary