OpenInteract2/Manage/Website/ListPackages.pm

filter: Statementstmt 59.0% 13 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 3 totaltotal 54.8% 17 / 31 CC 2 SCAR 9.4
CC
2
Cov
59%
run_task
6.0
get_brief_description
2.0
BEGIN
1.0
CRAP 2.6
« OpenInteract2/Log.pm ↑ Summary OpenInteract2/Brick/Base.pm »
1 package OpenInteract2::Manage::Website::ListPackages;
2  
3 # $Id: ListPackages.pm,v 1.11 2005/03/17 14:58:04 sjn Exp $
4  
5 87 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 87 ▶use base qw( OpenInteract2::Manage::Website );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 87 ▶use OpenInteract2::Context qw( CTX );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 87 $OpenInteract2::Manage::Website::ListPackages::VERSION = sprintf("%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/);
10  
11 87 ▶sub get_name {
Subroutine get_name: called CC=1 SCAR=0.0
Pod undocumented
12 87 return 'list_packages';
13 }
14  
15 0 ▶sub get_brief_description {
Subroutine get_brief_description: not called CC=1 SCAR=6.9
Pod undocumented
16 0 return 'List packages available in a website';
17 }
18  
19 # get_parameters() inherited from parent
20  
21 0 ▶sub run_task {
Subroutine run_task: not called CC=2 SCAR=17.9
Pod undocumented
22 0 my ( $self ) = @_;
23 0 my @packages = @{ CTX->packages };
24 0 my @sorted_packages = sort { $a->name cmp $b->name } @packages;
25 0 foreach my $pkg ( @sorted_packages ) {
26 0 my ( $name, $version ) = ( $pkg->name, $pkg->version );
27 0 $self->_ok(
28 'OpenInteract2 Package',
29 "Package $name-$version in site",
30 name => $pkg->name,
31 version => $pkg->version,
32 install_date => $pkg->installed_date,
33 directory => $pkg->directory
34 );
35 }
36 }
37  
38 87 OpenInteract2::Manage->register_factory_type( get_name() => __PACKAGE__ );
39  
40 87 1;
41  
42 __END__
« OpenInteract2/Log.pm ↑ Summary OpenInteract2/Brick/Base.pm »