Commit | Line | Data |
3fea05b9 |
1 | package DateTime::Helpers; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | our $VERSION = '0.53'; |
7 | |
8 | use Scalar::Util (); |
9 | |
10 | |
11 | sub can |
12 | { |
13 | my $object = shift; |
14 | my $method = shift; |
15 | |
16 | return unless Scalar::Util::blessed($object); |
17 | return $object->can($method); |
18 | } |
19 | |
20 | sub isa |
21 | { |
22 | my $object = shift; |
23 | my $method = shift; |
24 | |
25 | return unless Scalar::Util::blessed($object); |
26 | return $object->isa($method); |
27 | } |
28 | |
29 | |
30 | 1; |
31 | |
32 | __END__ |
33 | |
34 | =head1 NAME |
35 | |
36 | DateTime::Helpers - Helper functions for other DateTime modules |
37 | |
38 | =head1 AUTHOR |
39 | |
40 | Dave Rolsky <autarch@urth.org> |
41 | |
42 | However, please see the CREDITS file for more details on who I really |
43 | stole all the code from. |
44 | |
45 | =head1 COPYRIGHT |
46 | |
47 | Copyright (c) 2003-2009 David Rolsky. All rights reserved. This |
48 | program is free software; you can redistribute it and/or modify it |
49 | under the same terms as Perl itself. |
50 | |
51 | =cut |