| blib/lib/DBIx/SpatialKey.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 7 | 8 | 87.5 |
| branch | 1 | 2 | 50.0 |
| condition | n/a | ||
| subroutine | 2 | 2 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 11 | 13 | 84.6 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package DBIx::SpatialKey; | ||||||
| 2 | |||||||
| 3 | require DynaLoader; | ||||||
| 4 | |||||||
| 5 | @ISA = 'DynaLoader'; | ||||||
| 6 | $VERSION = '0.031'; | ||||||
| 7 | |||||||
| 8 | 2 | 2 | 2138 | use Carp; | |||
| 2 | 4 | ||||||
| 2 | 539 | ||||||
| 9 | |||||||
| 10 | bootstrap DBIx::SpatialKey $VERSION; | ||||||
| 11 | |||||||
| 12 | sub new { | ||||||
| 13 | 1 | 1 | 1 | 53 | my $self = shift; | ||
| 14 | 1 | 3 | my $type = shift; | ||||
| 15 | 1 | 50 | 4 | if ($type eq "binary_morton") { | |||
| 16 | 1 | 24 | new DBIx::SpatialKey::BinaryMorton @_; | ||||
| 17 | } else { | ||||||
| 18 | 0 | croak "Unknown spatial key type '$type'"; | |||||
| 19 | } | ||||||
| 20 | } | ||||||
| 21 | |||||||
| 22 | 1; | ||||||
| 23 | __END__ |