develooper Front page | perl.perl5.porters | Postings from May 2003

Re: POSIX and EXPORT_OK

Thread Previous
From:
Tels
Date:
May 1, 2003 02:53
Subject:
Re: POSIX and EXPORT_OK
Message ID:
perl.perl5.porters-74992@nntp.perl.org
Moin,

On 01-May-03 Michael G Schwern carved into stone:
> On Tue, Apr 22, 2003 at 10:11:12PM +0200, Tels wrote:
>> noticed that in POSIX some of the functions like setgid cannot
>> be imported (they are not listed in EXPORT_OK), however, using some tags
>> it
>> is possible to import them, e.g.:
>> 
>>         use POSIX gw/setgid/;
>> 
>> fails. Should I correct this, too?
> 
> (I presume you meant qw/setgid/)

Uh, yes. It took me about 200 times comparing your version and mine and
find the error. Damn, tiny fonts with only one pixel difference between q
and g....

> Works for me:
> $ perl5.8.0 -wle 'use POSIX qw(setgid);  print setgid()'
> Usage: POSIX::setgid(gid) at -e line 1.
> 
> This is because they're listed in @EXPORT.  Almost everything is listed 
> in @EXPORT (contrary to the docs, patch coming).

Ah, I see. Thanx!

> 
> 
>> Also, Net::Server has some checks on whether setgid and setgid worked or
>> not. And they are wrong, because the return value is different than what
>> the author expected. However, POSIX.pm does not mention the return
>> values,
>> but "man setgid" does. Should this be documented, or is this something
>> different on each system? (You can tell I have not the slightest clue
>> about
>> POSIX at all). Pointers appreciated :)
> 
> I don't think parroting the POSIX docs is worth the considerable effort.
> 
> 
> -- 
> "He's cold-resistant, generally unemployed, and comfortable talking or
> silent, and he knows how to read a map"
>                 -- Jenn Dolan

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About