Rafael Garcia-Suarez wrote:
On 11/22/05, John E. Malmberg <[EMAIL PROTECTED]> wrote:
The file ext/List/Util/t/p_tainted.t is assuming a UNIX format pathname
is returned by __FILE__.
__FILE__ is initially set from PL_origfilename in perl.c. It's saved
as CopFILE in each cop (control op) in the optree (grep for
CopFILE_set for points where it's set.) In toke.c it can be modified
when parsing #line directives (like in C, basically). Finally, the
function pp_require() in pp_ctl.c can set it to the file name it
opens, corresponding to a .pm file usually.
Something is converting the name in __FILE__ to VMS syntax when I run
the script. I have made a note to track it down because it means that
something is doing a filename syntax conversion that it should not need
to do and should not be doing. That hint will help me find it.
That said, your fix looks strange to me. The "./" is here to ensure
the script looks for tainted.t in the current directory. As
p_tainted.t is run with the -T switch, the current directory is not
included in @INC, so do() shouldn't look for tainted.t in the current
directory at all, and then fail. And that's probably what's happening,
since in this case p_tainted.t produces no output at all...
Then I am still confused.
__FILE__ is returning: '[-.ext.list.util.t]p_tainted.t'
Now the UNIX equivalent to that would be: ../ext/List/Util/t/p_tainted.t
pre-pending a "./" to the Unix format path would not change where it
resolved to, but of course can not be done to a VMS format filename.
Now the test script runs with the directory set to "[.t]" or "t/", so
from your explanation, the file t/tainted.t should exist to be run.
A search of perl on my system shows no files named t/tainted.t, but do
show a file named ext/List/Util/t/tainted.t or
[-.ext.list.util.t]tainted.t as referenced from the [.t] directory.
-John
[EMAIL PROTECTED]
Personal Opinion Only