On Wed Oct 13 00:47:24 2010, KING wrote:
Show quoted text> 1) So, previously I had Clipboard.pm trying to bind 'darwin' to Xclip,
> even though it also bound it to MacPasteboard (which took precedence).
> Other than that I just applied your diff to remove 'macos'. MacOS isn't
> even in the CPAN test matrix, so phooey on it. Might as well support
> Windows 3.1.
I missed the Xclip/MacPasteboard thing. You can run X Windows under Mac
OS X, but I know nothing about whether the clipboards are unified or
distinct.
Show quoted text>
> 2) I applied the MacPasteboard.pm diffs with no change.
Thanks glad it worked.
Show quoted text>
> 3) Do you have any idea how we can do a "smart dependency" scheme for
> the different OSs? I thought of a couple options:
> a) Find out the right way to say, "When on OS Z, pull in Z::Clipboardz"
Adam Kennedy does this for File::HomeDir. It's a matter of having
Makefile.PL (or Build.PL, or whoever) figure out what it's running under
and tweak things appropriately. You're supposed to set dynamic_config
true so that people will know that the requirements recorded in META.yml
are _not_ the last word on the subject.
Show quoted text> b) Include a distro of all the dependencies for all the OSs. So, like
> Module::Install gets its own copy within the tarball, I could just toss
> them all in. Bandwidth is not a problem---nonworkingness is.
Mac::Pasteboard is an XS module, which may be a problem. I suspect the
Windows stuff is too, though it comes with ActivePerl. There would also
be keeping up to date with the included modules. And I think CPAN tries
to keep up with this kind of thing, and plasters a big red "Unofficial
release" across anything it does not like.
Show quoted text>
> 4) If you want to take this even further, we could add t/darwin.t and
> guard it against running for other OSs. Issues here are:
This could certainly be done. Just skip all the tests if you're not on
the right operating system. Test::More makes this easy, though I'm not
sure how their mechanism will play out with your Test::Clipboard. You
might have to drop the 'no_plan' in Test::Clipboard and call plan()
explicitly when you know whether you are going to run the tests.
Show quoted text> a) I'm not sure what will happen on the CPAN test servers. I know for
> Linux it can't run much because it doesn't have an X server. Maybe it
> should also have a guard for when there is no X server running? Without
> an OSX machine handy these little glitchy bits are hard to get figured
> out.
In a way, that's why there are CPAN testers. One of the things you can
do is put out a developer release (with an underscore in the version,
say '0.13_01', which will have to be quoted). This means that it's
available, but the CPAN and CPANPLUS clients won't (by default) try to
upgrade to it. But the CPAN testers run development releases, so you can
find out if anything is wrong before it goes out into the wide world.
Show quoted text> b) I'm not sure what all should be tested.
I'm _never_ sure of this. A wise man once said that untested code was
buggy code. If it's a matter of code coverage, Devel::Cover will measure
this. Whenever I run this for the first time, I'm always shocked at how
low the coverage is.
Show quoted text> c) I want to guarantee that the tests won't nuke any user's clipboard
> data just for running the tests.
Ah. Cautious. Mac::Pasteboard allows you to create your own unique
pasteboard name, but it appears that the system-supplied pbcopy and
pbpaste utilities can't access an arbitrary pasteboard. I'm afraid
Mac::Pasteboard just nukes the clipboard. It should probably say so,
though. Or maybe I can think of a way to put it back when I'm done.
Show quoted text>
> I went ahead and uploaded the new version, 0.13. I figured your patches
> are more likely to work than what was in 0.12, so it's better to put it
> out there and let you look at it from there.
Thanks. Version 0.13 not only passes the tests, it actually works.
Show quoted text>
> Thank you for your time, expertise, and help. I feel all open-sourcey
> inside.
>
> -rjk
You know what an expert is, right? An ex- is a has-been, and a spurt is
a big drip.
Tom