develooper Front page | perl.perl5.porters | Postings from August 2001

Re: On "Command-line Wildcard Expansion"

Thread Previous | Thread Next
Tye McQueen
August 7, 2001 09:40
Re: On "Command-line Wildcard Expansion"
Message ID:
Excerpts from the mail message of Dan Sugalski:
) At 08:28 AM 8/7/2001 -0700, Gurusamy Sarathy wrote:
) >On Tue, 07 Aug 2001 10:51:13 EDT, Dan Sugalski wrote:
) > >At 11:15 PM 8/6/2001 -0500, Tye McQueen wrote:
) > >>All I want is something that ships with Perl.  Actually, I
) > >>find the arguments for not rolling this into Perl itself very
) > >>unconvincing.  I'd prefer @ARGV to have wildcards expanded
) > >>in the name of portability and provide Win32::GetCommandLine()
) > >>for people who want to write Win32ish command-line interfaces.
) > >
) > >There's also precendent for rolling it in. VMS itself doesn't do wildcard
) > >expansion as part of its command line interface, but perl on VMS does. (We
) > >also emulate the I/O redirection and & backgrounding, but you might not
) > >want to go that far)
) >
) >I don't mind adding a thing to the distribution, perhaps
) >even a single-character switch that's an alias for -MWild.
) >
) >But changing the default strikes me as a bad decision.  How are we
) >going to explain the breakage to (say) bash users?
) Oh, without a doubt this is an excellent reason to not enable it by 
) default. Backwards compatibility is always a pain. (Though I don't know why 
) bash users would be surprised--isn't this the way bash works on windows?)

The problem is that it would change:

    $ perl script "*"


    $ perl script *

But I thought that most people using bash under Win32 were also
using Cygwin Perl which would not be affected by this.  For the
few that are using bash w/ "native" Win32 Perl, I'd say 1) you
already have to put up with some strange things (last I checked),
2) You can recompile Perl to change the default, 3) I'll write up
a snippet that you can cut-n-paste into a file and "export
PEROPTIB=-MNoReWild" so what do you have to complain about q-:
(I'm serious about the PERL5OPT part, but I'd include the file
with the distribution -- though we could probably come up with an
even better solution for this -- for example, what if wildcard
expansion wasn't triggered if argv[0] was "Perl" instead of

So, yes, I'd rather improve the situation by putting the rare few
who are likely to be more in-the-know in the situation of changing
defaults than the vast, unwashed masses.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About