Front page | perl.perl5.porters |
Postings from September 2013
[perl #119897] glob in threads is broken in perl5.18
Thread Previous
From:
Father Chrysostomos via RT
Date:
September 22, 2013 13:32
Subject:
[perl #119897] glob in threads is broken in perl5.18
Message ID:
rt-3.6.HEAD-1873-1379856717-228.119897-15-0@perl.org
On Sat Sep 21 19:48:07 2013, craig.a.berry@gmail.com wrote:
> On Sat, Sep 21, 2013 at 12:51 PM, Father Chrysostomos via RT
> <perlbug-followup@perl.org> wrote:
> > On Sat Sep 21 07:40:33 2013, Hugmeir wrote:
>
> I have done a smoke run of smoke-me/hugmeir/dup_glob_state, results
> available at:
>
> <http://www.nntp.perl.org/group/perl.daily-
> build.reports/2013/09/msg151124.html>
>
> I mention that here because unless you have the SHA1s memorized, there
> is no way from looking at it that you would know what branch was
> smoked. All the failures there are also happening in blead, i.e., no
> new test failures.
>
> >> On Sat, Sep 21, 2013 at 10:56 AM, Father Chrysostomos via RT <
> >> perlbug-followup@perl.org> wrote:
> >> > Your test assumes that the output will be sorted, but does not
> even use
> >> > File::Glob on VMS. I don’t know whether the default glob on VMS
> >> > produces sorted output, and whether you need to sort it.
>
> It uses the results of LIB$FIND_FILE, documented at:
>
> <http://h71000.www7.hp.com/doc/82final/5932/5932pro_017.html#fin_f>
>
> but I see no mention of sorting there. As far as I've ever seen,
> it's the order the files appear in the directory file, which on any
> system I've ever worked on means asciibetically. It's possible
> different locales or local character sets could change the physical
> order of the directory file, but I don't know that. If it's important
> I could try to find out.
I don’t think it’s important. My main point was that the test intended
to test File::Glob itself wasn’t testing it at all on VMS.
>
> >> >Alternatively,
> >> > just ‘use File::Glob "glob"’ explicitly, and bypass the globhook
> >> > mechanism (which VMS ignores) altogether.
> >> >
> >>
> >> Ah, I see, thanks. From the docs, I had assumed that it always gave
> sorted
> >> output by default -- perhaps that needs updating to have a clause
> for VMS
> >> if that's not the case. I've modified the branch to have a 'use
> File::Glob
> >> "glob"'.
> >
> > I think perlfunc/glob needs to state that glob is not implemented
> via
> > File::Glob on VMS.
>
> Does perlfunc/glob really need to say how it's implemented? To me
> that implies we're not quite sure how it actually works or maybe never
> decided how it should work.
Currently we state that it is implemented via File::Glob and one can see
File::Glob for more information. That itself is useful, because, for
non-VMS users, ‘use File::Glob ":nocase"’ has a process-wide effect on
the glob operator.
>
> >I don’t know how much of the text there about
> > whitespace is applicable to VMS’s default glob, so I am not really
> > qualified to write it.
>
> On VMS, glob does not split its arguments on whitespace:
>
> $ perl -e "print glob('*.c');"
>
av.cdeb.cdoio.cdoop.cdquote_static.cdump.cgenerate_uudmap.cglobals.cgv.chv.cinline_invlist.ckeywords.clocale.cmadly.cmalloc.cmathoms.cmg.cmg_names.c
>
miniperlmain.cmro.cnumeric.cop.coverload.cpacksizetables.cpad.cperl.cperlapi.cperlio.cperlmain.cPERLMINI.Cperly.cpp.cpp_ctl.cpp_hot.cpp_pack.cpp_sor
>
t.cpp_sys.creentr.cregcomp.cregexec.crun.cscope.csv.ctaint.ctime64.ctoke.cuniversal.cutf8.cutil.cvms.c
> $ perl -e "print glob('*.c *.h');"
> $
>
> I don't know when the split on whitespace feature was introduced
perl 3, which introduced glob.
> but
> it was probably an oversight or lack of tuits that kept it from
> getting added to the VMS implementation.
--
Father Chrysostomos
---
via perlbug: queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119897
Thread Previous