line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::TypeCheck::Type::TRef; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
55
|
|
4
|
1
|
|
|
1
|
|
8
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use Devel::TypeCheck::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
290
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Devel::TypeCheck::Type::TRef - generic reference type |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Devel::TypeCheck::Type::TRef; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
This defines the interface for reference types. This no longer serves |
19
|
|
|
|
|
|
|
much of a purpose, and should probably be removed. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
# **** INSTANCE **** |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub deref { |
25
|
0
|
|
|
0
|
0
|
|
my ($this) = @_; |
26
|
0
|
|
|
|
|
|
return $this->subtype; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub is { |
30
|
0
|
|
|
0
|
0
|
|
my ($this, $type) = @_; |
31
|
0
|
0
|
|
|
|
|
if ($this->type == $type) { |
32
|
0
|
|
|
|
|
|
return TRUE; |
33
|
|
|
|
|
|
|
} else { |
34
|
0
|
|
|
|
|
|
return FALSE; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub type { |
39
|
0
|
|
|
0
|
0
|
|
croak("Method &type is abstract in class Devel::TypeCheck::Type::Ref"); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
TRUE; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Gary Jackson, C<< >> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 BUGS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This version is specific to Perl 5.8.1. It may work with other |
51
|
|
|
|
|
|
|
versions that have the same opcode list and structure, but this is |
52
|
|
|
|
|
|
|
entirely untested. It definitely will not work if those parameters |
53
|
|
|
|
|
|
|
change. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
56
|
|
|
|
|
|
|
C, or through the web interface at |
57
|
|
|
|
|
|
|
L. |
58
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
59
|
|
|
|
|
|
|
your bug as I make changes. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Copyright 2005 Gary Jackson, all rights reserved. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
66
|
|
|
|
|
|
|
under the same terms as Perl itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |