File Coverage

xs/Method.xs
Criterion Covered Total %
statement 5 5 100.0
branch 3 4 75.0
condition n/a
subroutine n/a
pod n/a
total 8 9 88.8


line stmt bran cond sub pod time code
1             #include "mop.h"
2              
3             MODULE = Class::MOP::Method PACKAGE = Class::MOP::Method
4              
5             PROTOTYPES: DISABLE
6              
7             BOOT:
8 451           INSTALL_SIMPLE_READER(Method, name);
9 451           INSTALL_SIMPLE_READER(Method, package_name);
10 451           INSTALL_SIMPLE_READER(Method, body);
11              
12             bool
13             is_stub(self)
14             SV *self
15              
16             PREINIT:
17 389           CV *const body = (CV *)SvRV( HeVAL( hv_fetch_ent((HV *)SvRV(self), KEY_FOR(body), 0, HASH_FOR(body)) ) );
18              
19             CODE:
20 389 50         RETVAL = !( CvISXSUB(body) || CvROOT(body) );
    100          
21              
22             OUTPUT:
23             RETVAL