Skip Menu |

This queue is for tickets about the Module-Manifest CPAN distribution.

Report information
The Basics
Id: 47802
Status: open
Priority: 0/
Queue: Module-Manifest

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: -f prevents file /dev/null
Date: Sun, 12 Jul 2009 11:25:24 +1000
To: bug-Module-Manifest [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With Module::Manifest 0.07 I tried use Module::Manifest; my $manifest = Module::Manifest->new('/dev/null', '/dev/null'); and got an error Did not provide a readable file path at foo.pl line 2 whereas of course /dev/null does exist and is readable. In $manifest->open I think the -f test should be omitted. I believe it almost never helps to pre-empt what open() might be capable of on a given file/device/socket/etc (at least once using three-arg open or whatever to ensure the name is not interpreted ...)
Subject: Re: [rt.cpan.org #47802] -f prevents file /dev/null
Date: Mon, 13 Jul 2009 10:47:42 +1000
To: bug-Module-Manifest [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Non-files are host-dependant and can't be reliably packaged into distributions in any platform-neutral manner. I'm also curious why you'd want to package a null device into a tarball... Adam K 2009/7/12 Kevin Ryde via RT <bug-Module-Manifest@rt.cpan.org>: Show quoted text
> Sat Jul 11 21:26:02 2009: Request 47802 was acted upon. > Transaction: Ticket created by user42@zip.com.au >       Queue: Module-Manifest >     Subject: -f prevents file /dev/null >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: user42@zip.com.au >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=47802 > > > > With Module::Manifest 0.07 I tried > >    use Module::Manifest; >    my $manifest = Module::Manifest->new('/dev/null', '/dev/null'); > > and got an error > >    Did not provide a readable file path at foo.pl line 2 > > whereas of course /dev/null does exist and is readable. > > In $manifest->open I think the -f test should be omitted.  I believe it > almost never helps to pre-empt what open() might be capable of on a > given file/device/socket/etc (at least once using three-arg open or > whatever to ensure the name is not interpreted ...) > >
Subject: Re: [rt.cpan.org #47802] -f prevents file /dev/null
Date: Tue, 14 Jul 2009 11:08:39 +1000
To: bug-Module-Manifest [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Reserved Local Account via RT" <bug-Module-Manifest@rt.cpan.org> writes: Show quoted text
> > I'm also curious why you'd want to package a null device into a > tarball...
No, I was trying it outside, with an empty manifest file, and what better empty file than /dev/null :-). (The convenience of the -f operator has a lot to answer for. Sometimes -e is reasonable, usually both just make perl code more restricted in what it will operate on than similar C code where the tedium of stat() dissuades anyone checking before opening. :-)
Subject: Re: [rt.cpan.org #47802] -f prevents file /dev/null
Date: Tue, 14 Jul 2009 20:13:03 +1000
To: bug-Module-Manifest [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
In this case, the behaviour was actually as intended. Will resolve closed. Adam K 2009/7/14 Kevin Ryde via RT <bug-Module-Manifest@rt.cpan.org>: Show quoted text
>       Queue: Module-Manifest >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=47802 > > > "Reserved Local Account via RT" <bug-Module-Manifest@rt.cpan.org> writes:
>> >> I'm also curious why you'd want to package a null device into a >> tarball...
> > No, I was trying it outside, with an empty manifest file, and what > better empty file than /dev/null :-). > > > (The convenience of the -f operator has a lot to answer for.  Sometimes > -e is reasonable, usually both just make perl code more restricted in > what it will operate on than similar C code where the tedium of stat() > dissuades anyone checking before opening. :-) > >
Subject: Re: [rt.cpan.org #47802] -f prevents file /dev/null
Date: Thu, 16 Jul 2009 09:37:18 +1000
To: bug-Module-Manifest [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Reserved Local Account via RT" <bug-Module-Manifest@rt.cpan.org> writes: Show quoted text
> > as intended.
?? It's one of those things where less code makes more features. Eg. someone making a shell pipeline can use /dev/stdin when a front-end insists on a filename. But if you do want to avoid char-specials or the like then of course testing before opening is a race condition, the test should be on the opened handle.