« OpenInteract2/Manage/Package/Export.pm
↑ Summary
OpenInteract2/Manage/Website/UpdatePackageFromWebsite.pm »
| 1 | package OpenInteract2::Manage::Website::ListActions; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # $Id: ListActions.pm,v 1.12 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::Action; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 87 | ▶ | use OpenInteract2::Context qw( CTX ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 87 | ▶ | use OpenInteract2::Setup; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 87 | $OpenInteract2::Manage::Website::ListActions::VERSION = sprintf("%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/); | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 87 | ▶ | sub get_name { | ||||||||||||||||||||||||||
|
Subroutine
get_name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 14 | 87 | return 'list_actions'; | |||||||||||||||||||||||||||
| 15 | } | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | sub get_brief_description { | ||||||||||||||||||||||||||
|
Subroutine
get_brief_description: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 18 | 0 | return 'List actions available in a website'; | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | # get_parameters() inherited from parent | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 0 | ▶ | sub run_task { | ||||||||||||||||||||||||||
|
Subroutine
run_task: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 24 | 0 | my ( $self ) = @_; | |||||||||||||||||||||||||||
| 25 | 0 | my $action_table = CTX->action_table; | |||||||||||||||||||||||||||
| 26 | 0 | foreach my $name ( sort keys %{ $action_table } ) { | |||||||||||||||||||||||||||
| 27 | 0 | ▶ | next unless ( $name ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 28 | 0 | my $action_info = $action_table->{ $name }; | |||||||||||||||||||||||||||
| 29 | 0 | my $action = OpenInteract2::Action->new( $action_info ); | |||||||||||||||||||||||||||
| 30 | 0 | my $urls = $action->get_dispatch_urls; | |||||||||||||||||||||||||||
| 31 | 0 | ▶ | unless ( ref( $urls ) && $urls->[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $urls and $urls->[0]
MC/DC0%0/2
ref $urls and $urls->[0]
ref $urls
$urls->[0]
Truth table0%0/3
A and B
A= ref $urlsB= $urls->[0]
| |||||||||||||||||||||||||||||
| 32 | 0 | $urls = [ 'n/a' ]; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | $self->_ok( | ||||||||||||||||||||||||||||
| 35 | 'OpenInteract2 Action', | ||||||||||||||||||||||||||||
| 36 | "Action $name mapped to $urls->[0]", | ||||||||||||||||||||||||||||
| 37 | url => $urls, | ||||||||||||||||||||||||||||
| 38 | name => $name, | ||||||||||||||||||||||||||||
| 39 | type => $action_info->{type}, | ||||||||||||||||||||||||||||
| 40 | class => $action_info->{class}, | ||||||||||||||||||||||||||||
| 41 | method => $action_info->{method}, | ||||||||||||||||||||||||||||
| 42 | template => $action_info->{template} | ||||||||||||||||||||||||||||
| 43 | 0 | ); | |||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 87 | OpenInteract2::Manage->register_factory_type( get_name() => __PACKAGE__ ); | |||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 87 | 1; | |||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||||||||||