blib/lib/Validation/Class.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 32 | 68 | 47.0 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
189 | 2 | 83 | 17 | $self->can($name) and $proto->fields->has($name) |
238 | 0 | 0 | 3 | $class and $name |
0 | 0 | 3 | $class and $name and $type | |
301 | 0 | 0 | 3 | $name and $code |
324 | 0 | 0 | 12 | $name and $data |
348 | 0 | 0 | 2 | $name and $data |
371 | 0 | 0 | 148 | $name and $data |
392 | 0 | 0 | 1 | $name and $code |
492 | 0 | 0 | 0 | $name and $template |
513 | 0 | 0 | 16 | $name and $data |
536 | 0 | 0 | 19 | $name and $data |
574 | 0 | 0 | 11 | $name and $code |
line | l | !l | condition |
---|---|---|---|
322 | 12 | 0 | $data ||= {} |
346 | 2 | 0 | $data ||= {} |
369 | 139 | 9 | $data ||= {} |
534 | 19 | 0 | $data ||= {} |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
53 | 602 | 245 | 0 | shift() || caller 2 |
55 | 702 | 145 | 0 | prototype_registry()->get($class) || do { my $proto = 'Validation::Class::Prototype'->new('package', $class); BEGIN {${^WARNING_BITS} = "\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15"} no strict 'refs'; my $new = $class->can('new') ? 'initialize_validator' : 'new'; *{"${class}::$new";} = sub { goto \&$new; } ; *{"${class}::proto";} = sub { goto \&Validation::Class::prototype; } ; *{"${class}::prototype";} = sub { goto \&Validation::Class::prototype; } ; my(@aliases) = $proto->proxy_methods; foreach my $alias (@aliases) { next if $class->can($alias); $proto->set_method($alias, sub { shift @_; $proto->$alias(@_); } ); }; my(@wrapped_aliases) = $proto->proxy_methods_wrapped; foreach my $alias (@wrapped_aliases) { next if $class->can($alias); $proto->set_method($alias, sub { my $self = shift @_; $proto->$alias($self, @_); } ); }; prototype_registry()->add($class, $proto); $proto } |
145 | 144 | 0 | 0 | caller 0 || caller 1 |
189 | 17 | 1 | 84 | $self->can($name) and $proto->fields->has($name) or $proto->attributes->has($name) |
18 | 0 | 84 | $self->can($name) and $proto->fields->has($name) or $proto->attributes->has($name) or $proxy_methods->{$name} | |
236 | 3 | 0 | 0 | $keywords->{$type} || $aliases->{$type} |
555 | 0 | 150 | 0 | ref $class || $class |
593 | 302 | 4 | 0 | ref $self || $self |