diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-21 11:45:43 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-21 11:47:50 -0400 |
commit | 5f0fb29dc02d2ad322afbba1056af6a96256f907 (patch) | |
tree | c30fffa8a40960191f54a63c17a928be1c704055 /Keyword.xs | |
parent | b35d374f486c3dcb1b2ba8ed5909903a9b34fc5b (diff) | |
download | parse-keyword-5f0fb29dc02d2ad322afbba1056af6a96256f907.tar.gz parse-keyword-5f0fb29dc02d2ad322afbba1056af6a96256f907.zip |
add a function to get the package of the currently compiling code
Diffstat (limited to 'Keyword.xs')
-rw-r--r-- | Keyword.xs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -130,3 +130,10 @@ lex_read(len = 1) CODE: PL_curcop = &PL_compiling; lex_read_to(PL_parser->bufptr + len); + +SV * +compiling_package() + CODE: + RETVAL = newSVhek(HvNAME_HEK(CopSTASH(&PL_compiling))); + OUTPUT: + RETVAL |