New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link from __FILE__, __LINE__, caller to #line override mechanism #16897
Comments
From @GrinnzThe attached patch will add links from the perlfunc entries for __FILE__, -Dan (Perl) |
From @GrinnzPatch is attached. |
From @Grinnz0001-perlfunc-link-to-Plain-Old-Comments-section-of-perls.patchFrom bece146500d4a4ee9f1dddefc73bc69fa22b20de Mon Sep 17 00:00:00 2001
From: Dan Book <grinnz@grinnz.com>
Date: Mon, 18 Mar 2019 18:29:26 -0400
Subject: [PATCH] perlfunc: link to "Plain Old Comments" section of perlsyn
from __FILE__, __LINE__, and caller
---
pod/perlfunc.pod | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 973a2612d7..8cfa712d8f 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -947,6 +947,10 @@ list context, caller returns
# 0 1 2
my ($package, $filename, $line) = caller;
+Like L<C<__FILE__>|/__FILE__> and L<C<__LINE__>|/__LINE__>, the filename and
+line number returned here may be altered by the mechanism described at
+L<perlsyn/"Plain Old Comments (Not!)">.
+
With EXPR, it returns some extra information that the debugger uses to
print a stack trace. The value of EXPR indicates how many call frames
to go back before the current one.
@@ -2700,6 +2704,8 @@ X<__FILE__>
=for Pod::Functions the name of the current source file
A special token that returns the name of the file in which it occurs.
+It can be altered by the mechanism described at
+L<perlsyn/"Plain Old Comments (Not!)">.
=item fileno FILEHANDLE
X<fileno>
@@ -3954,6 +3960,8 @@ X<__LINE__>
=for Pod::Functions the current source line number
A special token that compiles to the current line number.
+It can be altered by the mechanism described at
+L<perlsyn/"Plain Old Comments (Not!)">.
=item link OLDFILE,NEWFILE
X<link>
--
2.20.1
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Migrated from rt.perl.org#133944 (status was 'new')
Searchable as RT133944$
The text was updated successfully, but these errors were encountered: