| 1 | package Labyrinth::Plugin::Articles::Lyrics; | ||||||||||||||||||||||||||||
| 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::Lyrics - Lyrics plugin for the Labyrinth framework | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | Contains all the lyrics handling functionality, as part of the Music Suite of | ||||||||||||||||||||||||||||
| 16 | modules for the Labyrinth web framework. | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | Contains all the lyrics handling functionality for Labyrinth. | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | This module forms part 2 of the Music Suite of modules for the Labyrinth web | ||||||||||||||||||||||||||||
| 23 | framework. | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | The Lyrics module only contains the basic handling of lyrics. With a future | ||||||||||||||||||||||||||||
| 26 | distribution, the lyrics and/or poems can be grouped into collections, which | ||||||||||||||||||||||||||||
| 27 | can then be attributed as a release, such as an album or book. | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | =head1 THE MUSIC SUITE | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | The Music Suite are a collection of modules, which can be used separately or | ||||||||||||||||||||||||||||
| 32 | collectively, to help implement music related websites. These include modules | ||||||||||||||||||||||||||||
| 33 | for managing band member lyrics, MP3s, lyrics and discographies. | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | =cut | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | # ------------------------------------- | ||||||||||||||||||||||||||||
| 38 | # Library Modules | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 5 | ▶ | use base qw(Labyrinth::Plugin::Articles); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 5 | ▶ | use Labyrinth::Audit; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 43 | 5 | ▶ | use Labyrinth::DBUtils; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 44 | 5 | ▶ | use Labyrinth::MLUtils; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 45 | 5 | ▶ | use Labyrinth::Variables; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | # ------------------------------------- | ||||||||||||||||||||||||||||
| 48 | # Variables | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 5 | my $ALLSQL = 'AllArticles'; | |||||||||||||||||||||||||||
| 51 | 5 | my $SECTIONID = 7; | |||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | # ------------------------------------- | ||||||||||||||||||||||||||||
| 54 | # Public Methods | ||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 0 | ▶ | sub List { | ||||||||||||||||||||||||||
|
Subroutine
List: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 57 | 0 | $cgiparams{sectionid} = $SECTIONID; | |||||||||||||||||||||||||||
| 58 | 0 | $settings{data}{article_limit} = $settings{lyrics_limit}; | |||||||||||||||||||||||||||
| 59 | 0 | $settings{data}{article_stop} = $settings{lyrics_stop}; | |||||||||||||||||||||||||||
| 60 | 0 | $settings{data}{order} = 'title'; | |||||||||||||||||||||||||||
| 61 | 0 | shift->SUPER::List; | |||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | # ------------------------------------- | ||||||||||||||||||||||||||||
| 65 | # Admin Methods | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | 0 | ▶ | sub Admin { | ||||||||||||||||||||||||||
|
Subroutine
Admin: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 68 | 0 | $cgiparams{sectionid} = $SECTIONID; | |||||||||||||||||||||||||||
| 69 | 0 | shift->SUPER::Admin; | |||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 0 | ▶ | sub LyricSelect { | ||||||||||||||||||||||||||
|
Subroutine
LyricSelect: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 73 | 0 | my ($opt,$blank) = @_; | |||||||||||||||||||||||||||
| 74 | 0 | my @list = $dbi->GetQuery('hash',$ALLSQL,{where => "WHERE sectionid=$SECTIONID"}); | |||||||||||||||||||||||||||
| 75 | 0 | ▶ | unshift @list, {articleid=>0,title=>'Select Lyric'} if(defined $blank && $blank == 1); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $blank and $blank == 1
MC/DC0%0/2
defined $blank and $blank == 1
defined $blank
$blank == 1
Truth table0%0/3
A and B
A= defined $blankB= $blank == 1
| |||||||||||||||||||||||||||||
| 76 | 0 | DropDownRows($opt,'lyricid','articleid','title',@list); | |||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | 5 | 1; | |||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | __END__ | ||||||||||||||||||||||||||||