line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package UNIVERSAL::Object::ID; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
57771
|
use 5.008_008; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
92
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
53
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
297
|
|
6
|
2
|
|
|
2
|
|
15
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
114
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1530
|
use version; our $VERSION = qv("v0.1.2"); |
|
2
|
|
|
|
|
4425
|
|
|
2
|
|
|
|
|
14
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
{ |
11
|
|
|
|
|
|
|
package UNIVERSAL; |
12
|
2
|
|
|
2
|
|
1360
|
use Object::ID; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
13
|
|
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
UNIVERSAL::Object::ID - Supply a unique object identifier to every object |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use DateTime; # for example |
22
|
|
|
|
|
|
|
use UNIVERSAL::Object::ID; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $date = DateTime->now; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
print $date->object_id; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Loading UNIVERSAL::Object::ID makes the C<< Object::ID >> role |
31
|
|
|
|
|
|
|
available to every object. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Use at your own risk, polluting UNIVERSAL is not to be taken lightly. |
34
|
|
|
|
|
|
|
The best place to use this module is in your own personal or internal |
35
|
|
|
|
|
|
|
use code rather than a widely distributed software library. Or you |
36
|
|
|
|
|
|
|
can use L to safely apply the UNIVERSAL effect to |
37
|
|
|
|
|
|
|
just your lexical scope. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
L, L |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |