Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

strawberry perl Windows and apply patch

by limner (Novice)
on Mar 23, 2018 at 19:28 UTC ( #1211631=perlquestion: print w/replies, xml ) Need Help??

limner has asked for the wisdom of the Perl Monks concerning the following question:

hi i need to apply this patch on a perl module: Object-Import-1-004-RT106769.patch I'm using perl by Straberry Perl. Which is the method to apply the patch? Using cpan? Which is the way? Thanks Limner
  • Comment on strawberry perl Windows and apply patch

Replies are listed 'Best First'.
Re: strawberry perl Windows and apply patch
by VinsWorldcom (Prior) on Mar 23, 2018 at 19:42 UTC

    I would just apply the patch with the usual patch command, Strawberry supplies it:

    VinsWorldcom@C:\Users\VinsWorldcom> which -a patch C:\usr\bin\patch.BAT C:\Strawberry\c\bin\patch.EXE C:\usr\bin\git\usr\bin\patch.EXE

    It's usually something like:

    patch -p1 < Object-Import-1-004-RT106769.patch

    ... but I usually reference this.

Re: strawberry perl Windows and apply patch
by Sinistral (Monsignor) on Mar 23, 2018 at 19:40 UTC

    Files with the 'patch' extension would indicate they are patch files. If you were on MacOS or a Linux machine, you would probably have patch already installed. Since you're using Strawberry Perl, you'll have to get it on your machine to use the patch file you've obtained.

    After a little searching, I found a port of patch for Windows from the GnuWin32 project, which I've used before. It is native Windows executables for UNIXy style programs.

    Once you've installed patch, you can take your patch file and apply it in your Strawberry Perl distribution by redirecting it using the redirection operator:
    patch < Object-Import-1-004-RT106769.patch

    You might have to be in the directory where the of your Object package is located, which would be most likely under C:\Strawberry\perl\lib\Object

    UPDATE: Go ahead and follow VinsWorldcom's advice in Re: strawberry perl Windows and apply patch - I didn't know Strawberry already included a patch.exe in C:\Strawberry\c\bin

      As Vim noted above, Strawberry should provide the patch command for you. I wouldn't recommend applying any patches unless you obtained them from Strawberry, and then these should be accompanied by instructions they provide which should be very-exactly followed.
        I wouldn't recommend applying any patches unless you obtained them from Strawberry

        No - the Strawberry Perl project does not provide patches for Object::Import or any other module.
        My advice would therefore be to not refrain from applying the patch simply because Strawberry does not provide it.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1211631]
Approved by Sinistral
Front-paged by Sinistral
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2021-10-18 04:54 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (72 votes). Check out past polls.