blib/lib/Net/Payjp/Object.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 16 | 17 | 94.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Net::Payjp::Object; | ||||||
2 | |||||||
3 | 9 | 9 | 47 | use strict; | |||
9 | 13 | ||||||
9 | 220 | ||||||
4 | 9 | 9 | 44 | use warnings; | |||
9 | 16 | ||||||
9 | 1507 | ||||||
5 | |||||||
6 | sub new{ | ||||||
7 | 45 | 45 | 0 | 84 | my $self = shift; | ||
8 | 45 | 245 | my %p = @_; | ||||
9 | |||||||
10 | 45 | 665 | bless{%p}, $self; | ||||
11 | } | ||||||
12 | |||||||
13 | our $AUTOLOAD; | ||||||
14 | sub AUTOLOAD { | ||||||
15 | 46 | 46 | 699 | my $self = shift; | |||
16 | |||||||
17 | 46 | 521 | my ($key) = $AUTOLOAD =~ /([^:]*$)/; | ||||
18 | 46 | 286 | return $self->{$key}; | ||||
19 | } | ||||||
20 | |||||||
21 | |||||||
22 | 1; |