blib/lib/Mic/Contracts.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 10 | 10 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | n/a | ||
total | 14 | 14 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Mic::Contracts; | ||||||
2 | 12 | 12 | 894326 | use strict; | |||
12 | 27 | ||||||
12 | 1314 | ||||||
3 | |||||||
4 | sub import { | ||||||
5 | 12 | 12 | 116 | my (undef, %contract_for) = @_; | |||
6 | |||||||
7 | 12 | 40 | foreach my $class ( keys %contract_for ) { | ||||
8 | 12 | 27 | $Mic::Contracts_for{$class} = $contract_for{$class}; | ||||
9 | 12 | 100 | 49 | if ( $Mic::Contracts_for{$class}{all} ) { | |||
10 | 1 | 2 | $Mic::Contracts_for{$class} = { map { $_ => 1 } qw/pre post invariant/ }; | ||||
3 | 8 | ||||||
11 | } | ||||||
12 | } | ||||||
13 | 12 | 286 | strict->import(); | ||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 | |||||||
18 | __END__ |