| blib/lib/JCONF/Writer/Error.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 9 | 11 | 81.8 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 4 | 5 | 80.0 |
| pod | 0 | 3 | 0.0 |
| total | 13 | 19 | 68.4 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package JCONF::Writer::Error; | ||||||
| 2 | |||||||
| 3 | 2 | 2 | 10 | use strict; | |||
| 2 | 2 | ||||||
| 2 | 73 | ||||||
| 4 | 2 | 2 | 3619 | use overload '""' => \&to_string; | |||
| 2 | 2606 | ||||||
| 2 | 17 | ||||||
| 5 | |||||||
| 6 | our $VERSION = '0.03'; | ||||||
| 7 | |||||||
| 8 | sub new { | ||||||
| 9 | 2 | 2 | 0 | 3 | my ($class, $msg) = @_; | ||
| 10 | 2 | 10 | bless \$msg, $class; | ||||
| 11 | } | ||||||
| 12 | |||||||
| 13 | sub throw { | ||||||
| 14 | 1 | 1 | 0 | 9 | die $_[0]; | ||
| 15 | } | ||||||
| 16 | |||||||
| 17 | sub to_string { | ||||||
| 18 | 0 | 0 | 0 | my $self = shift; | |||
| 19 | 0 | return $$self."\n"; | |||||
| 20 | } | ||||||
| 21 | |||||||
| 22 | 1; |