Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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 Import.pm 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.

        Cheers,
        Rob

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2020-05-25 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (146 votes). Check out past polls.

    Notices?