File Coverage

blib/lib/Labyrinth/Plugin/Articles/Profiles.pm
Criterion Covered Total %
statement 13 15 86.6
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Labyrinth::Plugin::Articles::Profiles;
2              
3 5     5   78530 use warnings;
  5         7  
  5         164  
4 5     5   20 use strict;
  5         5  
  5         136  
5              
6 5     5   19 use vars qw($VERSION);
  5         7  
  5         310  
7             $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     5   23 use base qw(Labyrinth::Plugin::Articles);
  5         9  
  5         1648  
37              
38 5     5   3095 use Labyrinth::Audit;
  0            
  0            
39             use Labyrinth::Variables;
40              
41             # -------------------------------------
42             # Variables
43              
44             use vars qw($ALLSQL $SECTIONID);
45              
46             $ALLSQL = 'AllArticles';
47             $SECTIONID = 5;
48              
49             # -------------------------------------
50             # Public Methods
51              
52             sub List {
53             $cgiparams{sectionid} = $SECTIONID;
54             shift->SUPER::List;
55             $tvars{profiles} = $tvars{mainarts};
56             }
57              
58             sub Item {
59             shift->SUPER::Item;
60             $tvars{who} = $tvars{articles}->{$tvars{primary}};
61             }
62              
63             # -------------------------------------
64             # Admin Methods
65              
66             sub Admin {
67             $cgiparams{sectionid} = $SECTIONID;
68             shift->SUPER::Admin;
69             }
70              
71             sub Edit {
72             shift->SUPER::Edit;
73             $tvars{who} = $tvars{articles}->{$tvars{primary}};
74             }
75              
76             1;
77              
78             __END__