Okay.
At this point, you may need to edit 10 lines of the patch file manually :(
When I just c&p'd the patch from the link above, every line that should look like these
--- Win32-Clipboard-0.52\Clipboard.pm Fri Sep 10 16:05:35 2004 +++ Win32-Clipboard-0.53-saved\Clipboard.pm Fri Oct 14 07:01:43 200 +5
Looked like these (note the missing whitespace between the filename and the date!)
--- Win32-Clipboard-0.52\Clipboard.pmFri Sep 10 16:05:35 2004 +++ Win32-Clipboard-0.53-saved\Clipboard.pmFri Oct 14 07:01:43 2005
So, check these after you paste and if the whitespace is missing insert a space or tab after the filename and before the date. Check all 10 lines (in five groups of 2).
I'm not sure what PM is doing with these line that causes this?
Then save it as C:\Clipboard\Win32-Clipboard-0.52\53.patch.
Win32-Clipboard-0.53>patch -p 1 -i 53.patch patching file `Clipboard.pm' patching file `Clipboard.xs' patching file `Makefile' Hunk #2 succeeded at 239 (offset -6 lines). Hunk #3 FAILED at 490. Hunk #4 FAILED at 812. 2 out of 4 hunks FAILED -- saving rejects to Makefile.rej patching file `META.yml' patching file `t\test.t'
Ignore the "Hunk#3 FAILED at 490" and "Hunk #4 FAILED at 812", they are not critical to your installation. (I don't understand why they fail at this point, the patch seems to correspond to the file perfectly, but patch doesn't give any useful reasons).
Final step. Re-build the package using nmake test. The last couple of lines of output should read:
... All tests successful. Files=1, Tests=10, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 +CPU)
The number of tests has gone from 9 to 10 and your ready to install it using nmake install
Assuming no errors, you should be able to type:
perl -MWin32::Clipboard -wle" print $Win32::Clipboard::VERSION" 0.53
And you are ready to try it. Run a script like this:
#! perl -w use strict; use Win32::Clipboard; my $clip = Win32::Clipboard(); ## If you use double quotes, double your backslashes \\. ## Don't use forward slashes as Exploerer won't like em. $clip->SetFiles( 'c:\Clipboard\Win32-Clipboard-0.53\53.patch' );
Then go to the explorer and paste into wherever you want the file copied.
Note that you can place as many files into the clipboard as you want copied; the paths must be fully qualified; when you paste in explorer, the file is always copied, even if you hold the control key--I haven't worked out how to make it move (yet).
In reply to Re^13: Move/Copy files using Clipboard!
by BrowserUk
in thread Move/Copy files using Clipboard!
by Ace128
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |