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