File Coverage

xsubs/defined.xs
Criterion Covered Total %
statement 4 4 100.0
branch 4 8 50.0
condition n/a
subroutine n/a
pod n/a
total 8 12 66.6


line stmt bran cond sub pod time code
1             ################################################################################
2             #
3             # Copyright (c) 2002-2020 Marcus Holland-Moritz. All rights reserved.
4             # This program is free software; you can redistribute it and/or modify
5             # it under the same terms as Perl itself.
6             #
7             ################################################################################
8              
9              
10             ################################################################################
11             #
12             # METHOD: defined
13             #
14             # WRITTEN BY: Marcus Holland-Moritz ON: Feb 2006
15             # CHANGED BY: ON:
16             #
17             ################################################################################
18              
19             bool
20             CBC::defined(name)
21             const char *name
22              
23             PREINIT:
24 46           CBC_METHOD(defined);
25              
26             CODE:
27             CT_DEBUG_METHOD;
28              
29             /* TODO: probably we can do without parse data (would require special handling of the pp object) */
30 46 100         CHECK_PARSE_DATA;
31 40 50         CHECK_VOID_CONTEXT;
    50          
    0          
32              
33 40           RETVAL = macro_is_defined(&THIS->cpi, name);
34              
35             OUTPUT:
36             RETVAL
37