diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-07-08 08:39:58 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-08 09:10:46 -0700 |
commit | 7c4c6e7cb76c912fc1c4218cf14243fc37bd530a (patch) | |
tree | 58e0f3c4c5d790457c051d57bb7f8c37dffc9fb2 /pp.c | |
parent | 1fb5e7d7953f8a63127afab98dc2efd59a1a472f (diff) | |
download | perl-7c4c6e7cb76c912fc1c4218cf14243fc37bd530a.tar.gz |
Add prototypes for __FILE__ &c.
Before this commit, prototype("CORE::__FILE__") would die with ‘Can’t
find an op number...’.
That __FILE__ does not have an op number whereas time() does is an
implementation detail that should not be exposed to the user.
So this commit adds prototypes for __FILE__, __LINE__ and __PACKAGE__.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -466,6 +466,11 @@ PP(pp_prototype) ret = newSVpvs_flags("\\[$@%*]$@", SVs_TEMP); goto set; } + if (code == -KEY___FILE__ || code == -KEY___LINE__ + || code == -KEY___PACKAGE__) { + ret = newSVpvs_flags("", SVs_TEMP); + goto set; + } if (code == -KEY_readpipe) { s = "CORE::backtick"; } |