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__.
when a hash is freed that has had its current iterator deleted
[perl #93454].
+=item *
+
+The C<prototype> function now returns a prototype (the empty string) for
+the C<__FILE__>, C<__LINE__> and C<__PACKAGE__> directives, instead of
+dying, as they are indistinguishable syntactically from nullary functions
+like C<time>.
+
=back
=head1 Known Problems
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";
}
}
BEGIN { require './test.pl'; }
-plan tests => 237;
+plan tests => 240;
while (<DATA>) {
chomp;
# the keyword list :
__DATA__
+__FILE__ ()
+__LINE__ ()
+__PACKAGE__ ()
abs (_)
accept (**)
alarm (_)