On Fri, Feb 25, 2005 at 03:12:11PM -0500, Dave Vasilevsky wrote:
> 
> On Feb 25, 2005, at 10:24 AM, Daniel Macks wrote:
> >     open APTDUMP, "$basepath/bin/apt-cache dump |"
> 
> Perl usually discourages this form, since if someone could convince 
> $basepath to bstart with ">" it might do bad things.

I did it that way to be consistent with all our open/read-pipe usage.

> Why not stick with this?
> 
> open APTDUMP, "-|", "$basepath/bin/apt-cache dump";
> 
> Still not super (since ugly basepaths with spaces can still fail), but 
> a bit better and it works with both perls.

True. We already know that spaces in $basepath are a hopeless case, so
no loss. Maybe what we really need is to implement them all as a new
Services::read_pipe_cmd(($cmd) that either returns a filehandle ready
to read or prints a warning and returns an undef. That way we could
use Symbol::gensym or maybe IO::* objects with intelligent scoping and
do away from all those FILEHANDLE symbols.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to