| 1 | package OpenInteract2::Manage::Website::ListObjects; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # $Id: ListObjects.pm,v 1.10 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 | 87 | ▶ | use OpenInteract2::Setup; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 87 | $OpenInteract2::Manage::Website::ListObjects::VERSION = sprintf("%d.%02d", q$Revision: 1.10 $ =~ /(\d+)\.(\d+)/); | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 87 | ▶ | sub get_name { | ||||||||||||||||||||||||||
|
Subroutine
get_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 13 | 87 | return 'list_objects'; | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | sub get_brief_description { | ||||||||||||||||||||||||||
|
Subroutine
get_brief_description: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 17 | 0 | return 'List SPOPS objects available in a website'; | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | # get_parameters() inherited from parent | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | sub run_task { | ||||||||||||||||||||||||||
|
Subroutine
run_task: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 23 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 24 | 0 | my $spops_config = CTX->spops_config; | |||||||||||||||||||||||||||
| 25 | OBJECT: | ||||||||||||||||||||||||||||
| 26 | 0 | foreach my $alias ( sort keys %{ $spops_config } ) { | |||||||||||||||||||||||||||
| 27 | 0 | ▶ | next OBJECT unless ( $alias and $alias !~ /^_/ ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$alias and not $alias =~ /^_/
MC/DC0%0/2
$alias and not $alias =~ /^_/
$alias
not $alias =~ /^_/
Truth table0%0/3
A and not(B)
A= $aliasB= not $alias =~ /^_/
| |||||||||||||||||||||||||||||
| 28 | 0 | my $object_info = $spops_config->{ $alias }; | |||||||||||||||||||||||||||
| 29 | 0 | my @alias_list = ( $alias ); | |||||||||||||||||||||||||||
| 30 | 0 | ▶ | if ( ref $object_info->{alias} eq 'ARRAY' ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 0 | push @alias_list, @{ $object_info->{alias} }; | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | $self->_ok( | ||||||||||||||||||||||||||||
| 34 | 'OpenInteract2 SPOPS object', | ||||||||||||||||||||||||||||
| 35 | "SPOPS object $alias is a $object_info->{class}", | ||||||||||||||||||||||||||||
| 36 | name => $alias, | ||||||||||||||||||||||||||||
| 37 | alias => \@alias_list, | ||||||||||||||||||||||||||||
| 38 | class => CTX->lookup_object( $alias ), | ||||||||||||||||||||||||||||
| 39 | isa => $object_info->{isa}, | ||||||||||||||||||||||||||||
| 40 | rule => $object_info->{rules_from} | ||||||||||||||||||||||||||||
| 41 | 0 | ); | |||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 87 | OpenInteract2::Manage->register_factory_type( get_name() => __PACKAGE__ ); | |||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 87 | 1; | |||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | __END__ | ||||||||||||||||||||||||||||