in reply to Re^5: [JOB] The Perl Foundation seeks Windows Developer
in thread [JOB] The Perl Foundation seeks Windows Developer

As I understand it, if a file is open, e.g. C:\perl\lib\CPAN.pm, that file can't be deleted by Windows. You can install a newer version as C:\perl\site\lib\CPAN.pm, but @INC lists C:\perl\lib before C:\perl\site\lib, so you'll wind up using the older version when you think you're using the newer one.

demerphq's patch (not yet on CPAN) uses Win32 API calls that effectively rename the open file, install the new file in place of the old one, and schedule the renamed old file for deletion upon next reboot. (Ever see how Windows install/uninstall programs tell you they can't complete until rebooting? Same thing.)

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^7: [JOB] The Perl Foundation seeks Windows Developer
by BrowserUk (Patriarch) on Apr 03, 2006 at 13:54 UTC
    As I understand it, if a file is open, e.g. C:\perl\lib\CPAN.pm, that file can't be deleted by Windows.

    Whilst true, this is a Good Thing(TM) not a bad one. And the simple answer is to close the file before you try and delete it. Of course, that doesn't solve the real problem, but it would for the problem as you describe it.

    But the bigger problem is that your understanding of the actual problem that demerphq has addressed in incorrect.

    Ever see how Windows install/uninstall programs tell you they can't complete until rebooting?

    Of course.

    Same thing.

    Actually not!

    For the real problem see demerphqs post at Re^6: [JOB] The Perl Foundation seeks Windows Developer.

    And that succinctly demonstrates my biggest fear with respect to the proposal in the OP. It is being driven by the needs of people who do not know the platform and it's APIs, and are proposing solutions without a full understanding of the real problems, or the possibilities available for solving them.

    Did you ever hear/read the lyrics to the old XTC song, Making plans for Nigel?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Well, to be fair to xdg, I dont think his characterization is wrong. Its a touch on the simplisitic side, and glosses over some of the finer points, but hes not really wrong.

      I think you have a point when you say

      It is being driven by the needs of people who do not know the platform and it's APIs, and are proposing solutions without a full understanding of the real problems, or the possibilities available for solving them.
      However I see this as an issue of education. Since the VP and SP projects are intended to broaden access to Win32/Perl development enviornments hopefully we can expect to see people start to ramp up their Win32 knowledge and long term we can put aside of sillier UNIX-centric workarounds that have popped up.

      Anyway, it would be really nice to have someone like yourself contributing to this effort, so I really hope you decide to help out.

      ---
      $world=~s/war/peace/g