| lib/UR/Value/FilePath.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 9 | 9 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 3 | 3 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 12 | 13 | 92.3 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package UR::Value::FilePath; | ||||||
| 2 | |||||||
| 3 | 1 | 1 | 102 | use strict; | |||
| 1 | 2 | ||||||
| 1 | 24 | ||||||
| 4 | 1 | 1 | 3 | use warnings; | |||
| 1 | 12 | ||||||
| 1 | 121 | ||||||
| 5 | |||||||
| 6 | require UR; | ||||||
| 7 | our $VERSION = "0.46"; # UR $VERSION; | ||||||
| 8 | |||||||
| 9 | UR::Object::Type->define( | ||||||
| 10 | class_name => 'UR::Value::FilePath', | ||||||
| 11 | is => ['UR::Value::FilesystemPath'], | ||||||
| 12 | ); | ||||||
| 13 | |||||||
| 14 | sub line_count { | ||||||
| 15 | 1 | 1 | 0 | 3 | my $self = shift; | ||
| 16 | 1 | 7 | my ($line_count) = qx(wc -l $self) =~ /^\s*(\d+)/; | ||||
| 17 | 1 | 25 | return $line_count; | ||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; |