Re: Proposed Mac::Pasteboard

2008-01-29 Thread David Cantrell
On Mon, Jan 28, 2008 at 10:45:56AM -0800, [EMAIL PROTECTED] wrote:

> That seems to argue that I publish Mac::Pasteboard pretty much as is,
> then follow with Mac::Clipboard. It's lazy, but is it lazy _enough_?
> Would it expedite discussion if I put out a pre-release of the code?
> If so, how should it be done? Mail the tarball to people who ask? Post
> to the newsgroup? Submit to CPAN with a development version number? I
> can't guarantee the documentation to be limpid prose, but the code
> works.

Release early, release often, that's what I do.

I note, however, that there is already a Clipboard module that claims to
do the job on OS X.  But the tests don't run properly on OS X.

So *maybe* Mac::Clipboard isn't necessary.

-- 
David Cantrell | London Perl Mongers Deputy Chief Heretic

There are many different types of sausages.  The best are
from the north of England.  The wurst are from Germany.
  -- seen in alt.2eggs...


Re: Proposed Mac::Pasteboard

2008-01-29 Thread Peter N Lewis

 > and then write Mac::Clipboard using Mac::Pasteboard to expose only the

 clipboard.  In the SEE ALSO section you can reference Mac::Pasteboard
 and people who need the advanced functionality can find it.


Interesting thought. The straightforward implementation would be to
have Mac::Clipboard depend on Mac::Pasteboard (since there's no
simplified clipboard interface that I have found). But it seems un-
parsimonious to me to use namespace for maybe a dozen lines of Perl,
since right now the "clipboard" part is on the order of


Given that Pasteboard offers a lot more functionality than just 
pbcopy/pbpaste, I would have though Clipboard would similarly offer 
all the functionality of Pasteboard, except only to the default 
standard clipboard.


So where Mac::Pasteboard might have a function that returns the list 
of flavors of the fifth item in the a specific pasteboard, 
Mac::Clipboard would have a function that returns the list of flavors 
of the fifth item, but only in the default system clipboard.


Obviously, you want some nice easy routines to extract the clipboard 
flavours as text (getting the unicode text if possible, the plain 
text if not), but you want that same functionality for all 
Pasteboards as well as for the system clipboard, so you would again 
have a function in Mac::Pasteboard that returns the text of the top 
item of a specified pasteboard and a function in Mac::Clipboard that 
returns the text of the top item in the system clipboard.


If Mac::Pasteboard is implemented in a functional manner, then you 
could use "undef" as the pasteboard parameter to specify the system 
pasteboard.


If Mac::Pasteboard is implemented in an OO manner, then 
Mac::Clipboard would be essentially identical, except instead of a 
factory function that takes a pasteboard name, it has just a factory 
function that returns the Mac::Pasteboard object for the system 
clipboard.


But regardless of the details, I think Mac::Clipboard would want to 
be far more than just an interface equivalent of pbcopy/pbpaste.


Enjoy
   Peter.

--
Keyboard Maestro  Macros for your Mac