line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Repl::Spec::Type::DefinedType;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
4
|
use Carp;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
168
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# No parameters.
|
8
|
|
|
|
|
|
|
sub new
|
9
|
|
|
|
|
|
|
{
|
10
|
1
|
|
|
1
|
0
|
2
|
my $invocant = shift;
|
11
|
1
|
|
33
|
|
|
7
|
my $class = ref($invocant) || $invocant;
|
12
|
1
|
|
|
|
|
3
|
my $self = {};
|
13
|
1
|
|
|
|
|
65
|
return bless $self, $class;
|
14
|
|
|
|
|
|
|
}
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub guard
|
17
|
|
|
|
|
|
|
{
|
18
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
19
|
0
|
|
|
|
|
|
my $arg = shift;
|
20
|
0
|
0
|
|
|
|
|
croak sprintf("Expected type 'defined' but received ''.", $arg) if !defined($arg);
|
21
|
0
|
|
|
|
|
|
return $arg;
|
22
|
|
|
|
|
|
|
}
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub name
|
25
|
|
|
|
|
|
|
{
|
26
|
0
|
|
|
0
|
0
|
|
return 'defined';
|
27
|
|
|
|
|
|
|
}
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |