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

Re: Taking CPANPLUS out of core

Thread Previous | Thread Next
Johan Vromans
September 30, 2012 11:14
Re: Taking CPANPLUS out of core
Message ID:
"Chris 'BinGOs' Williams" <> 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")'

(One might even call this a security risc.)

-- Johan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About