develooper Front page | perl.perl5.porters | Postings from September 2017

"require" documentation

Thread Next
From:
Hauke D
Date:
September 26, 2017 10:32
Subject:
"require" documentation
Message ID:
5e250438-a9c9-12ad-0d3c-f65c8ff80dd8@zero-g.net
Hi all,

My understanding of the source[1] is that "require" will give special 
handling to absolute filenames and filenames beginning with "./" or 
"../". While this is described in the "do" docs[2], I find the "require" 
docs[3] a little misleading as the "pseudocode" is shown to just search 
@INC, with no mention of the special cases anywhere. While they do refer 
to "do", I think it would be good to make that more specific and to add 
a sentence, maybe something roughly like

"C<require> will give special handling to absolute pathnames as well as 
those beginning with F<./> and F<../>, the same way that the 
L<C<do>-FILE|/do EXPR> mechanism does."

[1] https://perl5.git.perl.org/perl.git/blob/60dfa515ef5:/pp_ctl.c#l3860
[2] 
https://perl5.git.perl.org/perl.git/blob/60dfa515ef5:/pod/perlfunc.pod#l1804
[3] 
https://perl5.git.perl.org/perl.git/blob/60dfa515ef5:/pod/perlfunc.pod#l6350

Thanks, Regards,
-- Hauke D

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About