Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/DateTime/TimeZone/Floating.pm |
Statements | Executed 18 statements in 196µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 17µs | 17µs | _new_instance | DateTime::TimeZone::Floating::
1 | 1 | 1 | 15µs | 20µs | BEGIN@6 | DateTime::TimeZone::Floating::
1 | 1 | 1 | 10µs | 29µs | BEGIN@7 | DateTime::TimeZone::Floating::
1 | 1 | 1 | 9µs | 1.19ms | BEGIN@9 | DateTime::TimeZone::Floating::
4 | 2 | 1 | 3µs | 3µs | is_floating | DateTime::TimeZone::Floating::
0 | 0 | 0 | 0s | 0s | STORABLE_thaw | DateTime::TimeZone::Floating::
0 | 0 | 0 | 0s | 0s | new | DateTime::TimeZone::Floating::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package DateTime::TimeZone::Floating; | ||||
2 | { | ||||
3 | 2 | 1µs | $DateTime::TimeZone::Floating::VERSION = '1.46'; | ||
4 | } | ||||
5 | |||||
6 | 3 | 20µs | 2 | 26µs | # spent 20µs (15+5) within DateTime::TimeZone::Floating::BEGIN@6 which was called:
# once (15µs+5µs) by DateTime::TimeZone::BEGIN@12 at line 6 # spent 20µs making 1 call to DateTime::TimeZone::Floating::BEGIN@6
# spent 6µs making 1 call to strict::import |
7 | 3 | 22µs | 2 | 49µs | # spent 29µs (10+20) within DateTime::TimeZone::Floating::BEGIN@7 which was called:
# once (10µs+20µs) by DateTime::TimeZone::BEGIN@12 at line 7 # spent 29µs making 1 call to DateTime::TimeZone::Floating::BEGIN@7
# spent 20µs making 1 call to warnings::import |
8 | |||||
9 | 3 | 124µs | 2 | 2.36ms | # spent 1.19ms (9µs+1.18) within DateTime::TimeZone::Floating::BEGIN@9 which was called:
# once (9µs+1.18ms) by DateTime::TimeZone::BEGIN@12 at line 9 # spent 1.19ms making 1 call to DateTime::TimeZone::Floating::BEGIN@9
# spent 1.18ms making 1 call to parent::import |
10 | |||||
11 | sub new { | ||||
12 | return shift->instance; | ||||
13 | } | ||||
14 | |||||
15 | # spent 17µs within DateTime::TimeZone::Floating::_new_instance which was called:
# once (17µs+0s) by Class::Singleton::instance at line 58 of Class/Singleton.pm | ||||
16 | 2 | 19µs | my $class = shift; | ||
17 | |||||
18 | return bless { | ||||
19 | name => 'floating', | ||||
20 | offset => 0 | ||||
21 | }, $class; | ||||
22 | } | ||||
23 | |||||
24 | 4 | 8µs | # spent 3µs within DateTime::TimeZone::Floating::is_floating which was called 4 times, avg 825ns/call:
# 2 times (2µs+0s) by DateTime::_calc_utc_rd at line 372 of DateTime.pm, avg 950ns/call
# 2 times (1µs+0s) by DateTime::_calc_local_rd at line 413 of DateTime.pm, avg 700ns/call | ||
25 | |||||
26 | sub STORABLE_thaw { | ||||
27 | my $self = shift; | ||||
28 | my $cloning = shift; | ||||
29 | my $serialized = shift; | ||||
30 | |||||
31 | my $class = ref $self || $self; | ||||
32 | |||||
33 | my $obj; | ||||
34 | if ( $class->isa(__PACKAGE__) ) { | ||||
35 | $obj = __PACKAGE__->new(); | ||||
36 | } | ||||
37 | else { | ||||
38 | $obj = $class->new(); | ||||
39 | } | ||||
40 | |||||
41 | %$self = %$obj; | ||||
42 | |||||
43 | return $self; | ||||
44 | } | ||||
45 | |||||
46 | 1 | 2µs | 1; | ||
47 | |||||
48 | # ABSTRACT: A time zone that is always local | ||||
49 | |||||
- - | |||||
52 | =pod | ||||
53 | |||||
54 | =head1 NAME | ||||
55 | |||||
56 | DateTime::TimeZone::Floating - A time zone that is always local | ||||
57 | |||||
58 | =head1 VERSION | ||||
59 | |||||
60 | version 1.46 | ||||
61 | |||||
62 | =head1 SYNOPSIS | ||||
63 | |||||
64 | my $floating_tz = DateTime::TimeZone::Floating->new; | ||||
65 | |||||
66 | =head1 DESCRIPTION | ||||
67 | |||||
68 | This class is used to provide the DateTime::TimeZone API needed by | ||||
69 | DateTime.pm, but for floating times, as defined by the RFC 2445 spec. | ||||
70 | A floating time has no time zone, and has an effective offset of zero. | ||||
71 | |||||
72 | =head1 USAGE | ||||
73 | |||||
74 | This class has the same methods as a real time zone object, but the | ||||
75 | C<short_name_for_datetime()>, and C<category()> methods both return | ||||
76 | undef. | ||||
77 | |||||
78 | =head1 AUTHOR | ||||
79 | |||||
80 | Dave Rolsky <autarch@urth.org> | ||||
81 | |||||
82 | =head1 COPYRIGHT AND LICENSE | ||||
83 | |||||
84 | This software is copyright (c) 2012 by Dave Rolsky. | ||||
85 | |||||
86 | This is free software; you can redistribute it and/or modify it under | ||||
87 | the same terms as the Perl 5 programming language system itself. | ||||
88 | |||||
89 | =cut | ||||
90 | |||||
91 | |||||
92 | __END__ |