[rt.cpan.org #81375] chdir without cc

[email protected] ("Sisyphus via RT")
Newsgroups perl.inline
Message-ID <[email protected]>
Tue Nov 27 06:37:04 2012: Request 81375 was acted upon.
Transaction: Correspondence added by SISYPHUS
       Queue: Inline
     Subject: chdir without cc
   Broken in: 0.50
    Severity: Normal
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81375 >


On Mon Nov 26 21:03:00 2012, [email protected] wrote:
> I vote for David,  It's a bug from chdir other than Inline.

File::chdir certainly provides an elegant solution to the problem, but
I'll stick with using the eval{} safety net, for the moment at least.
I'm not really all that keen to introduce a new dependency just to save
a couple of lines of code.

I do think it's an Inline::C bug.
Admittedly, it's a bit unusual to want to safeguard Inline::C code
against the absence of a C compiler (or of a missing make utility or of
uncompilable code, etc.), but I think one is entitled to do that. And if
one wants to do that by using eval{} (as the OP does), then one has
every right to expect that the script will return to the *original* cwd
if $@ gets set.
I think chdir() is behaving as it should. If we want to claim that it's
not an Inline::C bug, then we would have to argue that the OP is doing
something that's not allowed. (But of course, IMO, he isn't doing
anything wrong.)

Cheers,
Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.