lib/AI/MicroStructure/any.pm

filter: Statementstmt 61.5% 16 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 5 / 10 Podpod 0.0% 0 / 4 totaltotal 52.5% 21 / 40 CC 1 SCAR 3.4
CC
1
Cov
62%
__ANON__
2.0
name
2.0
new
2.0
CRAP 1.4
« lib/AI/MicroStructure/Remember.pm ↑ Summary lib/AI/MicroStructure/List.pm »
1 package AI::MicroStructure::any;
2 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 6 ▶use List::Util 'shuffle';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use AI::MicroStructure ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 our $Theme = 'any';
7  
8 sub import {
9 # export the microany function
10 5 ▶ my $callpkg = caller;
Subroutine import: called CC=1 SCAR=0.5
11 5 my $micro = AI::MicroStructure->new();
12 5 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 0 ▶ *{"$callpkg\::microany"} = sub { $micro->name( @_ ) };
Subroutine __ANON__: not called CC=1 SCAR=6.9
14 }
15  
16 sub name {
17 0 ▶ my $self = shift;
Subroutine name: not called CC=1 SCAR=6.9
Pod undocumented
18 my $theme =
19 0 ( shuffle( grep { !/^(?:any|random)$/ } AI::MicroStructure->structures() ) )[0];
20 0 $self->{micro}->name( $theme, @_ );
21 }
22  
23 sub new {
24 0 ▶ my $class = shift;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
25  
26 # we need a full AI::MicroStructure object, to support AMS::Locale
27 0 return bless { micro => AI::MicroStructure->new( @_ ) }, $class;
28 }
29  
30 0 ▶sub theme { $Theme };
Subroutine theme: not called CC=1 SCAR=6.9
Pod undocumented
31  
32 ▶sub has_remotelist { };
Subroutine has_remotelist: not called CC=1 SCAR=0.0
Pod undocumented
33  
34 5 1;
35  
36  
« lib/AI/MicroStructure/Remember.pm ↑ Summary lib/AI/MicroStructure/List.pm »