File: Helpers.pm

package info (click to toggle)
libdatetime-perl 2%3A0.7500-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,120 kB
  • sloc: perl: 2,247; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package DateTime::Helpers;
{
  $DateTime::Helpers::VERSION = '0.75';
}

use strict;
use warnings;

use Scalar::Util ();

sub can {
    my $object = shift;
    my $method = shift;

    return unless Scalar::Util::blessed($object);
    return $object->can($method);
}

sub isa {
    my $object = shift;
    my $method = shift;

    return unless Scalar::Util::blessed($object);
    return $object->isa($method);
}

1;