| 1 | # Licensed to the Apache Software Foundation (ASF) under one or more | ||||||||||||||||||||
| 2 | # contributor license agreements. See the NOTICE file distributed with | ||||||||||||||||||||
| 3 | # this work for additional information regarding copyright ownership. | ||||||||||||||||||||
| 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 | ||||||||||||||||||||
| 5 | # (the "License"); you may not use this file except in compliance with | ||||||||||||||||||||
| 6 | # the License. You may obtain a copy of the License at | ||||||||||||||||||||
| 7 | # | ||||||||||||||||||||
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||||||||
| 9 | # | ||||||||||||||||||||
| 10 | # Unless required by applicable law or agreed to in writing, software | ||||||||||||||||||||
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, | ||||||||||||||||||||
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||||||||||||||||
| 13 | # See the License for the specific language governing permissions and | ||||||||||||||||||||
| 14 | # limitations under the License. | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 43 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 43 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | package Clownfish::CFC; | ||||||||||||||||||||
| 20 | 43 | our $VERSION = '0.008000'; | |||||||||||||||||||
| 21 | 43 | $VERSION = eval $VERSION; | |||||||||||||||||||
| 22 | 43 | our $MAJOR_VERSION = 0.008000; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 43 | ▶ | END { | ||||||||||||||||||
|
Subroutine
END: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 25 | 43 | Clownfish::CFC::Model::Parcel->reap_singletons(); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 43 | ▶ | use XSLoader; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 29 | 43 | ▶ | BEGIN { XSLoader::load( 'Clownfish::CFC', '0.8.0' ) } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | { | ||||||||||||||||||||
| 32 | package Clownfish::CFC::Util; | ||||||||||||||||||||
| 33 | 43 | ▶ | use base qw( Exporter ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 34 | 43 | ▶ | use Scalar::Util qw( blessed ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 35 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 36 | 43 | ▶ | use Fcntl; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 43 | ▶ | BEGIN { | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 39 | 43 | our @EXPORT_OK = qw( | |||||||||||||||||||
| 40 | slurp_text | ||||||||||||||||||||
| 41 | current | ||||||||||||||||||||
| 42 | strip_c_comments | ||||||||||||||||||||
| 43 | verify_args | ||||||||||||||||||||
| 44 | a_isa_b | ||||||||||||||||||||
| 45 | write_if_changed | ||||||||||||||||||||
| 46 | trim_whitespace | ||||||||||||||||||||
| 47 | is_dir | ||||||||||||||||||||
| 48 | make_dir | ||||||||||||||||||||
| 49 | make_path | ||||||||||||||||||||
| 50 | ); | ||||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | # Verify that named parameters exist in a defaults hash. Returns false | ||||||||||||||||||||
| 54 | # and sets $@ if a problem is detected. | ||||||||||||||||||||
| 55 | 156 | ▶ | sub verify_args { | ||||||||||||||||||
|
Subroutine
verify_args: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||
| 56 | 156 | my $defaults = shift; # leave the rest of @_ intact | |||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | # Verify that args came in pairs. | ||||||||||||||||||||
| 59 | 156 | ▶ | if ( @_ % 2 ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 60 | 1 | my ( $package, $filename, $line ) = caller(1); | |||||||||||||||||||
| 61 | 1 | $@ | |||||||||||||||||||
| 62 | = "Parameter error: odd number of args at $filename line $line\n"; | ||||||||||||||||||||
| 63 | 1 | return 0; | |||||||||||||||||||
| 64 | } | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | # Verify keys, ignore values. | ||||||||||||||||||||
| 67 | 155 | ▶ | while (@_) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 68 | 300 | my ( $var, undef ) = ( shift, shift ); | |||||||||||||||||||
| 69 | 300 | ▶ | next if exists $defaults->{$var}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 70 | 5 | my ( $package, $filename, $line ) = caller(1); | |||||||||||||||||||
| 71 | 5 | $@ = "Invalid parameter: '$var' at $filename line $line\n"; | |||||||||||||||||||
| 72 | 5 | return 0; | |||||||||||||||||||
| 73 | } | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 150 | return 1; | |||||||||||||||||||
| 76 | } | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | 8 | ▶ | sub a_isa_b { | ||||||||||||||||||
|
Subroutine
a_isa_b: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 79 | 8 | my ( $thing, $class ) = @_; | |||||||||||||||||||
| 80 | 8 | ▶ | return 0 unless blessed($thing); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 81 | 6 | return $thing->isa($class); | |||||||||||||||||||
| 82 | } | ||||||||||||||||||||
| 83 | } | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | { | ||||||||||||||||||||
| 86 | 43 | package Clownfish::CFC::Base; | |||||||||||||||||||
| 87 | } | ||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | { | ||||||||||||||||||||
| 90 | 43 | package Clownfish::CFC::Model::CBlock; | |||||||||||||||||||
| 91 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 92 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 93 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 43 | our %new_PARAMS = ( contents => undef, ); | |||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.1
Pod
undocumented
| |||||||||||||||||||||
| 98 | 2 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 99 | 2 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 100 | 2 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 101 | confess("Missing required param 'contents'") | ||||||||||||||||||||
| 102 | 2 | ▶ | unless defined $args{contents}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 103 | 1 | return _new( $args{contents} ); | |||||||||||||||||||
| 104 | } | ||||||||||||||||||||
| 105 | } | ||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | { | ||||||||||||||||||||
| 108 | 43 | package Clownfish::CFC::Model::Class; | |||||||||||||||||||
| 109 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 110 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | 43 | ▶ | use Config; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | 43 | ▶ | use Clownfish::CFC::Util qw( | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | verify_args | ||||||||||||||||||||
| 114 | a_isa_b | ||||||||||||||||||||
| 115 | 43 | ); | |||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | 43 | our %create_PARAMS = ( | |||||||||||||||||||
| 118 | file_spec => undef, | ||||||||||||||||||||
| 119 | class_name => undef, | ||||||||||||||||||||
| 120 | nickname => undef, | ||||||||||||||||||||
| 121 | parent_class_name => undef, | ||||||||||||||||||||
| 122 | docucomment => undef, | ||||||||||||||||||||
| 123 | inert => undef, | ||||||||||||||||||||
| 124 | final => undef, | ||||||||||||||||||||
| 125 | parcel => undef, | ||||||||||||||||||||
| 126 | abstract => undef, | ||||||||||||||||||||
| 127 | exposure => 'parcel', | ||||||||||||||||||||
| 128 | ); | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 131 | 0 | confess( | |||||||||||||||||||
| 132 | "The constructor for Clownfish::CFC::Model::Class is create()"); | ||||||||||||||||||||
| 133 | } | ||||||||||||||||||||
| 134 | |||||||||||||||||||||
| 135 | 20 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=3 SCAR=11.3
Pod
undocumented
| |||||||||||||||||||||
| 136 | 20 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 137 | 20 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 138 | 20 | ▶ | verify_args( \%create_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 139 | $args{parcel} | ||||||||||||||||||||
| 140 | 20 | = Clownfish::CFC::Model::Parcel->acquire( $args{parcel} ); | |||||||||||||||||||
| 141 | return _create( | ||||||||||||||||||||
| 142 | @args{ | ||||||||||||||||||||
| 143 | 20 | qw( parcel exposure class_name nickname docucomment | |||||||||||||||||||
| 144 | file_spec parent_class_name final inert abstract) | ||||||||||||||||||||
| 145 | } | ||||||||||||||||||||
| 146 | ); | ||||||||||||||||||||
| 147 | } | ||||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | { | ||||||||||||||||||||
| 151 | 43 | package Clownfish::CFC::Model::DocuComment; | |||||||||||||||||||
| 152 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 153 | } | ||||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | { | ||||||||||||||||||||
| 156 | 43 | package Clownfish::CFC::Model::File; | |||||||||||||||||||
| 157 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 158 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 159 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 160 | |||||||||||||||||||||
| 161 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 162 | parcel => undef, | ||||||||||||||||||||
| 163 | spec => undef, | ||||||||||||||||||||
| 164 | ); | ||||||||||||||||||||
| 165 | |||||||||||||||||||||
| 166 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 167 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 168 | 0 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 169 | 0 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 170 | 0 | return _new( @args{ qw( parcel spec ) } ); | |||||||||||||||||||
| 171 | } | ||||||||||||||||||||
| 172 | } | ||||||||||||||||||||
| 173 | |||||||||||||||||||||
| 174 | { | ||||||||||||||||||||
| 175 | 43 | package Clownfish::CFC::Model::FileSpec; | |||||||||||||||||||
| 176 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 177 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 178 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 179 | |||||||||||||||||||||
| 180 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 181 | source_dir => undef, | ||||||||||||||||||||
| 182 | path_part => undef, | ||||||||||||||||||||
| 183 | ext => undef, | ||||||||||||||||||||
| 184 | is_included => undef, | ||||||||||||||||||||
| 185 | ); | ||||||||||||||||||||
| 186 | |||||||||||||||||||||
| 187 | 8 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 188 | 8 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 189 | 8 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 190 | 8 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 191 | 8 | return _new( @args{ qw( source_dir path_part ext is_included ) } ); | |||||||||||||||||||
| 192 | } | ||||||||||||||||||||
| 193 | } | ||||||||||||||||||||
| 194 | |||||||||||||||||||||
| 195 | { | ||||||||||||||||||||
| 196 | 43 | package Clownfish::CFC::Model::Function; | |||||||||||||||||||
| 197 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Model::Symbol' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 198 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 199 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args a_isa_b ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 200 | |||||||||||||||||||||
| 201 | 43 | my %new_PARAMS = ( | |||||||||||||||||||
| 202 | return_type => undef, | ||||||||||||||||||||
| 203 | param_list => undef, | ||||||||||||||||||||
| 204 | name => undef, | ||||||||||||||||||||
| 205 | docucomment => undef, | ||||||||||||||||||||
| 206 | inline => undef, | ||||||||||||||||||||
| 207 | exposure => undef, | ||||||||||||||||||||
| 208 | ); | ||||||||||||||||||||
| 209 | |||||||||||||||||||||
| 210 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.1
Pod
undocumented
| |||||||||||||||||||||
| 211 | 4 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 212 | 4 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 213 | 4 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 214 | 3 | ▶ | $args{inline} ||= 0; | ||||||||||||||||||
|
Condition50%1/2
$args{"inline"} ||= 0
MC/DC0%0/1
$args{"inline"} ||= 0
$args{"inline"}
Truth table50%1/2
A
A= $args{"inline"}
| |||||||||||||||||||||
| 215 | return _new( | ||||||||||||||||||||
| 216 | @args{ | ||||||||||||||||||||
| 217 | 3 | qw( exposure name return_type param_list docucomment inline ) | |||||||||||||||||||
| 218 | } | ||||||||||||||||||||
| 219 | ); | ||||||||||||||||||||
| 220 | } | ||||||||||||||||||||
| 221 | } | ||||||||||||||||||||
| 222 | |||||||||||||||||||||
| 223 | { | ||||||||||||||||||||
| 224 | 43 | package Clownfish::CFC::Model::Hierarchy; | |||||||||||||||||||
| 225 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 226 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 227 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 228 | |||||||||||||||||||||
| 229 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 230 | dest => undef, | ||||||||||||||||||||
| 231 | ); | ||||||||||||||||||||
| 232 | |||||||||||||||||||||
| 233 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 234 | 2 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 235 | 2 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 236 | 2 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 237 | 1 | return _new( @args{qw( dest )} ); | |||||||||||||||||||
| 238 | } | ||||||||||||||||||||
| 239 | } | ||||||||||||||||||||
| 240 | |||||||||||||||||||||
| 241 | { | ||||||||||||||||||||
| 242 | 43 | package Clownfish::CFC::Model::Method; | |||||||||||||||||||
| 243 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Model::Function' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 244 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 245 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 246 | |||||||||||||||||||||
| 247 | 43 | my %new_PARAMS = ( | |||||||||||||||||||
| 248 | return_type => undef, | ||||||||||||||||||||
| 249 | param_list => undef, | ||||||||||||||||||||
| 250 | name => undef, | ||||||||||||||||||||
| 251 | docucomment => undef, | ||||||||||||||||||||
| 252 | class => undef, | ||||||||||||||||||||
| 253 | abstract => undef, | ||||||||||||||||||||
| 254 | final => undef, | ||||||||||||||||||||
| 255 | exposure => 'parcel', | ||||||||||||||||||||
| 256 | ); | ||||||||||||||||||||
| 257 | |||||||||||||||||||||
| 258 | 15 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 259 | 15 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 260 | 15 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 261 | 14 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 262 | 14 | ▶ | $args{abstract} ||= 0; | ||||||||||||||||||
|
Condition50%1/2
$args{"abstract"} ||= 0
MC/DC0%0/1
$args{"abstract"} ||= 0
$args{"abstract"}
Truth table50%1/2
A
A= $args{"abstract"}
| |||||||||||||||||||||
| 263 | 14 | ▶ | $args{final} ||= 0; | ||||||||||||||||||
|
Condition50%1/2
$args{"final"} ||= 0
MC/DC0%0/1
$args{"final"} ||= 0
$args{"final"}
Truth table50%1/2
A
A= $args{"final"}
| |||||||||||||||||||||
| 264 | return _new( | ||||||||||||||||||||
| 265 | @args{ | ||||||||||||||||||||
| 266 | 14 | qw( exposure name return_type param_list docucomment class | |||||||||||||||||||
| 267 | final abstract ) | ||||||||||||||||||||
| 268 | } | ||||||||||||||||||||
| 269 | ); | ||||||||||||||||||||
| 270 | } | ||||||||||||||||||||
| 271 | } | ||||||||||||||||||||
| 272 | |||||||||||||||||||||
| 273 | { | ||||||||||||||||||||
| 274 | 43 | package Clownfish::CFC::Model::ParamList; | |||||||||||||||||||
| 275 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 276 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 277 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 278 | |||||||||||||||||||||
| 279 | 43 | our %new_PARAMS = ( variadic => undef, ); | |||||||||||||||||||
| 280 | |||||||||||||||||||||
| 281 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.6
Pod
undocumented
| |||||||||||||||||||||
| 282 | 1 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 283 | 1 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 284 | 1 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 285 | 1 | ▶ | my $variadic = delete $args{variadic} || 0; | ||||||||||||||||||
|
Condition50%1/2
delete $args{'variadic'} || 0
MC/DC0%0/1
delete $args{'variadic'} || 0
delete $args{'variadic'}
Truth table50%1/2
A
A= delete $args{'variadic'}
| |||||||||||||||||||||
| 286 | 1 | return _new($variadic); | |||||||||||||||||||
| 287 | } | ||||||||||||||||||||
| 288 | } | ||||||||||||||||||||
| 289 | |||||||||||||||||||||
| 290 | { | ||||||||||||||||||||
| 291 | 43 | package Clownfish::CFC::Model::Parcel; | |||||||||||||||||||
| 292 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 293 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 294 | 43 | ▶ | use Scalar::Util qw( blessed ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 295 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 296 | |||||||||||||||||||||
| 297 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 298 | name => undef, | ||||||||||||||||||||
| 299 | nickname => undef, | ||||||||||||||||||||
| 300 | version => undef, | ||||||||||||||||||||
| 301 | major_version => undef, | ||||||||||||||||||||
| 302 | file_spec => undef, | ||||||||||||||||||||
| 303 | ); | ||||||||||||||||||||
| 304 | |||||||||||||||||||||
| 305 | 14 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 306 | 14 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 307 | 14 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 308 | 14 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 309 | 14 | return _new( @args{qw( | |||||||||||||||||||
| 310 | name nickname version major_version file_spec | ||||||||||||||||||||
| 311 | )} ); | ||||||||||||||||||||
| 312 | } | ||||||||||||||||||||
| 313 | |||||||||||||||||||||
| 314 | 43 | our %new_from_json_PARAMS = ( | |||||||||||||||||||
| 315 | json => undef, | ||||||||||||||||||||
| 316 | file_spec => undef, | ||||||||||||||||||||
| 317 | ); | ||||||||||||||||||||
| 318 | |||||||||||||||||||||
| 319 | 3 | ▶ | sub new_from_json { | ||||||||||||||||||
|
Subroutine
new_from_json: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 320 | 3 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 321 | 3 | ▶ | verify_args( \%new_from_json_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 322 | 3 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 323 | 3 | return _new_from_json( @args{qw( json file_spec )} ); | |||||||||||||||||||
| 324 | } | ||||||||||||||||||||
| 325 | |||||||||||||||||||||
| 326 | 43 | our %new_from_file_PARAMS = ( | |||||||||||||||||||
| 327 | file_spec => undef, | ||||||||||||||||||||
| 328 | ); | ||||||||||||||||||||
| 329 | |||||||||||||||||||||
| 330 | 1 | ▶ | sub new_from_file { | ||||||||||||||||||
|
Subroutine
new_from_file: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 331 | 1 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 332 | 1 | ▶ | verify_args( \%new_from_file_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 333 | 1 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 334 | 1 | return _new_from_file( @args{qw( file_spec )} ); | |||||||||||||||||||
| 335 | } | ||||||||||||||||||||
| 336 | |||||||||||||||||||||
| 337 | # $parcel = Clownfish::CFC::Model::Parcel->acquire($parcel_name_or_parcel_object); | ||||||||||||||||||||
| 338 | # | ||||||||||||||||||||
| 339 | # Aquire a parcel one way or another. If the supplied argument is a | ||||||||||||||||||||
| 340 | # Parcel, return it. If it's a name, fetch an existing Parcel or register | ||||||||||||||||||||
| 341 | # a new one. | ||||||||||||||||||||
| 342 | 42 | ▶ | sub acquire { | ||||||||||||||||||
|
Subroutine
acquire: called CC=5 SCAR=16.3
Pod
undocumented
| |||||||||||||||||||||
| 343 | 42 | my ( undef, $thing ) = @_; | |||||||||||||||||||
| 344 | 42 | ▶ | if ( !defined $thing ) { | ||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||
| 345 | 0 | confess("Missing required param 'parcel'"); | |||||||||||||||||||
| 346 | } | ||||||||||||||||||||
| 347 | elsif ( blessed($thing) ) { | ||||||||||||||||||||
| 348 | 6 | ▶ | confess("Not a Clownfish::CFC::Model::Parcel") | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 349 | unless $thing->isa('Clownfish::CFC::Model::Parcel'); | ||||||||||||||||||||
| 350 | 6 | return $thing; | |||||||||||||||||||
| 351 | } | ||||||||||||||||||||
| 352 | else { | ||||||||||||||||||||
| 353 | 36 | my $parcel = Clownfish::CFC::Model::Parcel->fetch($thing); | |||||||||||||||||||
| 354 | 36 | ▶ | if ( !$parcel ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 355 | 4 | $parcel | |||||||||||||||||||
| 356 | = Clownfish::CFC::Model::Parcel->new( name => $thing, ); | ||||||||||||||||||||
| 357 | 4 | $parcel->register; | |||||||||||||||||||
| 358 | } | ||||||||||||||||||||
| 359 | 36 | return $parcel; | |||||||||||||||||||
| 360 | } | ||||||||||||||||||||
| 361 | } | ||||||||||||||||||||
| 362 | } | ||||||||||||||||||||
| 363 | |||||||||||||||||||||
| 364 | { | ||||||||||||||||||||
| 365 | 43 | package Clownfish::CFC::Parser; | |||||||||||||||||||
| 366 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 367 | } | ||||||||||||||||||||
| 368 | |||||||||||||||||||||
| 369 | { | ||||||||||||||||||||
| 370 | 43 | package Clownfish::CFC::Parser; | |||||||||||||||||||
| 371 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 372 | } | ||||||||||||||||||||
| 373 | |||||||||||||||||||||
| 374 | { | ||||||||||||||||||||
| 375 | 43 | package Clownfish::CFC::Model::Prereq; | |||||||||||||||||||
| 376 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 377 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 378 | 43 | ▶ | use Scalar::Util qw( blessed ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 379 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 380 | |||||||||||||||||||||
| 381 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 382 | name => undef, | ||||||||||||||||||||
| 383 | version => undef, | ||||||||||||||||||||
| 384 | ); | ||||||||||||||||||||
| 385 | |||||||||||||||||||||
| 386 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 387 | 1 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 388 | 1 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 389 | 1 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 390 | 1 | return _new( @args{qw( name version )} ); | |||||||||||||||||||
| 391 | } | ||||||||||||||||||||
| 392 | } | ||||||||||||||||||||
| 393 | |||||||||||||||||||||
| 394 | { | ||||||||||||||||||||
| 395 | 43 | package Clownfish::CFC::Model::Symbol; | |||||||||||||||||||
| 396 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 397 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 398 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 399 | |||||||||||||||||||||
| 400 | 43 | my %new_PARAMS = ( | |||||||||||||||||||
| 401 | exposure => undef, | ||||||||||||||||||||
| 402 | name => undef, | ||||||||||||||||||||
| 403 | ); | ||||||||||||||||||||
| 404 | |||||||||||||||||||||
| 405 | 13 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 406 | 13 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 407 | 13 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 408 | 13 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 409 | return _new( | ||||||||||||||||||||
| 410 | 13 | @args{qw( exposure name )} ); | |||||||||||||||||||
| 411 | } | ||||||||||||||||||||
| 412 | } | ||||||||||||||||||||
| 413 | |||||||||||||||||||||
| 414 | { | ||||||||||||||||||||
| 415 | 43 | package Clownfish::CFC::Model::Type; | |||||||||||||||||||
| 416 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 417 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args a_isa_b ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 418 | 43 | ▶ | use Scalar::Util qw( blessed ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 419 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 420 | |||||||||||||||||||||
| 421 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 422 | const => undef, | ||||||||||||||||||||
| 423 | specifier => undef, | ||||||||||||||||||||
| 424 | indirection => undef, | ||||||||||||||||||||
| 425 | parcel => undef, | ||||||||||||||||||||
| 426 | void => undef, | ||||||||||||||||||||
| 427 | object => undef, | ||||||||||||||||||||
| 428 | primitive => undef, | ||||||||||||||||||||
| 429 | integer => undef, | ||||||||||||||||||||
| 430 | floating => undef, | ||||||||||||||||||||
| 431 | cfish_string => undef, | ||||||||||||||||||||
| 432 | va_list => undef, | ||||||||||||||||||||
| 433 | arbitrary => undef, | ||||||||||||||||||||
| 434 | composite => undef, | ||||||||||||||||||||
| 435 | ); | ||||||||||||||||||||
| 436 | |||||||||||||||||||||
| 437 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=18 SCAR=32.0
Pod
undocumented
| |||||||||||||||||||||
| 438 | 5 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 439 | 5 | ▶ | my $package = ref($either) || $either; | ||||||||||||||||||
|
Condition33%1/3
ref $either || $either
MC/DC0%0/2
ref $either || $either
ref $either
$either
Truth table33%1/3
A || B
A= ref $eitherB= $either
| |||||||||||||||||||||
| 440 | 5 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 441 | 5 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 442 | |||||||||||||||||||||
| 443 | 5 | my $flags = 0; | |||||||||||||||||||
| 444 | 5 | ▶ | $flags |= CONST if $args{const}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 445 | 5 | ▶ | $flags |= NULLABLE if $args{nullable}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 446 | 5 | ▶ | $flags |= VOID if $args{void}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 447 | 5 | ▶ | $flags |= OBJECT if $args{object}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 448 | 5 | ▶ | $flags |= PRIMITIVE if $args{primitive}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 449 | 5 | ▶ | $flags |= INTEGER if $args{integer}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 450 | 5 | ▶ | $flags |= FLOATING if $args{floating}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 451 | 5 | ▶ | $flags |= CFISH_STRING if $args{cfish_string}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 452 | 5 | ▶ | $flags |= VA_LIST if $args{va_list}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 453 | 5 | ▶ | $flags |= ARBITRARY if $args{arbitrary}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 454 | 5 | ▶ | $flags |= COMPOSITE if $args{composite}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 455 | |||||||||||||||||||||
| 456 | my $parcel | ||||||||||||||||||||
| 457 | = $args{parcel} | ||||||||||||||||||||
| 458 | ? Clownfish::CFC::Model::Parcel->acquire( $args{parcel} ) | ||||||||||||||||||||
| 459 | 5 | ▶ | : $args{parcel}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 460 | |||||||||||||||||||||
| 461 | 5 | ▶ | my $indirection = $args{indirection} || 0; | ||||||||||||||||||
|
Condition50%1/2
$args{'indirection'} || 0
MC/DC0%0/1
$args{'indirection'} || 0
$args{'indirection'}
Truth table50%1/2
A
A= $args{'indirection'}
| |||||||||||||||||||||
| 462 | 5 | ▶ | my $specifier = $args{specifier} || ''; | ||||||||||||||||||
|
Condition50%1/2
$args{'specifier'} || ''
MC/DC0%0/1
$args{'specifier'} || ''
$args{'specifier'}
Truth table50%1/2
A
A= $args{'specifier'}
| |||||||||||||||||||||
| 463 | |||||||||||||||||||||
| 464 | 5 | return _new( $flags, $parcel, $specifier, $indirection ); | |||||||||||||||||||
| 465 | } | ||||||||||||||||||||
| 466 | |||||||||||||||||||||
| 467 | 43 | our %new_integer_PARAMS = ( | |||||||||||||||||||
| 468 | const => undef, | ||||||||||||||||||||
| 469 | specifier => undef, | ||||||||||||||||||||
| 470 | ); | ||||||||||||||||||||
| 471 | |||||||||||||||||||||
| 472 | 1 | ▶ | sub new_integer { | ||||||||||||||||||
|
Subroutine
new_integer: called CC=4 SCAR=14.5
Pod
undocumented
| |||||||||||||||||||||
| 473 | 1 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 474 | 1 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 475 | 1 | ▶ | verify_args( \%new_integer_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 476 | 1 | my $flags = 0; | |||||||||||||||||||
| 477 | 1 | ▶ | $flags |= CONST if $args{const}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 478 | 1 | return _new_integer( $flags, $args{specifier} ); | |||||||||||||||||||
| 479 | } | ||||||||||||||||||||
| 480 | |||||||||||||||||||||
| 481 | 43 | our %new_float_PARAMS = ( | |||||||||||||||||||
| 482 | const => undef, | ||||||||||||||||||||
| 483 | specifier => undef, | ||||||||||||||||||||
| 484 | ); | ||||||||||||||||||||
| 485 | |||||||||||||||||||||
| 486 | 1 | ▶ | sub new_float { | ||||||||||||||||||
|
Subroutine
new_float: called CC=4 SCAR=14.5
Pod
undocumented
| |||||||||||||||||||||
| 487 | 1 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 488 | 1 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 489 | 1 | ▶ | verify_args( \%new_float_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 490 | 1 | my $flags = 0; | |||||||||||||||||||
| 491 | 1 | ▶ | $flags |= CONST if $args{const}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 492 | 1 | return _new_float( $flags, $args{specifier} ); | |||||||||||||||||||
| 493 | } | ||||||||||||||||||||
| 494 | |||||||||||||||||||||
| 495 | 43 | our %new_object_PARAMS = ( | |||||||||||||||||||
| 496 | const => undef, | ||||||||||||||||||||
| 497 | specifier => undef, | ||||||||||||||||||||
| 498 | indirection => 1, | ||||||||||||||||||||
| 499 | parcel => undef, | ||||||||||||||||||||
| 500 | incremented => 0, | ||||||||||||||||||||
| 501 | decremented => 0, | ||||||||||||||||||||
| 502 | nullable => 0, | ||||||||||||||||||||
| 503 | ); | ||||||||||||||||||||
| 504 | |||||||||||||||||||||
| 505 | 18 | ▶ | sub new_object { | ||||||||||||||||||
|
Subroutine
new_object: called CC=10 SCAR=23.4
Pod
undocumented
| |||||||||||||||||||||
| 506 | 18 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 507 | 18 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 508 | 18 | ▶ | verify_args( \%new_object_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 509 | 18 | my $flags = 0; | |||||||||||||||||||
| 510 | 18 | ▶ | $flags |= INCREMENTED if $args{incremented}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 511 | 18 | ▶ | $flags |= DECREMENTED if $args{decremented}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 512 | 18 | ▶ | $flags |= NULLABLE if $args{nullable}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 513 | 18 | ▶ | $flags |= CONST if $args{const}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 514 | 18 | ▶ | $args{indirection} = 1 unless defined $args{indirection}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 515 | 18 | my $parcel = Clownfish::CFC::Model::Parcel->acquire( $args{parcel} ); | |||||||||||||||||||
| 516 | 18 | ▶ | my $package = ref($either) || $either; | ||||||||||||||||||
|
Condition33%1/3
ref $either || $either
MC/DC0%0/2
ref $either || $either
ref $either
$either
Truth table33%1/3
A || B
A= ref $eitherB= $either
| |||||||||||||||||||||
| 517 | confess("Missing required param 'specifier'") | ||||||||||||||||||||
| 518 | 18 | ▶ | unless defined $args{specifier}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 519 | return _new_object( $flags, $parcel, $args{specifier}, | ||||||||||||||||||||
| 520 | 17 | $args{indirection} ); | |||||||||||||||||||
| 521 | } | ||||||||||||||||||||
| 522 | |||||||||||||||||||||
| 523 | 43 | our %new_composite_PARAMS = ( | |||||||||||||||||||
| 524 | child => undef, | ||||||||||||||||||||
| 525 | indirection => undef, | ||||||||||||||||||||
| 526 | array => undef, | ||||||||||||||||||||
| 527 | nullable => undef, | ||||||||||||||||||||
| 528 | ); | ||||||||||||||||||||
| 529 | |||||||||||||||||||||
| 530 | 4 | ▶ | sub new_composite { | ||||||||||||||||||
|
Subroutine
new_composite: called CC=6 SCAR=18.6
Pod
undocumented
| |||||||||||||||||||||
| 531 | 4 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 532 | 4 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 533 | 4 | ▶ | verify_args( \%new_composite_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 534 | 4 | my $flags = 0; | |||||||||||||||||||
| 535 | 4 | ▶ | $flags |= NULLABLE if $args{nullable}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 536 | 4 | ▶ | my $indirection = $args{indirection} || 0; | ||||||||||||||||||
|
Condition100%2/2
$args{'indirection'} || 0
MC/DC100%1/1
$args{'indirection'} || 0
$args{'indirection'}
Truth table100%2/2
A
A= $args{'indirection'}
| |||||||||||||||||||||
| 537 | 4 | ▶ | my $array = defined $args{array} ? $args{array} : ""; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 538 | 4 | return _new_composite( $flags, $args{child}, $indirection, $array ); | |||||||||||||||||||
| 539 | } | ||||||||||||||||||||
| 540 | |||||||||||||||||||||
| 541 | 43 | our %new_void_PARAMS = ( const => undef, ); | |||||||||||||||||||
| 542 | |||||||||||||||||||||
| 543 | 2 | ▶ | sub new_void { | ||||||||||||||||||
|
Subroutine
new_void: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 544 | 2 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 545 | 2 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 546 | 2 | ▶ | verify_args( \%new_void_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 547 | 2 | return _new_void( !!$args{const} ); | |||||||||||||||||||
| 548 | } | ||||||||||||||||||||
| 549 | |||||||||||||||||||||
| 550 | 1 | ▶ | sub new_va_list { | ||||||||||||||||||
|
Subroutine
new_va_list: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 551 | 1 | my $either = shift; | |||||||||||||||||||
| 552 | 1 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 553 | 1 | ▶ | verify_args( {}, @_ ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 554 | 1 | return _new_va_list(); | |||||||||||||||||||
| 555 | } | ||||||||||||||||||||
| 556 | |||||||||||||||||||||
| 557 | 43 | our %new_arbitrary_PARAMS = ( | |||||||||||||||||||
| 558 | parcel => undef, | ||||||||||||||||||||
| 559 | specifier => undef, | ||||||||||||||||||||
| 560 | ); | ||||||||||||||||||||
| 561 | |||||||||||||||||||||
| 562 | 3 | ▶ | sub new_arbitrary { | ||||||||||||||||||
|
Subroutine
new_arbitrary: called CC=3 SCAR=11.3
Pod
undocumented
| |||||||||||||||||||||
| 563 | 3 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 564 | 3 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 565 | 3 | ▶ | verify_args( \%new_arbitrary_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 566 | 3 | my $parcel = Clownfish::CFC::Model::Parcel->acquire( $args{parcel} ); | |||||||||||||||||||
| 567 | 3 | return _new_arbitrary( $parcel, $args{specifier} ); | |||||||||||||||||||
| 568 | } | ||||||||||||||||||||
| 569 | } | ||||||||||||||||||||
| 570 | |||||||||||||||||||||
| 571 | { | ||||||||||||||||||||
| 572 | 43 | package Clownfish::CFC::Model::Variable; | |||||||||||||||||||
| 573 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Model::Symbol' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 574 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 575 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 576 | |||||||||||||||||||||
| 577 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 578 | type => undef, | ||||||||||||||||||||
| 579 | name => undef, | ||||||||||||||||||||
| 580 | exposure => 'local', | ||||||||||||||||||||
| 581 | inert => undef, | ||||||||||||||||||||
| 582 | ); | ||||||||||||||||||||
| 583 | |||||||||||||||||||||
| 584 | 8 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.1
Pod
undocumented
| |||||||||||||||||||||
| 585 | 8 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 586 | 8 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 587 | 8 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 588 | 7 | ▶ | $args{exposure} ||= 'local'; | ||||||||||||||||||
|
Condition50%1/2
$args{"exposure"} ||= "local"
MC/DC0%0/1
$args{"exposure"} ||= "local"
$args{"exposure"}
Truth table50%1/2
A
A= $args{"exposure"}
| |||||||||||||||||||||
| 589 | return _new( | ||||||||||||||||||||
| 590 | @args{ | ||||||||||||||||||||
| 591 | 7 | qw( exposure name type inert ) | |||||||||||||||||||
| 592 | } | ||||||||||||||||||||
| 593 | ); | ||||||||||||||||||||
| 594 | } | ||||||||||||||||||||
| 595 | } | ||||||||||||||||||||
| 596 | |||||||||||||||||||||
| 597 | { | ||||||||||||||||||||
| 598 | 43 | package Clownfish::CFC::Model::Version; | |||||||||||||||||||
| 599 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 600 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 601 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 602 | |||||||||||||||||||||
| 603 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 604 | vstring => undef, | ||||||||||||||||||||
| 605 | ); | ||||||||||||||||||||
| 606 | |||||||||||||||||||||
| 607 | 10 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||
| 608 | 10 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 609 | 10 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 610 | 10 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 611 | 10 | return _new( $args{vstring} ); | |||||||||||||||||||
| 612 | } | ||||||||||||||||||||
| 613 | } | ||||||||||||||||||||
| 614 | |||||||||||||||||||||
| 615 | { | ||||||||||||||||||||
| 616 | 43 | package Clownfish::CFC::Binding::Core; | |||||||||||||||||||
| 617 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 618 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 619 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 620 | |||||||||||||||||||||
| 621 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 622 | hierarchy => undef, | ||||||||||||||||||||
| 623 | header => undef, | ||||||||||||||||||||
| 624 | footer => undef, | ||||||||||||||||||||
| 625 | ); | ||||||||||||||||||||
| 626 | |||||||||||||||||||||
| 627 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 628 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 629 | 0 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 630 | 0 | return _new( @args{qw( hierarchy header footer )} ); | |||||||||||||||||||
| 631 | } | ||||||||||||||||||||
| 632 | } | ||||||||||||||||||||
| 633 | |||||||||||||||||||||
| 634 | { | ||||||||||||||||||||
| 635 | 43 | package Clownfish::CFC::Binding::Core::Class; | |||||||||||||||||||
| 636 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 637 | 43 | ▶ | use Clownfish::CFC::Util qw( a_isa_b verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 638 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 639 | |||||||||||||||||||||
| 640 | 43 | our %new_PARAMS = ( client => undef, ); | |||||||||||||||||||
| 641 | |||||||||||||||||||||
| 642 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 643 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 644 | 0 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 645 | 0 | return _new( $args{client} ); | |||||||||||||||||||
| 646 | } | ||||||||||||||||||||
| 647 | } | ||||||||||||||||||||
| 648 | |||||||||||||||||||||
| 649 | { | ||||||||||||||||||||
| 650 | 43 | package Clownfish::CFC::Binding::Core::File; | |||||||||||||||||||
| 651 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 652 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 653 | |||||||||||||||||||||
| 654 | 43 | my %write_h_PARAMS = ( | |||||||||||||||||||
| 655 | file => undef, | ||||||||||||||||||||
| 656 | dest => undef, | ||||||||||||||||||||
| 657 | header => undef, | ||||||||||||||||||||
| 658 | footer => undef, | ||||||||||||||||||||
| 659 | ); | ||||||||||||||||||||
| 660 | |||||||||||||||||||||
| 661 | 0 | ▶ | sub write_h { | ||||||||||||||||||
|
Subroutine
write_h: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 662 | 0 | my ( undef, %args ) = @_; | |||||||||||||||||||
| 663 | 0 | ▶ | verify_args( \%write_h_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 664 | 0 | _write_h( @args{qw( file dest header footer )} ); | |||||||||||||||||||
| 665 | } | ||||||||||||||||||||
| 666 | } | ||||||||||||||||||||
| 667 | |||||||||||||||||||||
| 668 | { | ||||||||||||||||||||
| 669 | 43 | package Clownfish::CFC::Binding::Core::Method; | |||||||||||||||||||
| 670 | |||||||||||||||||||||
| 671 | 0 | ▶ | sub method_def { | ||||||||||||||||||
|
Subroutine
method_def: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 672 | 0 | my ( undef, %args ) = @_; | |||||||||||||||||||
| 673 | 0 | return _method_def( @args{qw( method class )} ); | |||||||||||||||||||
| 674 | } | ||||||||||||||||||||
| 675 | |||||||||||||||||||||
| 676 | 0 | ▶ | sub callback_obj_def { | ||||||||||||||||||
|
Subroutine
callback_obj_def: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 677 | 0 | my ( undef, %args ) = @_; | |||||||||||||||||||
| 678 | 0 | return _callback_obj_def( @args{qw( method offset )} ); | |||||||||||||||||||
| 679 | } | ||||||||||||||||||||
| 680 | } | ||||||||||||||||||||
| 681 | |||||||||||||||||||||
| 682 | { | ||||||||||||||||||||
| 683 | 43 | package Clownfish::CFC::Binding::Perl; | |||||||||||||||||||
| 684 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 685 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 686 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args a_isa_b ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 687 | |||||||||||||||||||||
| 688 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 689 | hierarchy => undef, | ||||||||||||||||||||
| 690 | lib_dir => undef, | ||||||||||||||||||||
| 691 | header => undef, | ||||||||||||||||||||
| 692 | footer => undef, | ||||||||||||||||||||
| 693 | ); | ||||||||||||||||||||
| 694 | |||||||||||||||||||||
| 695 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 696 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 697 | 0 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 698 | return _new( | ||||||||||||||||||||
| 699 | 0 | @args{qw( hierarchy lib_dir header footer )} ); | |||||||||||||||||||
| 700 | } | ||||||||||||||||||||
| 701 | |||||||||||||||||||||
| 702 | 0 | ▶ | sub write_bindings { | ||||||||||||||||||
|
Subroutine
write_bindings: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 703 | 0 | my ( $self, %args ) = @_; | |||||||||||||||||||
| 704 | $args{parcels} = [ map { | ||||||||||||||||||||
| 705 | 0 | Clownfish::CFC::Model::Parcel->acquire($_); | |||||||||||||||||||
| 706 | 0 | } @{ $args{parcels} } ]; | |||||||||||||||||||
| 707 | 0 | return $self->_write_bindings( @args{qw( boot_class parcels )} ); | |||||||||||||||||||
| 708 | } | ||||||||||||||||||||
| 709 | } | ||||||||||||||||||||
| 710 | |||||||||||||||||||||
| 711 | { | ||||||||||||||||||||
| 712 | 43 | package Clownfish::CFC::Binding::Perl::Class; | |||||||||||||||||||
| 713 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 714 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 715 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 716 | |||||||||||||||||||||
| 717 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 718 | parcel => undef, | ||||||||||||||||||||
| 719 | class_name => undef, | ||||||||||||||||||||
| 720 | ); | ||||||||||||||||||||
| 721 | |||||||||||||||||||||
| 722 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 723 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 724 | 0 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 725 | 0 | ▶ | if ( exists( $args{parcel} ) ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 726 | $args{parcel} | ||||||||||||||||||||
| 727 | 0 | = Clownfish::CFC::Model::Parcel->acquire( $args{parcel} ); | |||||||||||||||||||
| 728 | } | ||||||||||||||||||||
| 729 | 0 | return _new( @args{qw( parcel class_name )} ); | |||||||||||||||||||
| 730 | } | ||||||||||||||||||||
| 731 | |||||||||||||||||||||
| 732 | 43 | our %bind_method_PARAMS = ( | |||||||||||||||||||
| 733 | alias => undef, | ||||||||||||||||||||
| 734 | method => undef, | ||||||||||||||||||||
| 735 | ); | ||||||||||||||||||||
| 736 | |||||||||||||||||||||
| 737 | 0 | ▶ | sub bind_method { | ||||||||||||||||||
|
Subroutine
bind_method: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 738 | 0 | my ( $self, %args ) = @_; | |||||||||||||||||||
| 739 | 0 | ▶ | verify_args( \%bind_method_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 740 | 0 | _bind_method( $self, @args{qw( alias method )} ); | |||||||||||||||||||
| 741 | } | ||||||||||||||||||||
| 742 | |||||||||||||||||||||
| 743 | 43 | our %bind_constructor_PARAMS = ( | |||||||||||||||||||
| 744 | alias => undef, | ||||||||||||||||||||
| 745 | initializer => undef, | ||||||||||||||||||||
| 746 | ); | ||||||||||||||||||||
| 747 | |||||||||||||||||||||
| 748 | 0 | ▶ | sub bind_constructor { | ||||||||||||||||||
|
Subroutine
bind_constructor: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 749 | 0 | my ( $self, %args ) = @_; | |||||||||||||||||||
| 750 | 0 | ▶ | verify_args( \%bind_constructor_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 751 | 0 | _bind_constructor( $self, @args{qw( alias initializer )} ); | |||||||||||||||||||
| 752 | } | ||||||||||||||||||||
| 753 | } | ||||||||||||||||||||
| 754 | |||||||||||||||||||||
| 755 | { | ||||||||||||||||||||
| 756 | 43 | package Clownfish::CFC::Binding::Perl::Constructor; | |||||||||||||||||||
| 757 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Binding::Perl::Subroutine' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 758 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 759 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 760 | |||||||||||||||||||||
| 761 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 762 | class => undef, | ||||||||||||||||||||
| 763 | alias => undef, | ||||||||||||||||||||
| 764 | initializer => undef, | ||||||||||||||||||||
| 765 | ); | ||||||||||||||||||||
| 766 | |||||||||||||||||||||
| 767 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 768 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 769 | 0 | ▶ | confess $@ unless verify_args( \%new_PARAMS, %args ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 770 | 0 | return _new( @args{qw( class alias initializer )} ); | |||||||||||||||||||
| 771 | } | ||||||||||||||||||||
| 772 | } | ||||||||||||||||||||
| 773 | |||||||||||||||||||||
| 774 | { | ||||||||||||||||||||
| 775 | 43 | package Clownfish::CFC::Binding::Perl::Method; | |||||||||||||||||||
| 776 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Binding::Perl::Subroutine' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 777 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 778 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 779 | |||||||||||||||||||||
| 780 | 43 | our %new_PARAMS = ( | |||||||||||||||||||
| 781 | method => undef, | ||||||||||||||||||||
| 782 | alias => undef, | ||||||||||||||||||||
| 783 | ); | ||||||||||||||||||||
| 784 | |||||||||||||||||||||
| 785 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 786 | 0 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 787 | 0 | ▶ | confess $@ unless verify_args( \%new_PARAMS, %args ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 788 | 0 | return _new( @args{qw( method alias )} ); | |||||||||||||||||||
| 789 | } | ||||||||||||||||||||
| 790 | } | ||||||||||||||||||||
| 791 | |||||||||||||||||||||
| 792 | { | ||||||||||||||||||||
| 793 | 43 | package Clownfish::CFC::Binding::Perl::Pod; | |||||||||||||||||||
| 794 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 795 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 796 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 797 | |||||||||||||||||||||
| 798 | 43 | my %add_method_PARAMS = ( | |||||||||||||||||||
| 799 | alias => undef, | ||||||||||||||||||||
| 800 | method => undef, | ||||||||||||||||||||
| 801 | sample => undef, | ||||||||||||||||||||
| 802 | pod => undef, | ||||||||||||||||||||
| 803 | ); | ||||||||||||||||||||
| 804 | |||||||||||||||||||||
| 805 | 0 | ▶ | sub add_method { | ||||||||||||||||||
|
Subroutine
add_method: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 806 | 0 | my ( $self, %args ) = @_; | |||||||||||||||||||
| 807 | 0 | ▶ | verify_args( \%add_method_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 808 | 0 | _add_method( $self, @args{qw( alias method sample pod )} ); | |||||||||||||||||||
| 809 | } | ||||||||||||||||||||
| 810 | |||||||||||||||||||||
| 811 | 43 | my %add_constructor_PARAMS = ( | |||||||||||||||||||
| 812 | alias => undef, | ||||||||||||||||||||
| 813 | pod_func => undef, | ||||||||||||||||||||
| 814 | sample => undef, | ||||||||||||||||||||
| 815 | pod => undef, | ||||||||||||||||||||
| 816 | ); | ||||||||||||||||||||
| 817 | |||||||||||||||||||||
| 818 | 0 | ▶ | sub add_constructor { | ||||||||||||||||||
|
Subroutine
add_constructor: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 819 | 0 | my ( $self, %args ) = @_; | |||||||||||||||||||
| 820 | 0 | ▶ | verify_args( \%add_constructor_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 821 | 0 | _add_constructor( $self, @args{qw( alias pod_func sample pod )} ); | |||||||||||||||||||
| 822 | } | ||||||||||||||||||||
| 823 | } | ||||||||||||||||||||
| 824 | |||||||||||||||||||||
| 825 | { | ||||||||||||||||||||
| 826 | 43 | package Clownfish::CFC::Binding::Perl::Subroutine; | |||||||||||||||||||
| 827 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 828 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 829 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 830 | |||||||||||||||||||||
| 831 | 0 | ▶ | sub xsub_def { confess "Abstract method" } | ||||||||||||||||||
|
Subroutine
xsub_def: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 832 | } | ||||||||||||||||||||
| 833 | |||||||||||||||||||||
| 834 | { | ||||||||||||||||||||
| 835 | 43 | package Clownfish::CFC::Binding::Perl::TypeMap; | |||||||||||||||||||
| 836 | 43 | ▶ | use base qw( Exporter ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 837 | |||||||||||||||||||||
| 838 | 43 | our @EXPORT_OK = qw( from_perl to_perl ); | |||||||||||||||||||
| 839 | |||||||||||||||||||||
| 840 | 0 | ▶ | sub write_xs_typemap { | ||||||||||||||||||
|
Subroutine
write_xs_typemap: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 841 | 0 | my ( undef, %args ) = @_; | |||||||||||||||||||
| 842 | 0 | _write_xs_typemap( $args{hierarchy} ); | |||||||||||||||||||
| 843 | } | ||||||||||||||||||||
| 844 | } | ||||||||||||||||||||
| 845 | |||||||||||||||||||||
| 846 | { | ||||||||||||||||||||
| 847 | 43 | package Clownfish::CFC::Test; | |||||||||||||||||||
| 848 | 43 | ▶ | BEGIN { push our @ISA, 'Clownfish::CFC::Base' } | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 849 | 43 | ▶ | use Clownfish::CFC::Util qw( verify_args ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 850 | 43 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 851 | |||||||||||||||||||||
| 852 | 43 | my %new_PARAMS = ( | |||||||||||||||||||
| 853 | formatter_name => 'tap', | ||||||||||||||||||||
| 854 | ); | ||||||||||||||||||||
| 855 | |||||||||||||||||||||
| 856 | 16 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.6
Pod
undocumented
| |||||||||||||||||||||
| 857 | 16 | my ( $either, %args ) = @_; | |||||||||||||||||||
| 858 | 16 | ▶ | verify_args( \%new_PARAMS, %args ) or confess $@; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 859 | 16 | ▶ | confess "no subclassing allowed" unless $either eq __PACKAGE__; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 860 | 16 | ▶ | $args{formatter_name} = 'tap' unless defined $args{formatter_name}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 861 | 16 | return _new( @args{qw( formatter_name )} ); | |||||||||||||||||||
| 862 | } | ||||||||||||||||||||
| 863 | } | ||||||||||||||||||||
| 864 | |||||||||||||||||||||
| 865 | 43 | 1; | |||||||||||||||||||
| 866 | |||||||||||||||||||||