| 1 | package UR::Value::FilePath; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 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 | my $self = shift; | ||
| 16 | my ($line_count) = qx(wc -l $self) =~ /^\s*(\d+)/; | ||
| 17 | return $line_count; | ||
| 18 | } | ||
| 19 | |||
| 20 | 1; |