line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
44991
|
use 5.008; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
52
|
|
2
|
1
|
|
|
1
|
|
7
|
use strict qw( vars subs ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
64
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Safe::Isa::XS; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use base qw( XSLoader Exporter ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
172
|
|
8
|
1
|
|
|
1
|
|
6
|
use Scalar::Util qw( blessed ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
365
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
11
|
|
|
|
|
|
|
our $VERSION = '0.000_02'; |
12
|
|
|
|
|
|
|
our @EXPORT = qw( $_call_if_object $_isa $_can $_does $_DOES ); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
__PACKAGE__->load($VERSION); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
for (qw( _isa _can _does _DOES )) { |
17
|
|
|
|
|
|
|
${"Safe::Isa::XS::$_"} = \&$_; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Too lazy to write an XS version of this... |
21
|
|
|
|
|
|
|
our $_call_if_object = sub { |
22
|
|
|
|
|
|
|
my ($obj, $method) = (shift, shift); |
23
|
|
|
|
|
|
|
return unless blessed($obj); |
24
|
|
|
|
|
|
|
return $obj->$method(@_); |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
shift our @ISA; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |