1################################################################################
2##
3##  Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
4##  Version 2.x, Copyright (C) 2001, Paul Marquess.
5##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
6##
7##  This program is free software; you can redistribute it and/or
8##  modify it under the same terms as Perl itself.
9##
10################################################################################
11
12=provides
13
14__UNDEFINED__
15
16=implementation
17
18__UNDEFINED__ HvNAME_get(hv) HvNAME(hv)
19
20__UNDEFINED__ HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
21
22=xsubs
23
24char*
25HvNAME_get(hv)
26        HV *hv
27
28int
29HvNAMELEN_get(hv)
30        HV *hv
31
32=tests plan => 4
33
34is(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
35ok(!defined Devel::PPPort::HvNAME_get({}));
36
37is(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
38is(Devel::PPPort::HvNAMELEN_get({}), 0);
39