develooper Front page | perl.perl5.porters | Postings from September 2012

Re: Taking CPANPLUS out of core

Thread Previous | Thread Next
From:
Johan Vromans
Date:
September 30, 2012 11:14
Subject:
Re: Taking CPANPLUS out of core
Message ID:
m2sj9zml8v.fsf@phoenix.squirrel.nl
"Chris 'BinGOs' Williams" <chris@bingosnet.co.uk> writes:

> On Sat, Sep 29, 2012 at 01:29:04PM -0400, David Golden wrote:
> <snip>
>> 
>> I favor keeping IPC::Cmd, if only for "can_run", which again provides
>> a nice platform-agnostic abstraction to something complex that is easy
>> to get wrong. 
>
> run() has not relied on IPC::Run on MSWin32 since version 0.72, when
> I got buffer capturing to finally work with IPC::Open3 on MSWin32.

I think can_run() belongs to the set of functions that deal with
operating and file system semantics, like File::Spec. It is on itself
not related to executing commands and communicating with other programs.

Also, the current can_run implementation has some tricky bugs that are
worth fixing, e.g.

  $ touch foo
  $ chmod 0755 foo
  $ export PATH=/bin:/usr/bin
  $ perl -MIPC::Cmd=can_run -wle 'print can_run("foo")'
  ./foo

(One might even call this a security risc.)

-- Johan


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