develooper Front page | perl.perl5.porters | Postings from April 2000

Re: [ID 20000410.003] File::Glob qw(:glob) does not work

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
April 10, 2000 08:47
Subject:
Re: [ID 20000410.003] File::Glob qw(:glob) does not work
Message ID:
200004101546.IAA25501@maul.ActiveState.com
On Mon, 10 Apr 2000 08:45:14 +0200, Marc Lehmann wrote:
>File::Glob does not properly export it's glob function:
>
>cerebro:~# perl -e 'use File::Glob ":glob"; glob "/tmp/*", GLOB_NOSORT'
>Too many arguments for glob at -e line 1, at EOF
>Execution of -e aborted due to compilation errors.
>[Exit 255] 
>
>However, qualifying glob with the package name works:
>
>cerebro:~# perl -e 'use File::Glob ":glob"; File::Glob::glob "/tmp/*", GLOB_NOSORT'
>cerebro:~# 
>
>Looks like a prototype error.

I'd say it was a mistake to have named File::Glob::glob() the same name
as a builtin, when it doesn't have the same prototype as that builtin.

We should probably rename it and deprecate File::Glob::glob().  Patch
welcome.


Sarathy
gsar@ActiveState.com

Thread Previous | 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