line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
29
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
43
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Metabase::Resource::perl; |
6
|
|
|
|
|
|
|
our $VERSION = '0.024'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use Carp (); |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
14
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use Metabase::Resource; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
202
|
|
11
|
|
|
|
|
|
|
our @ISA = qw/Metabase::Resource/; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _extract_type { |
14
|
1
|
|
|
1
|
|
2
|
my ( $self, $resource ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# determine type |
17
|
|
|
|
|
|
|
# Possible types could be: |
18
|
|
|
|
|
|
|
# - commit |
19
|
|
|
|
|
|
|
# - tag -- not implemented |
20
|
|
|
|
|
|
|
# - tarball -- not implemented |
21
|
1
|
|
|
|
|
4
|
my ($type) = $resource =~ m{\Aperl:///([^/]+)/}; |
22
|
1
|
50
|
33
|
|
|
9
|
Carp::confess("could not determine Metabase::Resource type from '$resource'\n") |
23
|
|
|
|
|
|
|
unless defined $type && length $type; |
24
|
1
|
|
|
|
|
5
|
return __PACKAGE__ . "::$type"; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# ABSTRACT: class for Metabase resources under the perl scheme |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |