develooper Front page | perl.perl5.porters | Postings from October 2015

[perl #126271] File::Glob issue

Thread Next
From:
karl williamson
Date:
October 5, 2015 18:01
Subject:
[perl #126271] File::Glob issue
Message ID:
rt-4.0.18-1924-1444068071-105.126271-75-0@perl.org
# New Ticket Created by  karl williamson 
# Please include the string:  [perl #126271]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126271 >


These 2 lines:

my @b = glob(qq{$path/mp_[0123456789]*.dat
	$path/md_[0123456789]*.dat});

from https://rt.perl.org/Ticket/Display.html?id=114984 (and now in 
ext/File-Glob/t/rt114984.t) now work fine on Linux unless it is compiled 
with -DPERL_EXTERNAL_GLOB.  In that case, a shell is run instead of F:G, 
and the shell thinks the 2nd line is a shell command instead of part of 
what to glob.

I am not conversant in all the nuances of what bsd vs csh vs other 
shells accept, but I believe this means that F:G is not an accurate 
reproducer of what most shells would do with this, and I think it is 
meant to be.  Zefram on IRC pointed out that shell meta characters are 
probably also handled differently than in a real shell.

I'm not sure what to do.  The .t can be made to pass on 
-DPERL_EXTERNAL_GLOB systems simply by making the \n into a space.
(This problem was found in testing on z/OS, which is a 
PERL_EXTERNAL_GLOB system.)


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